I'm running drupal 8.2.5 with commerce 2.0.
I've downloaded and installed commerce_braintree via drush. I have the php library in place at drupal_root/libraries/braintree_php/lib which was extracted as per the mod page instructions and is at version 2.40.0.
When I go to add a new payment gateway for braintree I get a php error and white screen with message: "Fatal error: Class 'Braintree\Gateway' not found in /home/lciderby/public_html/modules/contrib/commerce_braintree/src/Plugin/Commerce/PaymentGateway/HostedFields.php on line 49".
Any help appreciated. I'm scared of the brave new D8 world ;-)
Comments
Comment #2
bojanz CreditAttribution: bojanz at Centarro commentedStop installing modules via Drush (the "dl" command will be removed from Drush 9 anyway).
Braintree, like all Commerce modules, must be installed via Composer. There is no way to manually extract a library and have it recognized.
"composer require drupal/commerce_braintree ~1.0" is your friend.
Sorry about the outdated project page, I've now updated it.
Comment #3
joegml CreditAttribution: joegml commentedThanx. That appeared to do the trick. I also removed the lib directory drupal_root/libraries/braintree_php for good measure. Anything else to recover from my earlier misstep?
Revised docs on mod page look good.