An example PayPal checkout integration using the PayPal NVP server API's. The project uses Node in the Express framework.
-
Install packages:
npm install
-
Customize your API credentials by creating a file ./config/default.json. You can use default-example.json as a starting place.
-
Start the server:
npm start
By default, this runs the app on port
3000
. You can configure the port by setting the environmental variablePORT
. -
Navigate a browser to http://localhost:3000/
Sandbox testing requires a valid PayPal account, sandbox credentials and 1 or more test accounts. Please see the PayPal Sandbox Testing Guide for a full guide on setting up and using the PayPal sandbox.