How to Create Text Message Alerts for PayPal Payments using Twilio, PHP, and YII 2
I was recently completing a payments integration for a recruiting firm that wanted to quickly deploy text message alerts for when buyers complete a PayPal payment flow. The business wanted the ability to instantly text payment info to the payee’s cell number. This tutorial is an introduction to integrating Twilio SDK into a Yii2 web application.
Preview of Text Alert
For this tutorial we’ll assume the following:
- PHP 5.4.0 or higher is required
- Twilio Account
- Paypal Account/Developer with restful application key and secret
- Composer installed
- Git installed and have a basic understanding
- Basic understanding of Yii2 PHP web framework
YII2 framework is defined as a high performance, component-based PHP framework for rapidly developing modern web applications. Personally, I love that it allows me to just focus on code instead of design patterns. I can scaffold views, data models and other trivial tasks that ...
Build Your Own Personal Training Exercise Bot with Python, Zappa, AWS and Twilio SMS
Heading into the new year I wanted to set myself up to be successful living a healthier life. Saying you’re going to do something is easy, following through with action is the hard part. To ensure success being more physically active I needed help with a seemingly simple question, what should I do for a workout? With so many options available I wanted to spend less time thinking about what I’m going to do and more time doing the actual workout.
I needed a prescriptive solution to dictate a workout each day that would be balanced with enough daily variation to avoid becoming redundant. Most of the fitness apps available allow tracking of workouts, but lack the prescriptive component I was looking for.
Unsatisfied, I decided to roll-up my sleeves and build my own SMS-enabled personal trainer bot I call twilio-fit. Twilio-fit designs a workout on-demand that incorporates ...
Receive an SMS and email it using Twilio SendGrid, C# and .NET Core
An apt business use for both Twilio SMS and Twilio Sendgrid would be for customer enquiries on a website. Using C# and .NET Core 2.2 we will build an app that receives an SMS, takes the from number and the message body and send out an email using Twilio SendGrid.
To get started with this project you will need the following:
- A Twilio account (sign up for a free Twilio account here)
- A Twilio SMS-enabled number
- The .NET Core 2.2 SDK and runtime
- A Twilio SendGrid account (sign up for free here)
- A SendGrid API Key
- Visual Studio Code or similar code editor or IDE
Creating the project
We are going to use the WebApi template project that comes with the .NET Core SDK, as a starting point.
From the command line, navigate to the location you wish to create the new application. Use the following command to ...
How to Create an SMS Portal With Laravel and Twilio
At some point in your application workflow, you may need to pass important information to your users. Thanks to the advancement in web technologies, this can easily be done with push notifications. However, most of these services require your users to have an internet connection and unfortunately, this isn’t always the case. Luckily, we can overcome this by using a notification system that does not rely on the internet.
In this tutorial, we will teach you how to use Twilio’s Programmable SMS to create an SMS notification portal using Laravel. After we’re finished, you would have developed a custom SMS notification portal that allows you to notify your users via a dashboard with SMS.
In order to follow this tutorial, you will need:
- Basic knowledge of Laravel
- Laravel Installed on your local machine
- Composer globally installed
- MySQL setup on your local machine
- Twilio Account
Setup Project ...
How to Build an SMS Payment Notification System for Stripe with Laravel
For many online stores, it’s important as a business owner to be able to receive real-time notifications whenever a sale occurs in your store. In this tutorial, we will be looking at how we can achieve real-time notifications via SMS using Twilio’s REST API whenever a new sale occurs on your store.
To follow along, you’ll need the following:
Create A New Laravel Project
To get started, we need to install a new Laravel project. There are different ways to go about this, but for the sake of this tutorial, we’ll be using Composer. If you’d prefer an alternative, you can visit the docs to learn about the different ways to install a new Laravel project.
Open your terminal, and run the following command:
$ composer create-project ...
How to Send an SMS When Your Cron Job Fails
A modern-day business that relies heavily on tech to operate requires virtually no downtime at all. Case scenario would be an e-commerce business which needs to reconcile its sales every day through cron jobs that run at scheduled times of the day. Mitigating issues when the crons fail takes time since there is no way to alert the stakeholders. This may lead to huge losses or embarrassment to the company depending on the type of reports you are generating via cron.
In this tutorial, we are going to learn how to use the Twilio Programmable SMS API to send text messages when a cron job fails. We will create a simple cron job that sends weekly emails to users then integrate with Twilio Programmable SMS API to send an SMS when the cron fails.
Ensure you have the following installed in your local development environment.
- PHP - Version 7.0 ...
How to Create an SMS Weather Forecast App using PHP & Twilio
Imagine you’re on vacation and have limited or no access to the internet. Maybe you would like to go surfing or skiing and your access to a forecast is non-existent. This type of scenario is a very good use case of forecasting weather using SMS and a server-side language such as PHP. That's what we are going to learn how to build in this tutorial.
- PHP 7 development environment
- Global installation of Composer
- Twilio Account
- An OpenWeatherMap Account
- Global installation of ngrok
Set Up Our Development Environment
To kick start our project we will need to create a project directory for it. You may use
Weather-Appas this is what I will be using too. In the folder create the following files.
Next, we need to set up our .env file.
NOTE: The .env file is a hidden file we create on ...
How to Track the Conversion Rate of Incoming SMS via a Link Using Google Analytics
You have succeeded in sending a bulk SMS to all your customers to buy your shiny new product, via a link in an SMS. How do you check how many of your customers interacted with the link? We can do this using Google Analytics. Google Analytics is a web analytics service that tracks and report website traffic.
For this tutorial, we will only need a hosted website with a domain.
Creating a Google Analytics account
To create a Google Analytics account go to the URL here and log in with your Google account.
Obtain Tracking ID
The tracking ID is a unique set of characters in the form of
UA-134276880-1that enables tracking for your site. To obtain your unique tracking ID, fill the form as shown below. Click the “Get Tracking ID” button and then accept the terms and conditions as shown in the images below.
Selling 5,000+ Boxes of Girl Scout Cookies with a bit of Twilio Magic
Selling Girl Scout cookies can be challenging, especially if the goal is to sell 5,000 boxes in 50 days! Why would one want to do such a thing? Well, first of all, selling Girl Scout cookies teaches girls life skills such as goal setting, decision making, money management, people skills, business ethics, and so much more. Secondly, the Girl Scouts of San Gorgonio council offers some amazing incentives. In addition to the many prizes like a robot, 3D printer, iPad, and a one week trip to Canada at 4,000 boxes sold (and much more). The prize for selling 5,000 boxes in 2019 is a two week trip to China and Japan, including an entire day at Shanghai Disney! Going to Japan has been a bucket list item for my ambitious daughter, Audrey, to travel to since preschool. So, game on!
Out of 12,386 registered Girl Scouts ...
Generate Songs with Markov Models using Server-Side Swift, Perfect, and Twilio SMS
I like music and coding and one way to make music with code is by predicting words and generating a new song. You can do this with Markov models, as introduced in this last Twilio blog post. Now let's learn how to train a model on a .txt file to generate a song and then generate another song or text via Twilio SMS with server-side Swift and Perfect.
To code along with this post you should have the following:
- A Twilio account to buy a phone number
- ngrok, a tool for putting the app running on your local machine on the web
First, make a new Single View project in Xcode and run
pod initon the command line in the directory where your Xcode project exists to create a Podfile in order to install the Markov Model library via CocoaPods, as further detailed in the first ...