I need to add the payment system library to my project on Ocrober CMS ( https://github.com/yandex-money/yandex-checkout-sdk-php ). In this regard, the question is:
Can I do this using only the classes of my plugin, or is there a way to automatically integrate this into the project? If so, how can I do this without rewriting namespace and use at the beginning of php files? There is information about this on Github, but it is not clear how to use it.
Install
composer
in yoursystem/server
open terminal
andgo to in your plugin's root folder
for ex.plugins/author/pluginName
composer require stripe/stripe-php
<- use this commandplease replace package as per your need
once package installation is done you are able to use your library, for ex:
$stripeClient = new \Stripe\StripeClient()...
according to your need
in terminal
go to yourplugin's root directory
composer init
-> then fill default infoscomposer require yandex-money/yandex-checkout-sdk-php
if any doubt please comment.