Skip to content

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

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PayPal v6 SDK with Braintree Integration Demo

This repository contains sample PayPal integrations for Braintree merchants. It teaches how to use the paypal-checkout-v6 component in the Braintree Client SDK.

Setup Instructions

1. Clone and Setup Environment

git clone https://github.com/paypal-examples/v6-web-sdk-with-braintree-sdk-sample-integration.git
cd v6-web-sdk-with-braintree-sdk-sample-integration
cp .env.sample .env

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

To run the server, choose a server implementation from the server folder at the root of this repository and follow the instructions in that folder's README. For example, for Node.js run:

cd server/node
npm install
npm start

After running the server, go to http://localhost:8081 to see the client examples.

About

Example JavaScript integrations using the Braintree Client SDK with PayPal-Checkout-V6

Topics

Resources

Code of conduct

Stars

Watchers

Forks

Contributors