Vayu Robins
Vayu Robins

Reputation: 168

Update database after Stripe payment has completed successfully

I've managed to set up a simple site with a payment form and the process works fine. I followed this tutorial: https://stripe.com/docs/checkout/quickstart So instead of just showing the success.html HTML page, I would like to store some data in the database, after the payment was completed and change the status of an order. I did have a look at Fulfillment, but I can't seem to understand how that can be integrated into the process. Can someone help me figure out how I might convert the success.html to success.php and do some database action?

Upvotes: 0

Views: 2593

Answers (1)

codename_duchess
codename_duchess

Reputation: 931

Really you want to follow the Fulfillment guide here as this uses Webhooks, which is the safest way to take action upon successful payment. Relying on success_url here is a bad idea because the browser could crash, client could disconnect, etc. Here's another page on Webhooks I recommend reading to get started.

Upvotes: 1

Related Questions