This repository demonstrates how to process PayPal payments by integrating the Braintree Server/Client SDK with the PayPal v6 Web SDK.
git clone https://github.com/paypal-examples/v6-web-sdk-sample-integration.git
cd v6-web-sdk-with-braintree-sdk-sample-integration
cp .env.sample .env
npm install
- Go to Braintree Sandbox
- Sign up for a free sandbox account
- Note your Merchant ID, Public Key, and Private Key from Settings > API
Edit the .env
file with your Braintree credentials from step
BRAINTREE_SANDBOX_MERCHANT_ID=your_braintree_sandbox_merchant_id_here
BRAINTREE_SANDBOX_MERCHANT_PUBLIC_KEY=your_braintree_sandbox_public_key_here
BRAINTREE_SANDBOX_MERCHANT_PRIVATE_KEY=your_braintree_sandbox_private_key_here
Go to PayPal Developer Portal and create a sandbox business account.
-
Follow the Linking Braintree to PayPal Guide to enable PayPal payments through your Braintree integration.
-
After creating your sandbox account go to the Apps & Credentials section and click on the PayPal application you linked to your Braintree account. Scroll to the "Features" section and make sure the "Vault" and "PayPal and Venmo" boxes are checked.
npm start
Visit http://localhost:8080 to see the demo.