From the course: Extending Laravel with First Party Packages
Unlock this course with a free trial
Join today to access over 22,600 courses taught by industry experts.
Canceling a subscription
From the course: Extending Laravel with First Party Packages
Canceling a subscription
- [Instructor] All right, so now that we've gone ahead and allowed users to modify their subscription, there is one last subscription modification that we need to talk about and that is canceling the subscription. Now, there are a few things that we need to be careful of in Stripe that I want to make sure that you're aware of before you get started with this, and we'll go over all of those in this video. So, we'll talk about how to cancel a subscription, how Stripe handles cancellations, and then how you can instantly cancel a subscription. All right, so we'll go over all these details right now. All right, so here we are inside of our payments controller. Now, if you guys remember, we created a new route for cancel, so if we go to /cancel it's gonna go to payments controllers@cancel. So we can create a new function here that is going to cancel our subscription. So let's do that now. Public function cancel and we actually aren't gonna request anything. This is a simple get request…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
(Locked)
Configure and install Laravel Cashier9m 39s
-
(Locked)
Set up a Stripe test account11m 50s
-
(Locked)
Create a subscription form11m 28s
-
(Locked)
Subscribe a user4m 51s
-
(Locked)
Display a user’s subscription status9m 48s
-
(Locked)
Modifying a user’s subscription7m 48s
-
(Locked)
Canceling a subscription9m 25s
-
(Locked)
Setting up a free trial or coupons7m 56s
-
(Locked)
Generate a PDF invoice7m 56s
-
(Locked)
-