Learn Stripe PHP: Make Checkout Webpages

Start to accept credit cards on your PHP web site for single item orders and get introduced to the Stripe platform.
3.9 (10 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.
73 students enrolled
Instructed by Lon Hosford Development / E-Commerce
$19
$95
80% off
Take This Course
  • Lectures 33
  • Length 5.5 hours
  • Skill Level Beginner Level
  • Languages English
  • Includes Lifetime access
    30 day money back guarantee!
    Available on iOS and Android
    Certificate of Completion
Wishlisted Wishlist

How taking a course works

Discover

Find online courses made by experts from around the world.

Learn

Take your courses with you and learn anywhere, anytime.

Master

Learn and practice real-world skills and achieve your goals.

About This Course

Published 7/2015 English

Course Description

What is this course about? This course is a primer for using Stripe with PHP. It creates examples of using the Stripe provided Javascript based checkout forms for accepting bank cards. Then it covers the PHP processing of the charge of those cards. You use the Stripe dashboard to follow the charges to a payment to your account.

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.

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.

What do you need to take the course? You need access to a web site with PHP 5.3.3 or later. You can use a local host web site for the course. You need Stripe testing account and steps for doing this are covered in the course.

What are the requirements?

  • PHP: Beginner to intermediate skills.
  • Javascript: Beginner to intermediate skills
  • HTML: Beginner to intermediate skills
  • CSS: Beginner skill with some exposure to class and id selectors.
  • PHP Web server: Need to have access to a running web server with PHP 5.3.3 or later.
  • 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.

What am I going to get from this course?

  • Create a single order Stripe checkout web page
  • Use the Stripe API to charge credit cards from your web server.
  • Gain experience using the Stripe dashboard for transaction tracking.
  • Understand how the Stripe Remember Me feature is used.
  • Setup a web development environment for using Stripe
  • Install and use the Stripe PHP API library
  • Know how to maintain your Stripe account API keys
  • Understand how to configure a Stripe account for testing and production

What is the target audience?

  • This course is for the newcomer to PHP, Stripe and web development who want to get a start on building web pages for eCommerce.
  • 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.
  • 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.

What you get with this course?

Not for you? No problem.
30 day money back guarantee.

Forever yours.
Lifetime access.

Learn on the go.
Desktop, iOS and Android.

Get rewarded.
Certificate of completion.

Curriculum

Section 1: About the Course
03:11

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

20 pages

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".

Article

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.
Section 2: Development Environment Setup
03:00

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

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

8 pages

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.

02:33

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.

05:36

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.

02:55

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.

06:56

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.

Test Your Knowledge
4 questions
Section 3: Understanding the Project UI
03:00

An overview to the topics covered in this section. We are creating and using the Stripe Embedded Checkout form. We use its Remember Me feature. The Stripe Checkout form parameters and its impact on the DOM are investigated. We also look at the network data requests made by the checkout form.

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

9 pages

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.

06:40

We look at adding a simple Stripe Embedded Checkout form to a web page. We use it to have the same experience that the user does. We look at the data the checkout form generates when a payment is authorized.

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

06:28

The Stripe checkout form can save your customer's payment information using the Remember me feature. In this session we use the Remember me features to get the same experience the user has. We also learn the options for disabling the feature if necessary.

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

06:40

This session looks at the behind the scenes network data communications between the Stripe Checkout form and the Stripe API. The Stripe Checkout form configuration options are explained. The impact on the Document Object Model is investigated as well.

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

4 questions

These are questions related to this section.

Section 4: Charging the Card
02:30

In this section we focus on charging the customer banking card and getting paid. We start using the Stripe PHP library to access the Stripe API. We investigate the success and failures of using the Stripe API from PHP. We also look at the messaging from Stripe to customers and their banks.

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

9 pages

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.

06:25

In this session we add testing code to the checkout order form page. This will help us follow the data when the Stripe Checkout form completes. We also move the form data from the UI HTML and place into PHP variables.

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

06:18

This session we add the code to card the card payment that is authorized by the Stripe Checkout form. We test our code and review the response information. This code will add log entries and a payment in your Stripe test dashboard.

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

04:29

This session looks at the data returned by the Stripe Charge create method. We look at it in the documentation, display it in in our code and take a look at it in the Stripe Dashboard.

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

07:08

This session we look at the Stripe API Exceptions. We look at how to access the error data. We use the documentation to see how to interpret the error information. And we run a simulation for a Stripe API Exception.

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

05:36

This session follows a Stripe checkout and charge from a web site page through to the Stripe dashboard. It looks at the charge, token and error log entries. It also looks at a payment record and various options for modifying it.

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

07:19

This session covers the information that flows from Stripe to your customer and your customer's bank. You work on the public information in your Stripe account in the dashboard. This includes the default bank statement descriptor. You also code dynamic bank statement descriptors.

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

6 questions

These are questions related to this section.

Section 5: Using Stripe JS and Ajax
02:18

In this section we are moving to a framework that lets us customize the Stripe Checkout experience. To do this we use the Stripe JS library directly with JQuery and AJAX. We rewrite our card charging script to use the AJAX data communications. A custom checkout button is demonstrated as a simple example of designing the order form independent of Stripe.

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

9 pages

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.

04:41

This topic reviews the user interface code already in place. Then it installs a simple but practical messaging framework into the user interface. The messaging is for loading, processing, successful charges, unsuccessful charges and other error issues. A custom checkout button is introduced to replace the automatic Stripe checkout button.

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

10:07

Stripe JS is installed and used to load the Stripe Embedded Checkout form and receive data from a successful checkout. JQuery is used to handle the custom checkout button.


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

08:50

AJAX is configured to communicate with a PHP script that charges the customer. Server backend PHP coding is refactored to work with AJAX, receiving data in the POST format and returning results in the JSON data format. The user interface and the backend PHP Stripe processing are decoupled.

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

07:59

The user interface is complete to show messaging for Javascript library loading, AJAX processing, successful charges, unsuccessful charges and other unexpected AJAX errors. Error handling is revisited and error information is redirected to server error logs.

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

Test Your Knowledge
2 questions
19 pages

This is a simplified example that modifies this section's completed files to allow multiple selections from HTML select element and create a single item checkout.

We are still keeping all the data for order taking statically coded. This is avoid more complicated programming to store detailed product information or develop a shopping cart. How you get the data to your order form is application dependent and can vary.


Most of the changes are HTML and Javascript using JQuery.


Particular to Stripe is the use of the open method for Stripe JS to provide the user selections from the order page.


This is not a step by step tutorial. All the code is completed and you can download it from resources in this lesson. Remember to change the common.inc.php script with your own Stripe testing API keys if you want to play with it.

123 pages

This is example will allow the user to enter values that are used in the Stripe payment processing.

This example can be used as a model for typical gifting or donation checkout pages.

Also this example accepts URL parameters to customize the form values. You would use those for links from other webpages, email campaigns, social media post and advertising media.

Overall the Stripe processing is unchanged from this section's base example.

The work is mostly in Javascript and JQuery with a touch of new PHP.

This is a line by line workbook.

The total exercise steps are about 33.


It may appear that there are a large number of pages, but each page has a minimum reading of 1 - 3 sentences.

Article

This is a catch all for examples coming from discussions and student suggestions.


Section 6: Final Section
02:58

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

New: Create a Subscription Service with Stripe and PHP
Article

Students Who Viewed This Course Also Viewed

  • Loading
  • Loading
  • Loading

Instructor Biography

Lon Hosford, 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.

Ready to start learning?
Take This Course