digitickets/omnipay-payyo
最新稳定版本:3.0.1.1
Composer 安装命令:
composer require digitickets/omnipay-payyo
包简介
Payyo Gateway for the Omnipay payment processing library
README 文档
README
Payyo Gateway for the Omnipay PHP payment processing library.
Omnipay is a framework agnostic, multi-gateway payment processing library for PHP 5.3+.
The Payyo Omnipay library requires PHP 7.0+.
Installation
Omnipay can be installed using Composer. Installation instructions.
Run the following command to install omnipay and the Payyo gateway:
composer require digitickets/omnipay-payyo
Basic Usage
The following parameters are required:
apiKeyYour Payyo API/public keysecretKeyYour Payyo secret keymerchantIdYour Payyo merchant ID
$gateway = Omnipay::create('Payyo'); $gateway->setApiKey('api_...'); $gateway->setSecretKey('sec_...'); $gateway->setMerchantId('1234'); $gateway->setTestMode(true); // Send purchase request $response = $gateway->purchase([ 'transactionId' => '123456', 'description' => '1x Book', 'amount' => '10.00', 'currency' => 'USD', 'paymentMethods' => ['credit_card'], 'returnUrl' => 'https://example.org/success', 'cancelUrl' => 'https://example.org/abort', ])->send(); // This is a redirect gateway, so redirect right away $response->redirect();
Requests
Purchase
- purchase() calls
paymentPage.initialize, then you should redirect - completePurchase() calls
transaction.getNextActionand (if necessary)transaction.capture
Authorize + Capture
- authorize() calls
paymentPage.initialize, then you should redirect - completeAuthorize() calls
transaction.getDetails - capture() calls
transaction.getNextActionand (if necessary)transaction.capture
Void/Refund
- void() calls
transaction.void - refund() calls
transaction.refund
Testing
You can run docker-compose up and then go to http://localhost:8086/ to make a test payment against the Sandbox.
统计信息
- 总下载量: 21.49k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-09-15