webtoucher / omnipay-interkassa
InterKassa driver for the Omnipay payment processing library
Installs: 1 732
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 1
Open Issues: 1
Requires
- php: >=5.4.0
- omnipay/common: ~2.0
Requires (Dev)
- omnipay/tests: ~2.0
This package is auto-updated.
Last update: 2024-12-23 20:39:02 UTC
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.