To be used for testing purposes. A simple implementation of the Drop-in using Express.
To install/run:
- clone repo locally
- run
npm install
ornpm i
- create a .env file in the root folder and insert your Braintree SANDBOX API keys + Merchant ID (https://developer.paypal.com/braintree/articles/control-panel/important-gateway-credentials#api-credentials)
- BRAINTREE_MERCHANT_ID='merchantID'
- BRAINTREE_PUBLIC_KEY='publicKey'
- BRAINTREE_PRIVATE_KEY='privateKey'
- (optional) create a PORT='Port number'
- run
nodemon app.js
to run using nodemon (which allows you to make changes without restarting the server) - Navigate to localhost:5000, or, localhost:${PORT} (if you set up a PORT value)