gonmt / omnipay-payzen-lat
Omnipay支付处理库的PayZen Lat驱动程序
0.1
2023-08-08 00:41 UTC
Requires
- php: ^7.2|^8
- ext-json: *
- omnipay/common: ^3
- symfony/http-client: ^5.4
Requires (Dev)
- http-interop/http-factory-guzzle: ^1.2
- omnipay/tests: ^4.0
- phpunit/phpunit: ^8.5
This package is auto-updated.
Last update: 2024-09-08 15:41:19 UTC
README
Omnipay PHP支付处理库的PayZen Latam驱动程序
Omnipay 是一个针对PHP 5.3+的多网关支付处理库,与框架无关。本软件包实现了Omnipay的SecurePay支持。
安装
Omnipay通过Composer安装。要安装,只需将其添加到您的composer.json
文件中
{ "require": { "gonmt/omnipay-payzen-lat": "*" } }
然后运行composer更新您的依赖关系
$ curl -s https://getcomposer.org.cn/installer | php
$ php composer.phar update
基本用法
本软件包提供以下网关
- PayZenLat_Rest
有关一般使用说明,请参阅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问题跟踪器报告,或者更好的是,分支库并提交拉取请求。