Closed petlys closed 5 years ago
I was able to reproduce the error you are seeing. It's being caused because you need the whole package, not just the lib directory. I believe the autoload.php file won't work properly if you pull out just the lib directory.
After I included the whole thing, it worked just fine.
If you still have issues with your integration after that, please contact our support team.
Hey, I installed the library via composer composer require braintree/braintree_php
and get the same error. I just can't find the Braintree_Gateway class anywhere, not sure what you meant by "the whole thing".
Have you run the install command? https://developers.braintreepayments.com/start/hello-server/php#or-use-composer
Please reach out to our support team so we can troubleshoot your specific integration https://help.braintreepayments.com
Yeah I did.
I found this in the Gateway.php Class class_alias('Braintree\Gateway', 'Braintree_Gateway');
So I just used the Gateway class instead, and it got me a token, so it seems to work. Thanks.
General information
Issue description
I've downloaded your library directly (i.e from https://developers.braintreepayments.com/client_libraries/php/braintree-php-3.38.0.tgz)
Extracted all the contents of the
lib
folder into abraintree
folder, and created adoPayment.php
script as follows:But I keep getting
Class not found
errors, e.gClass 'Braintree_Gateway' not found
. Been a long time since I did anything in PHP, so might just be a silly mistake somewhere...