A payment app and backend using Braintree Auth
The backend consists of an e-commerce portal and a payment app, which is meant to be used together with the web payments extension for Chrome/Opera.
There is also a simple merchant site which can be onboarded through the e-commerce portal and uses the payment app for processing payments.
Here's how to test this code:
You can do this by adding this to your .bashrc
, for instance:
export BRAINTREE_CLIENT_ID='<your client id>'
export BRAINTREE_CLIENT_SECRET='<your client secret>'
openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 999 -nodes
Change this line so that it contains your braintree username instead of tommyt@opera.com
.
npm install
node index.js
By clicking here.
By navigating to https://localhost:9002/payment-app and clicking Install
.
Navigate to https://localhost:9002/portal and log in with the merchant braintree account used in step 3.
Make a sandbox purchase in https://localhost:9002/merchant