Omnipay: InterKassa
InterKassa payment processing driver for the Omnipay PHP payment processing library., (*1)
, (*2)
Installation
The preferred way to install this library is through composer., (*3)
Either run, (*4)
$ php composer.phar require webtoucher/omnipay-interkassa "*"
or add, (*5)
"webtoucher/omnipay-interkassa": "*"
to the require
section of your composer.json
file., (*6)
Usage
The following gateways are provided by this package:, (*7)
$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., (*8)
$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., (*9)
$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., (*10)
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., (*11)
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., (*12)
If you believe you have found a bug, please report it using the GitHub issue tracker., (*13)