Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Freek Van der Herten:
Handling Stripe webhooks in a Laravel application
Oct 09, 2017 @ 15:33:06

Freek Van der Herten has a new post to his site showing you how to handle Stripe callbacks when integrating its webhook functionality into your application. True to form, he also created a Laravel package to make it even easier.

In the project I’m currently working on I had to integrate Stripe webhooks. Stripe has great documentation on how to handle webhooks, but it still took a fair amount of time to get the integration just right. My solution for handling webhooks is pretty generic and reusable by others. I decided to extract it to a package called laravel-stripe-webhooks, so nobody has to code this stuff up again. In this blogpost I’d like to share how the package works.

He then goes on to talk about the request validation that happens on the webhook callback and how the information can be reworked if something goes wrong. He then talks about the handling of valid requests either using a custom job or using events to trigger when a "source.chargable" event is fired.

tagged: stripe laravel package webhook tutorial event job

Link: https://murze.be/2017/10/handling-stripe-webhooks-laravel-application/

Quick Admin Panel Blog:
Stripe Payments in Laravel: The Ultimate Guide
Oct 03, 2017 @ 14:24:54

On the Quick Admin Panel blog there's a tutorial posted showing you how to accept Stripe payments in your Laravel application using their "Stripe Checkout" functionality. This feature allows the Stripe platform to be the only one that handles the payment data and doesn't require you to store any information in your application.

Stripe is one of the most popular payment merchants for web, but information about Laravel integration is pretty fragmented, so I decided to write a really long tutorial about this topic.

We will cover: general logic how Stripe works, simple one-time payment integration, testing and production environment setup. [We will also cover] saving transaction data for future reference, recurring payments with Laravel Cashier [and] getting invoices data and PDF download.

The tutorial then gets into the use of the Stripe Checkout functionality on your site (after setting up an account) and the flow of the checkout and transaction. Then comes the Laravel portion of the tutorial. They show you how to set up a new application and create the view containing the required Stripe form. They show you where it integrate the keys specific to your application and how to test the implementation. Next they show how to handle the response back from Stripe that contains a token that can be used to identify the payment method in the future. This is used to charge the card via the Stripe SDK tools.

The tutorial finishes looking at Laravel Cashier to handle recurring billing and subscription plans. It shows you how to integrate this with your application and how to use it for payments and invoices.

tagged: stripe payment laravel application tutorial cashier

Link: https://quickadminpanel.com/blog/stripe-payments-in-laravel-the-ultimate-guide/

PHPBuilder.com:
Integrate a Stripe Payment Gateway with PHP
Oct 28, 2016 @ 15:47:24

The PHPBuilder.com site has a tutorial posted helping you integrate Stripe into your PHP application as a payment gateway service.

Stripe is a payment gateway that is becoming increasingly popular in the Web industry. It offers payment processing services, which can be easily integrated into your Web application using the Stripe API.

Although it is not free (2.9% + 30 cents per transaction), Stripe saves time and reduces cost in many ways: seamless integration and good documentation reduces the amount of time and development hours needed, while it offers complete control over sensitive data which saves hundreds of thousands of dollars that would otherwise be spent on ensuring PCI compliance.

They then show how to set up and use the PHP Stripe API package to create a simple checkout form to accept credit card information and use the stripe.js handling to send it directly to Stripe. Once the service receives it, it then makes a call back to your callback endpoint to create a token value for the transaction and customer. This callback then uses the API to make the actual charge using the token for the payment method and the customer information.

tagged: stripe payment gateway integration tutorial customer creditcard

Link: http://www.phpbuilder.com/articles/application-architecture/shopping-carts/integrate-a-stripe-payment-gateway-with-php.html

SitePoint PHP Blog:
Memberships with Laravel Cashier
Apr 29, 2014 @ 15:38:51

The SitePoint PHP blog has posted a tutorial for those using the Laravel Cashier showing you how to work with memberships for the content or functionality of your application.

In this tutorial we’re going to see how easy it is to create a basic paid membership website using the Laravel Cashier package. You can see a demo of the app here and download the source code here.

The tutorial walks you through setting up a functional environment and getting the new Laravel instance up and running. Migrations to run are included in the repository checkout too. The tutorial then gets into the setup of Stripe for payments and creation of the various pages you'll need. An "upgrade" option is also included.

