lennon-mudenda / omnipay-dpo
DPO支付驱动程序,用于Omnipay PHP支付处理库
v1.0.0
2024-07-09 04:48 UTC
Requires
- php: ^8.0
- ext-simplexml: *
- dpo/dpo-pay-common: ^1.0
- nyholm/psr7: ^1.8
- omnipay/common: ^3
- php-http/httplug: ^2.4
- symfony/http-client: ^6.0
- vlucas/phpdotenv: ^5.6
Requires (Dev)
- phpstan/phpstan: ^1.11
- phpunit/phpunit: ^9.0
This package is auto-updated.
Last update: 2024-09-09 10:51:56 UTC
README
Omnipay是一组提供在线支付处理一致接口的包。这些包依赖于omnipay/common包以确保提供一致的接口。DPO目前不支持任何网关,这就是为什么这个包被创建的原因。该包旨在确保社区中在Omnipay包中有一个DPO支付网关,并还将产生一个扩展dpo/dpo-pay-common包功能的更新包,该包似乎在功能或灵活性方面有所限制,考虑到大多数PHP项目可能的需求。
安装
您可以通过composer安装此包
composer require lennon-mudenda/omnipay-dpo
使用方法
use Omnipay\DPO\Gateway; // Declare a transaction array here $paymentData = [ 'testMode' => true, // You would need to switch this to false once your application goes live 'amount' => 85, 'paymentCurrency' => 'USD', 'companyToken' => '', // Pass your DPO company token here. 'serviceType' => '', // Pass your DPO product service id here. ]; $gateway = new Gateway(); $request = $gateway->purchase( $paymentData ); $response = $request->send(); // After this you can call methods on the response object. $response->isRedirect(); // Tells you if the response will redirect us to the DPO Payments page. $response->isSuccessful(); // Tells you if the DPO request was successful $response->getMessage(); // Gets the DPO request message $response->getTransactionReference(); // Gets the DPO transaction message $response->isCancelled(); // Tells you if the transaction was cancelled or not
测试
composer test
变更日志
有关最近更改的更多信息,请参阅CHANGELOG。
贡献
有关详细信息,请参阅CONTRIBUTING。
安全
如果您发现任何与安全相关的问题,请通过lensig13@gmail.com发送电子邮件,而不是使用问题跟踪器。
致谢
许可证
MIT许可证(MIT)。有关更多信息,请参阅许可证文件。
PHP包模板
此包使用PHP包模板由Beyond Code生成。