cancel
Showing results for 
Search instead for 
Did you mean: 

issue with stripe PHP library

issue with stripe PHP library

I installed stripe plugin

I first tried via composer but it doesn't work.

so I installed manually

tar -xvf stripe-magento2-2.5.7.tgz
composer require stripe/stripe-php:^7
 php bin/magento setup:upgrade
 php bin/magento setup:di:compile
 php bin/magento setup:static-content:deploy -f it_IT en_US
 php bin/magento cache:clean && php bin/magento cache:flush 

seems to work, but when I try to enable it doesn't 

main.CRITICAL: The Stripe PHP library dependency has not been installed. Please follow the installation instructions at https://stripe.com/docs/plugins/magento/install#manual [] []
3 REPLIES 3

Re: issue with stripe PHP library

Please once remove your module and tried to reinstall using composer .....

Follow the below link for installation steps using composer:

https://stripe.com/docs/plugins/magento/install

Re: issue with stripe PHP library

thanks for your message.

 

I did it via composer in this way:

 composer require stripe/stripe-payments
 php bin/magento setup:upgrade
 php bin/magento setup:di:compile
 php bin/magento setup:static-content:deploy -f  
 php bin/magento cache:clean && php bin/magento cache:flush

No error on the screen but in the menu, there is no Stripe label and in the exception.log:

[2021-07-10 19:46:58] main.CRITICAL: Class StripeIntegration\Payments\Observer\PredispatchObserver does not exist {"report_id":"f7a00d5a2c4a5d5afa934d7149e4f734739764827232b4846c96fe62d0613b1e","exception":"[object] (ReflectionException(code: -1): Class StripeIntegration\\Payments\\Observer\\PredispatchObserver does not exist at /home/public_html/vendor/magento/framework/Code/Reader/ClassReader.php:26)"} []

 

 

any ideas?

 

regard,

c

 

 

Re: issue with stripe PHP library

Hi @chiara_niero,

 

If you want to do it manually, you need to add the following in lib/internal/Stripe folder of Magento 2 root directory.

 

https://github.com/stripe/stripe-php/tree/master/lib

 

So all files and folders of the above link will be under following folder: 

<magento2-root-directory>/lib/internal/Stripe

 

Then those classes will be autoloaded. Then you can use that stripe classes as follows in your extension.

use Stripe\Account;

 

Hope this can help you! Let me know if you need further assistance.

_________

If issue solved, Click Kudos & Accept as Solution.

LitExtension - #1 Shopping Cart Migration Expert

LitExtension helps store owners and agencies migrate all important data from one eCommerce platform to another accurately, securely and at the highest speed.

Visit website: http://litextension.com/