tagged: membership laravel cashier tutorial stripe content

Link: http://www.sitepoint.com/memberships-laravel-cashier/

SitePoint PHP Blog:
Selling Downloads with Stripe and Laravel
Oct 24, 2013 @ 17:17:30

On the SitePoint PHP blog there's a new tutorial posted showing you how to integrate Laravel and Stripe to make a simple system for selling downloads of software. Stripe is a developer friendly, easy to use payment system that helps you take and manage payments.

Digital goods are an increasingly valuable commodity. [...] In this article I'll show how you can implement a simple store selling digital goods using PHP along with Stripe, a payment provider who aims to make it easier than ever to take online payments since you don't need to set up special merchant accounts or deal with complex payment gateways.

He points you to the Stripe site to set up an account before getting started. With that in hand, They start in on the Laravel setup and project creation. He helps you make a "downloads" table to handle path to the file and price. Also included are the model for the Downloads and a "seeder" with some fixture data to work with. From there he shows how to make a simple home page and a "buy" page with a form for the payment information. The Stripe javascript library is then integrated and the response is handled. If it's a success, the user is then forwarded to another endpoint to download the file they paid for.

tagged: download stripe laravel tutorial payment system

Link: http://www.sitepoint.com/selling-downloads-stripe-laravel/

PHP/Cloudcast:
Getting Started with Stripe Webhooks
Nov 19, 2012 @ 15:20:51

On the PHP/Cloudcast site today they've released another screencast showing you how to integrate your application with Stripe, the popular (and programmer friendly) payment gateway for your applications. This is the third part of their series.

In this, the third episode of PHP Cloud Development Casts, we go through how to integrate Stripe Webhooks in to our PHP applications. We extend the PHP Kohana application we created in episode 2 and show how simple it is to create a webhook and to receive the information and store it in a MySQL database.

Through the use of Stripe's webhooks, you can have a transaction call back to your application on a specified URL and perform further actions. In his example, he shows how to make the request, handling the "payment success" event. He includes all of the code (controller, view, etc) that you'll need to plug into Kohana to make it all work.

tagged: cloudcast screencast stripe tutorial callback webhook kohana

Link:

PHP Cloud Casts:
#3 Creating Charges with Stripe.com (Screencast)
Oct 29, 2012 @ 15:05:06

The PHP Cloud Casts site has posted another screencast-based tutorial showing you how to interface your application with Stripe.com, a developer-friendly payment solution with its own API.

In this, the second episode of PHP Cloud Development Casts, we go through how to creating charges with the Stripe.com libraries. We use a simple Kohana based PHP setup to create a token and an accompanying charge. We then login to our account and look at the details that Stripe stores about the transaction from tokens, charges, events and other logged data.

You can view the video either on their site or by heading to Vimeo for a bit larger version. He shows how to use Stripe's own Javascript and PHP scripts to connect to the API. He does it as a part of a Kohana-based application, but it can be easily adapted to any framework (or non-framework) site out there.

tagged: screencast tutorial stripe payment gateway api

Link:

NetTuts.com:
So You Want to Accept Credit Cards Online?
Jun 14, 2012 @ 14:30:25

On NetTuts.com they're posted a new tutorial about using the Stripe service to accept credit cards on your site. Thanks to some handy libraries they provide, integration is a relatively simple process.

Until recently, accepting credit cards on a website was expensive and complicated. But that was before Stripe: a radically different and insanely awesome credit card processing company. Today, I’ll show you how to start accepting cards in 30 minutes or less – without spending a dime.

They step you through the whole process you'll need to get the full flow set up:

  • Install an SSL Certificate (on your server)
  • Create an Account
  • Create Your Payment Form
  • Collect The Form Values
  • Request a Token
  • Create a Server-Side Script

Screenshots of the Stripe interface, HTML, Javascript and PHP code are all included - everything you need to make the simple card handling work. One of the keys to how Stripe deals with credit cards is that you provide it the card info, it gives you a token. Your app uses this to work with the card instead of storing the card information in your database (also making it more secure).

tagged: creditcard stripe tutorial processing javascript html php library

Link:


Trending Topics: