In this lesson, we create our Stripe webhook handler.
We first create a generic method to handle any event we receive from Stripe. This requires verifying that the request came from Stripe using a signature that Stripe gives us.
Then, we can handle each event type in its own method handler. We handle the payment success and payment failed types. This lets us update the CoursePurchase object to set it as verified or delete it if the payment fails.
Stripe webhooks: https://stripe.com/docs/webhooks
18 lessons
7 lessons
7 lessons
11 lessons
18 lessons
8 lessons
17 lessons