PayPal error problem when using Braintree with EUR currency (PLN works fine)

rav92
Contributor
Contributor

My last topic was marked as spam, I belive its because I shared my personal email in print screen. Please notify me if reason was another and read whole thing - there is a lot about Braintree but question is about debugging error on PayPal side. I wanted to share whole process so I had to involve Braintree SDK.

 

1. I created PayPal Sandbox Business Account with EUR, USD and PLN enabled.

2. I created Sandbox REST API linked to account above.

3. I linked my Paypal Account in Braintree Sandbox ( https://sandbox.braintreegateway.com/ ) in Account -> My User.

4. I typed in REST API keys in Settings -> Processing -> PayPal.

5. I made sure my default merechant is PLN currency.

6. I created backend methods for ClientToken and ProcessingNounce using Braintree .NET docs.

7. I prepared frontend using dropin from Braintree docs.

Code:

braintree.dropin.create({
   authorization: result.token,
   container: '#dropin-braintree-container',
   paypal: {
   flow: 'checkout',
   amount: '@Model.TransactionDetails.CalculatedTotalPrice',
   currency: 'PLN'
}, function (createErr, instance) { ... /* button listener and processing stuff here */ ... });

The code above works fine! I can finish transaction with Paypal client EUR account, Paypal client PLN, Braintree credit card etc.

 

 

Client told me that he don't want to recive payment in PLN currency, but in EUR, and there I am having a trouble.

I changed line:

currency: 'EUR'

And also I changed default merechant in Braintree to EUR (without changing merechant I was getting "The currency of this PayPal transaction must match the currency of the merchant account (2091)")

 

Now when I try to pay with any PayPal account and any option within I am getting "The customer's bank is unwilling to accept the transaction. For credit/debit card transactions, the customer will need to contact their bank for more details regarding this generic decline; if this is a PayPal transaction, the customer will need to contact PayPal. (Declined: 2046)". I can finish transaction only using braintree sample cards.

paypalerror2-cut.png

 

There is no way to debug this, API Calls in PayPal are telling me something is wrong, but I can't click and view details:

paypalerrors.png

When I switch back to PLN in frontend code and to default PLN merechant in Braintree, transaction works fine again.

 

I wrote ticket to PayPal support with all details and PayPal Debug Id, but they didn't even read what I wrote and told me to test Braintree SDK with Braintree test cards and after I told them again what I need they didn't respond. I need help with that, it's not possible to debug it or get support help. Idk if I am missing some params specific for EUR currency or if its PayPal bug.

 

Thanks for help in advance!

Login to Me Too
2 REPLIES 2

MTS_Justin
Moderator
Moderator
Duplicate post

I've replied to your original post here : https://www.paypal-community.com/t5/Sandbox-Environment/Integration-problem-when-using-Braintree-wit...

Was my post helpful? If so, please give me a kudos!
Login to Me Too

rav92
Contributor
Contributor

Wrong post reply

Login to Me Too

Haven't Found your Answer?

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