April 2020
Intermediate to advanced
716 pages
18h 55m
English
When a seller connects their Stripe account to the marketplace, we will need to store their Stripe credentials with their other user details so that they can be used later for payment processing when they sell products. To store the Stripe OAuth credentials after a user's Stripe account is successfully connected, we will update the user model that we developed in Chapter 3, Building a Backend with MongoDB, Express, and Node, with the following field.
mern-marketplace/server/models/user.model.js:
stripe_seller: {}
This stripe_seller field will store the seller's Stripe account credentials that were received from Stripe on authentication. This will be used when a charge needs to be processed via Stripe for a product ...
Read now
Unlock full access