Skip to content

paypal-examples/v6-web-sdk-with-braintree-sdk-sample-integration

Repository files navigation

PayPal v6 SDK with Braintree Integration Demo

This repository demonstrates how to process PayPal payments by integrating the Braintree Server/Client SDK with the PayPal v6 Web SDK.

Setup Instructions

1. Clone and Setup Environment

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

2. Create a Braintree Sandbox Account

  1. Go to Braintree Sandbox
  2. Sign up for a free sandbox account
  3. Note your Merchant ID, Public Key, and Private Key from Settings > API

3. Configure Environment Variables

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

4. Create a PayPal Sandbox Business Account

Go to PayPal Developer Portal and create a sandbox business account.

5. Link Braintree Sandbox Account with PayPal sandbox account.

  1. Follow the Linking Braintree to PayPal Guide to enable PayPal payments through your Braintree integration.

  2. 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.

6. Run the Application

npm start

Visit http://localhost:8080 to see the demo.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •