braintree / braintree_php

Braintree PHP library
https://developer.paypal.com/braintree/docs/start/overview
MIT License
547 stars 224 forks source link

Laravel 10 & PHP 8.1 Not Supported? #335

Closed unsa1nted closed 8 months ago

unsa1nted commented 10 months ago

General information

Issue description

Hello, im new using braintree for laravel, i have sandbox app that use Laravel 10 with PHP 8.1 , i try to install via :

composer require braintree/braintree_php

the package is successfully installed, but i have some problem, i try to explore in google then i've found this blog tutorial :

https://medium.com/zestgeek/braintree-integration-with-laravel-cd9d155f1184

when i try to add in AppServiceProvider.php :

Braintree_Configuration::environment(env('BRAINTREE_ENVIRONMENT'));
Braintree_Configuration::merchantId(env('BRAINTREE_MERCHANT_ID'));
Braintree_Configuration::publicKey(env('BRAINTREE_PUBLIC_KEY'));
Braintree_Configuration::privateKey(env('BRAINTREE_PUBLIC_KEY'));

there is an error like this :

Class "App\Providers\Braintree_Configuration" not found

then i try to add in the header of AppServiceProvider.php

use Braintree_Configuration;

the error is changed like this :

Class "Braintree_Configuration" not found

Please explain to me, is there not yet supported or why? Because my app is currently use Laravel 10 & PHP 8.1 , if i try to downgrade maybe it's wont happend because will use much time again to re-code again into laravel below 10.

Any suggest? Thank you!

hollabaq86 commented 8 months ago

👋 please contact Braintree Support for integration issues. Please keep in mind, we can only support the code we own so we may not be able to walk you through an integration with the Laravel framework