bradtraversy / proshop_mern

Shopping cart built with MERN & Redux
1.99k stars 1.18k forks source link

API / Webhook Question #205

Closed talmax1124 closed 1 year ago

talmax1124 commented 1 year ago

So, a long time ago, I took your course, and just now I've been adding improvements. One of them is adding stripe. But a roadblock comes in the PlaceOrderScreen & its routes. 

So basically, stripe has the successURL, and the failedURL, field. I've contacted stripe to see how to make the stripe checkout function + also how to invoke a function. They basically told me to make a webhook, but I don't know how to do that. 

Is there a way to do the same thing as: but as a webhook?

Screen Shot 2022-07-19 at 5 45 45 AM

Also, I need a form to target the items in the cart property so that I can add them here:  lineItems: [ { price: "price_1LNBmkImEZowwqFqh0t23phS", // replace with a price ID in your account quantity: 1, // directly set it to 1 }, ],