webtoucher/omnipay-interkassa

InterKassa driver for the Omnipay payment processing library

v1.0 2017-07-11 08:11 UTC

This package is auto-updated.

Last update: 2024-10-23 20:17:03 UTC


README

InterKassa payment processing driver for the Omnipay PHP payment processing library.

Latest Stable Version Total Downloads Daily Downloads Latest Unstable Version License

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.