Magento – JS error with Braintree – no clientToken

magento2

I am trying to implement Braintree payments into a Magento 2.1.2 store.

I have followed these guides to set it up, and added in my merchant ID, public and private key:
http://docs.magento.com/m2/ce/user_guide/payment/braintree.html

In checkout, when I click on the Braintree payment method radio button, I get the following JS error:

braintree-2.17.6.min.js:3 Uncaught Error: Braintree API Client Misconfigured: clientToken required.

Shouldn't the client Token be created OK if I've put in all the keys?

This is running in a local dev environment, is that the issue?

Thanks.

Best Answer

For future Googlers, the problem was I was using incorrect API keys. Remember that if you have Braintree configured to be in Sandbox mode in Magento admin, then you will need to be using Sandbox API keys too.

Related Topic