webdna / commerce-braintree

Braintree gateway for Craft Commerce
Other
2 stars 10 forks source link

"Braintree\Exception\Authentication" when clicking on "New subscription plan" in the CP #27

Closed benface closed 4 years ago

benface commented 4 years ago
  1. Create a Braintree gateway.
  2. CP > Commerce > System Settings > Subscription Plans > New subscription plan.
  3. Error: Braintree\Exception\Authentication in vendor/braintree/braintree_php/lib/Braintree/Util.php:56

Versions Craft CMS: 3.4.10.1 (Pro Edition) Craft Commerce: 3.0.12 (Lite Edition) Braintree for Craft Commerce: 2.3.5

mcjackson18 commented 4 years ago

@benface, I'm unable to replicate the issue. Please can you double check your Braintree Merchant ID, Public Key, Private Key and if these are details for your sandbox or live account.

benface commented 4 years ago

@mcjackson18 The Merchant ID, Public Key and Private Key are correct (just compared them to what I see on the Braintree control panel) and they are for a live account. I used environment variables (e.g. $BRAINTREE_MERCHANT_ID), does that change anything?

benface commented 4 years ago

@mcjackson18 Ah, my bad. I had "Test" checked in the gateway settings, so I imagine I should've entered sandbox credentials. When I disable "Test" it works with the live credentials. Still, shouldn't the error be a little more user friendly?

mcjackson18 commented 4 years ago

Glad you managed to get it working, we can look at updating the validation error message.