我需要在Ocrober CMS(https://github.com/yandex-money/yandex-checkout-sdk-php)上的项目中添加支付系统库。在这方面,问题是:
我可以仅使用插件的类来执行此操作,还是可以将其自动集成到项目中?如果是这样,该如何在不重写名称空间的情况下做到这一点,并在php文件的开头使用它?在Github上有关于此的信息,但是尚不清楚如何使用它。
安装composer
在system/server
open terminal
和go to in your plugin's root folder
前。plugins/author/pluginName
composer require stripe/stripe-php
<-使用此命令 please replace package as per your need
软件包安装完成后,您便可以使用您的库,例如: $stripeClient = new \Stripe\StripeClient()...
in terminal
去你的 plugin's root directory
composer init
->然后填写默认信息composer require yandex-money/yandex-checkout-sdk-php
// import
use YandexCheckout\Client;
// use
$client = new Client();
$client->setAuth('shopId', 'secretKey');
如有任何疑问,请发表评论。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句