Unofficial release. Made by an independent developer.
Simple PHP class to generate URLs for the K&H Bank's payment gateway system.
Contact the K&H Bank for integration details and for necessary setting values before using this.
Information about the integration, codes and the payment process can be found in the official documentation given by the K&H Bank.
This readme contains info about generating URLs for redirect the user to the payment system and getting transaction info.
require 'KHbank.php';
$khtest = new \Payment\KHbank(
1111111111111111, // mid - Given by the bank.
'/folder_to/private_key.pem', // Private key - Public pair is at the Bank
'http://url.to.the.payment.system' // Test or live url - Given by the Bank.
);
// Transaction (order) id - 1
// Amount to pay - 100 HUF
$pu = $khtest->getPayUrl(1, 10000);
// Transaction (order) id - 1
// Amount to reserve - 10 HUF
$re = $khtest->getReserveUrl(1, 1000);
// Transaction (order) id - 1
$te = $khtest->getResultUrl(1);
// Transaction (order) id - 1
$tr = $khtest->getResult(1);
XXXXXX
is an integer (6 digits)
ACK
1
ELFOGADVA / ENGEDELYEZVE
XXXXXX B
NAK
64
A 2. SAV ADATAI HIBASAK !
00000000