🌟 New Year Offer 🌟
Celebrate 2025 with 30% OFF on all products! Use code: NEWYEAR2025. Hurry, offer ends soon!
Laracasts – How To Accept Payments With Stripe
Hi, I’m Jeffrey. I’m the creator. Laracasts My days are spent building the site, and I also think of ways to help students understand confusing concepts. My wife and I reside in Orlando, Florida. We have two children.
Run Time 15:16
All Rights Reserved
Stripe Check out
In this episode, we will leverage StripeIntegration with’s Checkout to quickly generate a “Pay Now” To sell our fictional novel, click the button. We’ll also discuss the basics of charging charges. Stripe. It is important to understand the flow of this flow. So pay attention!
Get your instant download Laracasts – How To Accept Payments With Stripe
Run Time 6:23
Checkout Custom
You might find you have more control over the checkout process. We’ll be discussing the manual method of loading in this episode. StripeUse the “Checkout” button.
Run Time 10:07
Integrating Vue 2
You may already know that I am a big advocate for the Vue JavaScript Framework. We’ll be using the episode 2 code to create a Vue 2 component.
Run Time 8:26
Dynamically populating Checkout Modal
We’ve now moved to Vue. Let’s see how dynamically populate the checkout page’s details and price based on a selected product from a dropdown list.
Run Time 10:16
Subscriptions that Recurre
We have only tried single charges so far. We’ll be moving to recurring subscriptions in this episode. It’s easy! To To begin, we’ll add 2 simple plans to mimic Laracasts- a monthly or yearly subscription.
Run Time 5:54
Handling Failed Charges
Checkout is available Stripe A preliminary validation will be done on the card number. There are still situations where the Customer object is correctly created but the charge does NOT go through. It is crucial that we alert users when these exceptions are detected. This episode will address this issue.
Run Time 12:11
Recording the Stripe Customer
When you work with StripeIt’s important to keep a few columns in the database that identify the user’s customer ID, their subscription status and, if they have canceled, the timestamp that indicated when their subscription was cancelled.-Access should not be terminated.
Run Time 10:51
Refactoring Strategies
This episode will demonstrate some refactoring techniques that I frequently use in my own projects. To clean up our SubscriptionsController, we might leverage form objects, as well as creating a dedicated Subscription class to manage any interaction with Stripe. Let’s go through the process in incremental steps.
Run Time 12:09
Events and Webhooks
It is crucial that you listen to a variety of voices. Stripe-Specific events. If a customer attempts to renew their subscription but fails, what happens? However, Stripe This charge will be attempted several times. Eventually, the subscription will be cancelled. It is vital that we can listen to such an event and deactivate the user’s account in our database.
This episode will show you how to register a webhook with StripeLearn how to listen and fetch payloads from events. I will also show you a method for registering local Webhooks.
Run Time 8:51
Cleaner Webhook Management
We now know the basics of how you register. Stripe Web hooks: Let’s take a moment to refactor our code to make it easier to extend and work with. If we are going to respond to several of these, Stripe Events in the future will require that we organize them as elegantly now as possible.
Run Time 6:42
Test Stripe Webhooks
You’re sure to be compelled to explore more of the following. StripeHowever, this API is the main API. It’s important that we know how to write tests to make sure that billing code works as expected. Never want to find yourself in a situation where you have to deploy code in one afternoon only to wake up in the middle the next morning because your subscriptions are not working!
To Let’s start by learning how to post to our website. Stripe webhooks endpoint, and then verify that the whenCustomerSubscriptionDeleted method behaves as expected.
Run Time 14:32
Test against StripeAPI
In some situations, it is crucial that we are physically strong StripeTo ensure that our code works as expected, we will use’s API This episode will verify that our Subscription class makes a valid request. Stripe customer and associates them to the right plan. Finally, activates their account in our database.
Get your instant download Laracasts – How To Accept Payments With Stripe
Run Time 3:25
A Billable Trait
We can call different subscriptions if we need to keep our API current.-If you have specific methods that are not $user then we may be able to extract a BillableTrait. This episode will address this very issue.
Run Time 10:56
All Records Stripe Charges
To store all the incoming mail, we should set up a table. Stripe charges. This will not only provide quick payments for the user but also make reporting and daily summaries much easier.
Run Time 13:17
Cancel Subscriptions With Tests
It would be awful if users couldn’t cancel their subscriptions. We’ll be demonstrating this logic and preparing a test so that we can verify that it works.
Run Time 9:51
Use Coupon Codes
Your website may offer coupon codes to your new subscribers at one point. It’s a good thing, again. Stripe It’s easy to do. This episode will cover the basics of the flow, including the tests that ensure it works correctly.
You can view the source code of this series on GitHub.
Run Time 8:47
Checking for Grace Periods
We must offer users the option to cancel subscriptions recently cancelled. However, before we can do that, we have to learn how to identify if a user is still within their grace period. Let’s talk about this in this episode.
Run Time 13:40
Resuming Subscriptions
We’ll be updating our API in this episode to allow subscribers to resume their subscriptions. We will need to add a resume method the Subscription class. You can also do a little homework at the end.
Run Time 8:45
Clarity and Rendering Subscription-Only Content
This video will discuss clarity and double.-Negatives and the potential for them to introduce bugs. We’ll then create a template that renders subscriptions.-Provide the required call, but only content-To-Action for guests and deactivated user
Run Time 5:36
How Reducing Conditional Views
We created multiple conditionals in the previous episode to determine which set HTML should be displayed. The result was straightforward for our simple example. For real, however,-This can lead to bloated views that make it difficult to think about and cause problems in your daily life projects. Let me instead demonstrate a method that uses polymorphism to dynamically load a view partial.
Readmore:Â http://archive.is/6CPtn
Course Features
- Lectures 0
- Quizzes 0
- Duration 50 hours
- Skill level All levels
- Language English
- Students 0
- Assessments Yes