zfr / zfr-stripe-module
用于使用 ZfrStripe 的 Zend Framework 2 模块
v5.0.0
2018-01-04 10:00 UTC
Requires
- php: >=5.4
- zendframework/zend-modulemanager: ^2.8
- zendframework/zend-servicemanager: ^3.0
- zfr/zfr-stripe: ~3.0
Requires (Dev)
- phpunit/phpunit: ~3.7
README
ZfrStripeModule 是一个与 ZfrStripe 集成的 Zend Framework 2 模块。
版本
对于 zend-servicemanager 2 使用版本 4.0
对于 zend-servicemanager 3 及以上版本使用版本 5.0
安装
要安装 ZfrStripeModule,请使用 composer
$ composer require zfr/zfr-stripe-module ^5.0
在您的 application.config.php
中启用 ZfrStripeModule,然后将文件 vendor/zfr/zfr-stripe-module/config/zfr_stripe.local.php.dist
复制到您的应用程序的 config/autoload
目录中(不要忘记从文件名中删除 .dist
扩展名!)。
zf-component-installer
如果您使用 zf-component-installer,该插件将为您安装 ZfrStripeModule 作为模块。
使用
此模块在您的应用程序的服务管理器中注册 ZfrStripe 客户端。您可以通过请求服务 ZfrStripe\Client\StripeClient
来获取它
$stripeClient = $serviceManager->get('ZfrStripe\Client\ZfrStripeClient');
有关 ZfrStripe
的更多信息,请参阅 其文档。