iborodikhin/kazkom-epay

This package is abandoned and no longer maintained. The author suggests using the kolesa-team/qazkom-epay package instead.
There is no license information available for the latest version (dev-master) of this package.

PHP library for Kazakom ePay

dev-master 2017-01-11 02:36 UTC

This package is not auto-updated.

Last update: 2017-01-11 02:42:50 UTC


README

PHP library for Qazkom ePay integration

Library is deprecated

This library is deprecated and no longer supported. Use kolesa-team/qazkom-epay instead.

Installation

$ composer require iborodikhin/kazkom-epay

Basic usage

$client = new \Epay\Client(array(
    'MERCHANT_CERTIFICATE_ID' => 'merchant certificate id',
    'MERCHANT_NAME'           => 'merchant name',
    'PRIVATE_KEY_FN'          => 'private key filename',
    'PRIVATE_KEY_PASS'        => 'private key password',
    'XML_TEMPLATE_FN'         => 'xml template filename',
    'XML_TEMPLATE_CONFIRM_FN' => 'xml confirmation template filename',
    'PUBLIC_KEY_FN'           => 'public key filename',
    'MERCHANT_ID'             => 'merchant id',
));

// Sign request for payment
$signature = $client->processRequest($orderId, $client->getCurrencyId('KZT'), $amount);

// Process payment system response
$result = $client->processResponse($response);

// Confirm request to unblock amount
$result = $client->processConfirmation($reference, $approvalCode, $orderId, $client->getCurrencyId('KZT'), $amount);

More information at https://testpay.kkb.kz/doc/htm/