Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Paypal with Braintree saying "Merchant account not found"

I tried integrating PayPal using braintree and following this tutorial. I end up getting an error: Merchant account not found - screenshot.

I am using Swift 3 and Xcode 8.1.

here is my viewDidLoad

These are all required updates in my app:

ScreenShot 1

ScreenShot 2

ScreenShot 3

ScreenShot 4

ScreenShot 5

Any help will be appreciated!

like image 699
Anurag Sharma Avatar asked Jan 20 '17 06:01

Anurag Sharma


People also ask

Do you need a merchant account for Braintree?

However, Braintree provides not only a payment gateway, but a full-stack payments platform to allow you to easily accept payments. This means that when you use Braintree, you do not have to source a payment gateway and merchant account from different providers.

What is a merchant account Braintree?

A merchant account is not a bank account – it's what we use to route funds from your customers' accounts to your business bank account. We provide a merchant account as a part of the Braintree Direct setup.

How do I find my merchant ID Braintree?

How to know your «Merchant Account ID» for the Braintree payment module? Select the «Settings» → «Processing» from the top menu. Scroll the page down to the «Merchant Accounts» section.


2 Answers

This error can also be caused by a gotcha that's easy to miss but simple to fix.

To initialise your client, you generate a client token on your server. When generating this you can optionally pass in a merchant account ID - for example in Java:

ClientTokenRequest clientTokenRequest = new ClientTokenRequest()
                                              .customerId(aCustomerId)
                                              .merchantAccountId(anAccountId);
String clientToken = gateway.clientToken().generate(clientTokenRequest);

There is a subtle but important difference between your merchant ID and the merchant account ID:

From the Braintree Control Panel reference:

Your merchant ID is a unique identifier for your entire gateway account and one of the four API credentials. This value is required for certain actions, such as connecting your API calls to the Braintree gateway or setting up third-party shopping carts.

Your merchant account ID is a unique identifier for a specific merchant account in your gateway. It is used to specify which merchant account to use when creating a transaction, creating a subscription, verifying a payment method, or generating a client token.

Supplying the wrong merchant account ID at client token creation time won't produce an error until you try to perform certain actions, for example, making a payment method request using the paypal vault flow, in which case your client will receive a "422 Unprocessable entity" response with the "Merchant account not found" error message.

like image 107
Jim Riordan Avatar answered Oct 03 '22 01:10

Jim Riordan


In my case it was an issue with my sandbox account, and I solved the same with communicating with braintree support.

ME : I have setup a Braintree sandbox account to make test PayPal payments. The userid is [email protected] I am able to test hosted fields properly using this account, however I get Merchant account not found when I try to use the same client for PayPal. Can you please help me if I am missing any configuration?

Braintree Support : Your Sandbox merchant accounts don't have PayPal enabled which could explain the error you are witnessing. I added PayPal as processor for your default merchant account (MobikonDefault). Please try again and if the problem appears again, I would need you to provide your ClientToken API call and the exact time you reproduced the issue (including timezone).

ME : Thanks, that worked. Although I would like to know if I can do this configuration myself. I did not find any path to do so.

Braintree Support : Thanks for reaching back out to us. Currently, there is no way to set this up from the merchant side - this is a direct configuration on our backend that we have to set up (the one that Elvis set up for you).

like image 25
Anand Vaidya Avatar answered Oct 03 '22 02:10

Anand Vaidya