Reputation: 41
I have integrated venmo payment gateway using @paypal/react-paypal-js library it shows venmo is working fine in sandbox environment now I want to switch to the production environment but I can't find way to go live.
Upvotes: 0
Views: 220
Reputation: 30457
In the code that imports react-paypal-js, change your client id from a sandbox one to a live one from the developer dashboard.
In the config for the backend routes that are utilized within <PayPalButtons> (called from the createOrder and onApprove callback functions, respectively), change your credentials to that same live client id and its associated live API secret, and ensure all API endpoints do not contain sandbox.
in their domain.
If you are using actions.order.create
and/or actions.order.capture
from in PayPalButtons, stop doing so -- remove all calls to those functions from your code, they are deprecated. Replace them with calls (typically using fetch) to two backend routes you implement. The standard integration guide has examples of such backend routes in node.js , though any backend language/environment that will respond with JSON over HTTP can be used.
Upvotes: 0