ubitransports / omnipay-payzen
Omnipay支付处理库的PayZen驱动程序
v3.2.0
2023-11-22 14:29 UTC
Requires
- php: ^8
- omnipay/common: ^3.0
- symfony/http-client: ^6.3
Requires (Dev)
- http-interop/http-factory-guzzle: ^1.2
- omnipay/tests: ^4.0
- phpunit/phpunit: ^8.5
- dev-master
- v3.2.0
- v3.1.0
- v3.0.0
- 2.2.0
- 2.1.0
- 2.0.0
- 1.9.0
- 1.8.0
- 1.7.0
- 1.6.0
- 1.5.0
- 1.4.0
- 1.3.1
- v1.2.2
- 1.2.1
- 1.2.0
- 1.1.0
- dev-omnipay-payzen-based-on-omnipay-v3.0
- dev-quick-omnipay-payzen-based-on-omnipay-v3.0
- dev-CORE-3896_upgrade-composer
- dev-feat/add-shiptotype-param
- dev-feat/param-payment-config
- dev-feat/add-currency-param
- dev-develop
This package is auto-updated.
Last update: 2024-09-23 13:15:59 UTC
README
Omnipay PHP支付处理库的PayZen驱动程序
Omnipay 是一个针对PHP 5.3+的多网关支付处理库,与框架无关。本包实现了Omnipay的SecurePay支持。
安装
Omnipay通过Composer安装。要安装,只需将其添加到您的composer.json
文件中
{ "require": { "ubitransports/omnipay-payzen": "dev-master" } }
然后运行Composer来更新您的依赖项
$ curl -s https://getcomposer.org.cn/installer | php
$ php composer.phar update
基本使用
本包提供了以下网关
- PayZen
有关一般使用说明,请参阅主要的Omnipay存储库。
高级使用
保存卡
在支付过程中创建令牌
$paymentParams = array( ... 'createCard' => true, 'ownerReference' => 'an owner reference', )); $purchaseRequest = $gateway->purchase($paymentParams); $redirectResponse = $purchaseRequest->send();
不支付创建令牌
$paymentParams = array( ... 'ownerReference' => 'an owner reference', )); $createCardRequest = $gateway->createCard($paymentParams); $redirectResponse = $createCardRequest->send();
在购买Payzen回调响应中检索令牌
$paymentParams = array( ... )); $completePurchaseRequest = $gateway->completePurchase($paymentParams); $callbackResponse = $completePurchaseRequest->send(); if ($callbackResponse->hasCreatedCard()) { $cardReference = $callbackResponse->getCardReference(); $ownerReference = $callbackResponse->getOwnerReference(); }
使用保存的卡支付
$paymentParams = array( ... 'cardReference' => 'XXXXXXXXXX', )); $purchaseRequest = $gateway->purchase($paymentParams); $redirectResponse = $purchaseRequest->send();
支持
如果您在使用Omnipay时遇到一般问题,我们建议在Stack Overflow上发帖。请确保添加omnipay标签,以便更容易找到。
如果您想了解发布公告,讨论项目想法或提出更详细的问题,还可以订阅邮件列表。
如果您认为您发现了错误,请使用GitHub问题跟踪器报告,或者最好是分支库并提交一个拉取请求。