Steps to use Stripejs for react------
- Create Stripe.com account (https://stripe.com/)
- Read documentation; https://stripe.com/docs/stripe-js/react
- install => npm install --save @stripe/react-stripe-js @stripe/stripe-js
- Goto stripe dashboard, turn on the test mode, go to developer tab
- Get the API Keys (Publishable key/ client secret)
- Follow the instructions in the documentation
- CHeckout Session create api in server side
- Create payment intent using the cart details
- get Checkout session secret from the Checkout Session create api
- Bind that sesson url in the checkout component
- Redirect to the stripe checkout page
In order to create order in the backend with stripe answer we have to do these steps:-
1-Order form => order create in db using order API. 2-Stripe check for payment completion 3-based on stripe answer, update the order status done_______