May 2018
Intermediate to advanced
470 pages
13h 54m
English
Once the Stripe account connection is successful, in order to complete the OAuth process, we need to use the retrieved auth code to make a POST API call to Stripe OAuth from our server and retrieve the credentials to be stored in the seller's user account for processing charges. The Stripe auth update API receives a request at /api/stripe_auth/:userId and initiates the POST API call to retrieve the credentials from Stripe.
The route for this Stripe auth update API will be declared on the server in user routes as follows.
mern-marketplace/server/routes/user.routes.js:
router.route('/api/stripe_auth/:userId') .put(authCtrl.requireSignin, authCtrl.hasAuthorization, userCtrl.stripe_auth, userCtrl.update)
A request to this ...
Read now
Unlock full access