Braintree DropIn API Issue after Linking Braintree Sandbox With Paypal Sandbox

el_barto
Contributor
Contributor

BACKGROUND: I have successfully Linked my Braintree Sandbox with my Paypal Sandbox, however I commented out the "accessToken" and its Corresponding value

 

// Values intentionally Obscured

 

var gateway = braintree.connect({

environment: braintree.Environment.Sandbox,

merchantId: "----------------",

publicKey: "----------------",

privateKey: "--------------------------------"

// accessToken: useYourAccessToken

});

 

This goes against the Set Up Docs Mentioned as per This Link: https://developer.paypal.com/docs/accept-payments/express-checkout/ec-braintree-sdk/server-side/node...

 

When I run My Code I am able to generate a client token and instantiate Braintree's "DropIn" API to display a list of available payment methods. Two Options Show Up:

1. Credit Card

2. Paypal

 

I am able to launch Paypals UI Checkout flow and successfully login and pay via "personal test account"  created in my Paypal Dev Account in the Sandbox category.

 

However When I submit The PaypalAccountNonce received from Braintree's Servers to pass to my WebServer, I get an error a VALIDATION ERROR == "EXPIRED/UNKNOWN NONCE" experienced during transactions using Paypal as the payment checkout method.

 

I decide to uncomment the Paypal "accessToken" from the "gateway"'s substantiation, Deploy the updated server-side code

 

var gateway = braintree.connect({

environment: braintree.Environment.Sandbox,

merchantId: "----------------",

publicKey: "----------------",

privateKey: "--------------------------------"

accessToken: useYourAccessToken

});

 

and run the app on my android emulator. However, when I call Braintree's "DropIn" API, it displays ONE payment method ONLY: Paypal, NO Credit Card button available at all. But NOW when i start Paypals UI Checkout Flow, i am still:

 

1. Able to successfully Login and pay via "personal test account"  created in my Paypal Dev Account in Sandbox category.

2. As Well As Generate a Successful Transaction

 

** By including the "accessToken" (Linked to my paypal sandbox business test account) parameter within my Braintree's "gateway" instantiation I was able to successfully process a paypal transaction. However I STILL face a problem.

 

NEW PROBLEM: I Can Only Display 1 Payment Method (PAYPAL) When invoking Braintree's "DropIn" API. I DON'T have Credit Card as an option and to my understanding, Credit Card is listed as a "Default" Payment Method..

 

NEW 3 PART QUESTION: 1. What am i doing wrong ?

2. is this a Bug Within Paypal's or Braintree's SDK ?

3. How Can Do I fix This ?

Login to Me Too
0 REPLIES 0

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.