webtoucher/omnipay-interkassa
Composer 安装命令:
composer require webtoucher/omnipay-interkassa
包简介
InterKassa driver for the Omnipay payment processing library
README 文档
README
InterKassa payment processing driver for the Omnipay PHP payment processing library.
Installation
The preferred way to install this library is through composer.
Either run
$ php composer.phar require webtoucher/omnipay-interkassa "*"
or add
"webtoucher/omnipay-interkassa": "*"
to the require section of your composer.json file.
Usage
The following gateways are provided by this package:
- InterKassa
$gateway = \Omnipay\Omnipay::create('InterKassa'); $gateway->setCheckoutId('[CHECKOUT_ID]'); $gateway->setSignKey('[SIGN_KEY]');
The first step is prepairing data and redirecting to InterKassa. This is example of paiment via Privat 24.
$request = $gateway->purchase([ 'amount' => $amount, 'currency' => 'UAH', 'transactionId' => $orderId, 'description' => "Some description (order $orderId)", 'interface' => 'web', 'action' => 'payway', 'payway' => 'privat24_liqpay_merchant3_uah', 'returnUrl' => "https://mydomain.com/payment/interkassa/success?order=$orderId", 'returnMethod' => 'GET', 'cancelUrl' => 'https://mydomain.com/payment/interkassa/cancel', 'cancelMethod' => 'GET', 'notifyUrl' => 'https://mydomain.com/payment/interkassa/notify', 'notifyMethod' => 'POST', ]); $response = $request->send(); if ($response->isRedirect()) { $response->redirect(); }
There is the notify request handler.
$request = $gateway->completePurchase($_POST); $response = $request->send(); $orderId = $response->getTransactionId(); // You can check this order and mark it as paid. if ($response->isSuccessful()) { // Your handler } else { // Your handler }
For general usage instructions, please see the main Omnipay repository.
Support
If you are having general issues with Omnipay, we suggest posting on Stack Overflow. Be sure to add the omnipay tag so it can be easily found.
If you want to keep up to date with release anouncements, discuss ideas for the project, or ask more detailed questions, there is also a mailing list which you can subscribe to.
If you believe you have found a bug, please report it using the GitHub issue tracker.
统计信息
- 总下载量: 1.73k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2017-07-07