Create a Subscription Service with Stripe and PHP
4.1 (15 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
103 students enrolled
Wishlisted Wishlist

Please confirm that you want to add Create a Subscription Service with Stripe and PHP to your Wishlist.

Add to Wishlist

Create a Subscription Service with Stripe and PHP

You build a multiple level subscription plan registration page using Stripe that registers new customers.
4.1 (15 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
103 students enrolled
Created by Lon Hosford
Last updated 3/2017
English
Current price: $10 Original price: $155 Discount: 94% off
3 days left at this price!
30-Day Money-Back Guarantee
Includes:
  • 4 hours on-demand video
  • 3 Articles
  • 12 Supplemental Resources
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
What Will I Learn?
  • Understand how Stripe handle recurring payments for subscription services.
  • Use the Stripe API to add new customers to free and paid subscription plan.
  • Handle login and content access using PHP session management.
  • Create a tiered framework for UI, network requests, database and Stripe interface.
  • Understand the maintenance of subscriptions on the Stripe dashboard.
  • How to set up a development environment for building Stripe subscription transactions.
View Curriculum
Requirements
  • PHP: Beginner to intermediate skills.
  • Javascript: Beginner to intermediate skills
  • HTML: Beginner to intermediate skills
  • CSS: Beginner skill with some experience.
  • PHP Web server: Need to have access to a running web server with PHP 5.3.3 or later.
  • SQL: Beginner to intermediate skills. We use SQLite in the course.
  • Stripe Account: You need a Stripe testing account. How to set one up is covered in the course.
  • Web Developer Tools: You should know how to open web developer tools in a web browser and navigate. We use Chrome web developer tools in the course materials. You can use others if you prefer.
  • Code editor of your choice.
  • Stripe Stripe Checkout Form: We use the Stripe Checkout Form with AJAX and Javascript. You will be able to follow along and understand if you have no experience with the Stripe Checkout Form. However we do not go into depth about the code behind it. If you want a more in-depth learning experience on the Stripe Checkout Form we recommend our companion course offered here on Udemy: Learn Stripe PHP: Make Checkout Webpages
Description

What is this course about? This course is a primer for using Stripe with PHP to build a subscription service. You build a new account page that allows customers to pay with their credit cards for recurring automatic billing.

Why take this course? Ecommerce is an essential skill for all web developers using PHP. Often the hurdle of where to start is high for newcomers to eCommerce. Stripe is a well known platform and is being add into PHP sites everyday. Stripe is great place to start and this course can be a great ice breaker for you to learn more on your own or take additional courses I am offering on Stripe. This course is also a good experience for combining HTML, CSS, Javascript, JQuery and PHP for a solution. If you have completed my Learn Stripe PHP: Make Checkout Webpages course on Udemy, this is a great course to take next.

Visual Step by Step eBooks Included! Often following along by video is not convenient. So every video in this course includes a page by a PDF eBook you can also use. The eBooks are full sized visuals you see in the videos.

Who might find this course useful? This course is for those who are new to Stripe and prefer not to use documentation to learn. Keep in mind that Stripe provides many examples and documentation a competent PHP programmer could follow. So if you are that type of person, consider looking at that option before enrolling in this course. However if you want a laid back deep dive into the basics, this could be helpful to intermediate and higher level skilled developers.

Are you ready to take this course? Students for this course are new to intermediate in their PHP, Javascript, JQuery, CSS and HTML skills. You are familiar with these technologies and have had some experience. This course will stay on the light side of their use but at the same time provide production quality solutions you can use in simple applications.

We use the Stripe Checkout Form with AJAX with Javascript. We also use Stripe PHP Exceptions. You will be able to follow along and understand if you have no experience with the Stripe Checkout Form and Stripe PHP Exceptions. However we do not go into depth about the code behind them. If you want a more in-depth learning experience on the Stripe Checkout Form and Stripe PHP Exception we recommend our companion course offered here on Udemy: Learn Stripe PHP: Make Checkout Webpages


Who is the target audience?
  • Developers who want to begin learning about Stripe for Subscriptions using PHP.
  • This course uses the copy and paste method for code follow along. We do not type code but rather focus analyzing, testing and understanding the code snippets you paste.
  • Developers who have skills and experience to learn from vendor supplied examples and API documentation may find that Stripe provides above average resources for your learning style.
Students Who Viewed This Course Also Viewed
Curriculum For This Course
52 Lectures
05:25:27
+
About The Course
3 Lectures 07:08

This is an introduction to the course. It covers the goals and scope of the course, the minimum skills for a great experience in the course and a high level view of the curriculum sections.

Preview 06:50

Tips for how to follow along in the course and to use the download practice files.

"Sessions" mentioned in the guide correspond to a Udemy "Lecture".

Instruction Guide
20 pages

These are the files used in this course.

  1. Download and unzip in a folder in your web server.
  2. Refer to the Instruction Guide for an overview of the structure and purpose of the course folders and files.
  3. Refer to the Practice Files Guide in each course section for direction on how to use the files in that section.

    This includes a version of the Stripe PHP API library for use in the course.
Course Files Download
00:18
+
Development Environment Setup
9 Lectures 29:27

The technologies and services needed to follow the course are covered. They include the web server, Stripe accounts, Stripe API keys, the Stripe PHP library and a PHP SQL database.

A PDF version of the video is included in the additional resources for this lecture.

Preview 02:46

A guide to how the course files are organized and used for this section.

"Sessions" mentioned in the guide correspond to a Udemy "Lecture" in this section.

Section Practice Files Guide
22 pages

This covers the web server environment to use Stripe to follow along in the course. Digital certificates are covered along with required version of PHP.

A PDF version of the video is included in the additional resources for this lecture.

Web Server Configuration
02:28

A Stripe account is needed for the course. This covers the types of account statuses and the Stripe Dashboard.

A PDF version of the video is included in the additional resources for this lecture.

Account Setup and Dashboard
05:19

The use of the secret and publishable Stripe API keys is discussed for both live and test mode. You learn about maintaining them for security. You examine the PHP file that we use in the course to make them available to our code.

A PDF version of the video is included in the additional resources for this lecture.

Understanding Stripe API Keys
02:51

This covers installing and using the Stripe PHP Library. You will learn about the manual method and the Composer alternative. The Github repository is stressed for keeping up to date. The relationship of the Stripe API to the Stripe PHP Library is covered.

A PDF version of the video is included in the additional resources for this lecture.

Installing the Stripe PHP Library
06:53

A database is used in the course. We look at the options and technologies such as PDO, PHP Data Objects and SQL, Structured Query Language.

A PDF version of the video is included in the additional resources for this lecture.

Using a Database with PHP
02:53

We are using the PDO library and the SQLite3 Database. In this session we learn how to test for these. We write developer testing scripts to verify that they are installed and working.

We also review installing the Firefox SQLite Manager Add-on for use in the course.

A PDF version of the video is included in the additional resources for this lecture.

Testing PDO and SQLite3 Installations
05:41

Students who wish to use a MySQL database instead of SQLite3 read the attached PDF explaining the changes to the development environment and the replacement files.

Using a MySQL Database
00:36

Test Your Knowledge
7 questions
+
Understanding the Project UI
4 Lectures 17:52

An overview to the topics covered in this section. 

This section explores the core webpages that would accompany a subscription signup form using Stripe. This section explores the core pages and how they might work if the site were about content. 

We look at the webpages for such a site, subscription content access and user login access. 

A PDF version of the video is included in the additional resources for this lecture.

IMPORTANT Update 3/8/17 

The ui_content.php file instructions assume your version of PHP has the short_open_tag option set to on.

The PHP short open tag is <?

The normal PHP open tag is <?php

You should use the normal PHP open tag for the ui_content.php file as that will work in all current supported versions of PHP.

Also PHP 7 eliminates the short open tag. A competed version of the ui_content.php file using the normal PHP open tag is added to this lesson for your convenience.


Preview 02:04

A guide to how the course files are organized and used for this section.

"Sessions" mentioned in the guide correspond to a Udemy "Lecture" in this section.

Section Practice Files Guide
9 pages

In this session we tour the project's user interface pages and work with handling the login access.

Explore Pages and Login Access
08:26

We will look at the proposed access for a multilevel subscription website. We see how we can separate and map subscription plans, public access and content access.

A PDF version of the video is included in the additional resources for this lecture.

Understanding the Content Access Plan
07:22

Test Your Knowledge
3 questions
+
Adding Stripe Recurring Plans
7 Lectures 29:34

An overview to the topics covered in this section.

We setup the subscription plans setup for our project.

We do that both in Stripe and on our own web server.

In Stripe we use both the Stripe dashboard to create plans and we use the Stripe API for building plans to facilitate our testing environment.

Then we integrate them into our user checkout interface and web server.

A PDF version of the video is included in the additional resources for this lecture.

Preview 03:26

A guide to how the course files are organized and used for this section.

"Sessions" mentioned in the guide correspond to a Udemy "Lecture" in this section.

Section Practice Files Guide
9 pages

We add and edit recurring billing plans in the Stripe dashboard. We look at ramifications of deleting a plan.

A PDF version of the video is included in the additional resources for this lecture.

Create and Edit in Dashboard
06:09

In this session we add a script that will create all our plans using the Stripe API.

This provides us way to recreate your subscription plans when testing.

A PDF version of the video is included in the additional resources for this lecture.

Create Plans using API
05:25

In this session we are going to set up a backend data source for our subscription plans. Stripe will maintain the billing aspect of our plans. We want our own resource that not only keeps the plan data such as id, name and price, but also what content access level is allowed for the plan.

A PDF version of the video is included in the additional resources for this lecture.

Creating a Network Data Source
05:32

We write Javascript to request and load our server plan data resource.

A PDF version of the video is included in the additional resources for this lecture.

Loading in the Client
03:45

In this session we will integrate plan data into the subscription form rendering.

We will use the plan data in our subscription form buttons.

A PDF version of the video is included in the additional resources for this lecture.

Integrate with User Interface
05:17

Test Your Knowledge
7 questions
+
Building the Database
6 Lectures 27:55

An overview to the topics covered in this section.

We are going to create an SQLite 3 database. We will write the SQL to build a customer table and add records. We test our code and create a database layer for the project architecture.

A PDF version of the video is included in the additional resources for this lecture.

Preview 02:36

guide to how the course files are organized and used for this section.

"Sessions" mentioned in the guide correspond to a Udemy "Lecture" in this section.

Section Practice Files Guide
9 pages

In this session we create our database using SQLite3 and connect to it using PDO.

A PDF version of the video is included in the additional resources for this lecture.

Connection and Creation
07:13

This session writes the SQL CREATE and DROP statements and uses PDO to create the customers table and investigates the purpose and data for the customers table fields.

A PDF version of the video is included in the additional resources for this lecture.

Create customers Table
04:48

This session writes the SQL INSERT statement and uses PDO to create a script to add a record to the customer table. Password encryption data covered.

A PDF version of the video is included in the additional resources for this lecture.

Add Customer Records
04:07

This session tests the script that adds a customer to the database. The SQLite3 auto increment field, password encryption and duplicate key fields are demonstrated. This is also preparation for the final production code to add new customers.

A PDF version of the video is included in the additional resources for this lecture.

Test Adding Customer Records
09:11

Test Your Knowledge
5 questions
+
Completing the Subscription Checkout Form
11 Lectures 58:38

This is the overview for this section. We are reviewing the user interface data validation, sending and receiving data to our web server. We hook up adding new subscribers to our database. And we test all the functionality.

A PDF version of the video is included in the additional resources for this lecture..

Preview 02:29

A guide to how the course files are organized and used for this section.

"Sessions" mentioned in the guide correspond to a Udemy "Lecture" in this section.

Section Practice Files Guide
9 pages

In this session we explore the current subscription form validation that we have in place and how to automatically fill it out to make testing faster

Understanding the UI Validation
06:44

We are now ready to start using the subscriber form data.

In this session we add coding to package the data so that it can be sent over the network to the server.

A PDF version of the video is included in the additional resources for this lecture.

Sending Data to the Server
07:21

We begin work on the server side for the new customer subscription form.

In this session we write the script that receives and responds to the form's POST requests.

A PDF version of the video is included in the additional resources for this lecture.

Receiving Data on the Server
07:44

Now we are ready to add the form data into the database.

In this session we will complete the coding for that and test it out.

A PDF version of the video is included in the additional resources for this lecture.

Adding to customers Table
07:15

For this session we will add the Stripe embedded checkout form to the subscription page.

A PDF version of the video is included in the additional resources for this lecture.

Adding Checkout to UI
07:57

In this session we use the API to add subscribers to plans in your Stripe account.

A PDF version of the video is included in the additional resources for this lecture.

Process Checkout on Server
07:37

We start sessions to do end to end testing of our subscription form.

This session will help you get your testing environment set up.

A PDF version of the video is included in the additional resources for this lecture.

Final Testing - Setup
02:40

This continues the end to end testing of our subscription form.

This session will test adding a new customer to the free Basic subscription plan.

A PDF version of the video is included in the additional resources for this lecture

Final Testing - Free Basic Plan
04:05

This continues the end to end testing of our subscription form.

This session will test adding a new customer to the paid Plus subscription plan.

A PDF version of the video is included in the additional resources for this lecture.

Final Testing - Paid Plus Plan
04:46

Test Your Knowledge
7 questions
+
Implementing User Login and Logout Sessions
10 Lectures 01:01:16

The login and logout user interface is completed to include a working login form, the logout navigation bar button and automatic login for new subscribers.

Preview 04:00

A guide to how the course files are organized and used for this section.

"Sessions" mentioned in the guide correspond to a Udemy "Lecture" in this section.

Section Practice Files Guide
10 pages

We add a PHP function to retrieve a customer record from the database using the user id and password. This coding is for the database tier in our architecture.

Get Customer Record by User Id and Password
03:21

We will write a script to test our function to retrieve a customer record from the database using the user id and password. Then we will run some tests.

Test Get Customer Record by User Id and Password
05:10

In this session we create the base code for setting the PHP login and logout sessions.

Managing State Data
06:58

In this session we create the network layer scripts for requesting a logged in and logged out out session state.

Add Network Requests
09:37

In this session we are testing the network layer scripts for requesting a logged in and logged out out state.

Testing Network Requests
06:58

In this session we are modifying the user interface to handle the login and logout session status. This includes completing the login form, the login button and the new subscriber form.

Enabling the User Interface
08:18

We have avoided looking at the navigation bar coding. Now we have the session data management in place, we can take a look. Keep in mind that how you do your site navigation can very. But this should give you an appreciation for using the session data management.

Understanding the Navigation Menu Bar
07:36

In this session the login form, the login button and the new subscriber form are tested to verify they update the session data properly.

Testing the User Interface
09:18
+
Extras
1 Lecture 00:57
Display Customer Account
00:57
+
Final Section
1 Lecture 04:40

A look back on what we learned in the course and suggestions on going forward.

Preview 04:40
About the Instructor
Lon Hosford
4.6 Average rating
46 Reviews
535 Students
3 Courses
Web Developer Coach and Web Site Consultant

Independent software developer with practical engineering project experience for clients such as AT&T, Avis, Bristol Myers Squibb, Ortho BioTech, Chanel, Avaya, Green Birdie Video, Aztec Learning Systems and Verizon Wireless. Lon is well known for translating client needs into useful applications.

An interesting aspect of Lon's consulting work was the creation of industry jobs that did not exist before. That lead to hiring and training college students who were taught dead technologies at a time academia was woefully behind on the paradigm shifts in personal computing, the internet and today the distributed device environment often called mobile.

Lon has taught thousands of students internet web development, animation and programming topics over two decades both privately and academically. He developed Multimedia Associated Degree program and courses for Raritan Valley Community College in the 1990s at a time when Macromedia Authorware and Director were tools. He is the founder, developer and educator for Raritan Valley Community College Web Developer Certification program also having its roots in the 1990s at the dawn of the internet. He also was a key curriculum developer and instructor for one of the Nation's first Web Developer Certification program offered through New Jersey Institute of Technology. Lon was also a technology instructor at the University of Phoenix Online.

Lon over the years has produced educational video for topics including Paradox, Cobol, Java, Jasmine, C, C++, Linux, Flash, Cocos 2d and HTML. These courses were distributed and taught in Universities internationally when global was an emerging term.