curl --location --request POST 'https://api.freedompay.kg/get_status3.php' \
--form 'pg_merchant_id={{paybox_merchant_id}}' \
--form 'pg_payment_id=123456789' \
--form 'pg_order_id=00102' \
--form 'pg_salt=some random string' \
--form 'pg_sig={{paybox_signature}}'
# Signature example:
'get_status.php;{{paybox_merchant_id}};00102;123456789;some random string;{{secret_key}}'
<?xml version="1.0" encoding="utf-8"?>
<response>
<pg_status>ok</pg_status>
<pg_payment_id>123456789</pg_payment_id>
<pg_can_reject>1</pg_can_reject>
<pg_payment_method>bankcard</pg_payment_method>
<pg_amount>10</pg_amount>
<pg_currency>KZT</pg_currency>
<pg_payment_status>success</pg_payment_status>
<pg_clearing_amount>10</pg_clearing_amount>
<pg_reference>123456789</pg_reference>
<pg_card_name>Card Holder</pg_card_name>
<pg_card_pan>5483-18XX-XXXX-0293</pg_card_pan>
<pg_card_token>ef741cfc-f85e-41a0-84e6-2ba964912182</pg_card_token>
<pg_refund_payments>
<pg_refund_payment>
<pg_payment_id>123456789</pg_payment_id>
<pg_payment_status>success</pg_payment_status>
<pg_amount>-10</pg_amount>
<pg_payment_date>2023-05-31 16:26:36</pg_payment_date>
<pg_reference>123456789</pg_reference>
</pg_refund_payment>
</pg_refund_payments>
<pg_refund_amount>-10</pg_refund_amount>
<pg_captured>1</pg_captured>
<pg_create_date>2023-05-31 16:24:20</pg_create_date>
<pg_salt>some random string</pg_salt>
<pg_sig>your_signature</pg_sig>
</response>
$pg_merchant_id = {{paybox_merchant_id}};
$secret_key = {{paybox_merchant_secret}};
$request = [
'pg_merchant_id'=> $pg_merchant_id,
'pg_payment_id' => 123456789,
'pg_salt' => 'some random string',
];
//generate a signature and add it to the array
ksort($request); // sort alphabetically
array_unshift($request, 'get_status3.php');
array_push($request, $secret_key);
$request['pg_sig'] = md5(implode(';', $request)); // signature
unset($request[0], $request[1]);
$pg_merchant_id = {{paybox_merchant_id}};
$secret_key = {{paybox_merchant_secret}};
$request = [
'pg_merchant_id'=> $pg_merchant_id,
'pg_payment_id' => 12345,
'pg_clearing_amount'=> 10,
'pg_salt' => 'some random string',
];
//generate a signature and add it to the array
ksort($request); // sort alphabetically
array_unshift($request, 'do_capture.php');
array_push($request, $secret_key);
$request['pg_sig'] = md5(implode(';', $request)); // signature
unset($request[0], $request[1]);
$pg_merchant_id = {{paybox_merchant_id}};
$secret_key = {{paybox_merchant_secret}};
$request = [
'pg_merchant_id'=> $pg_merchant_id,
'pg_payment_id' => 12345,
'pg_salt' => 'some random string',
];
//generate a signature and add it to the array
ksort($request); // sort alphabetically
array_unshift($request, 'cancel.php');
array_push($request, $secret_key);
$request['pg_sig'] = md5(implode(';', $request)); // signature
unset($request[0], $request[1]);
$pg_merchant_id = {{paybox_merchant_id}};
$secret_key = {{paybox_merchant_secret}};
$request = [
'pg_merchant_id'=> $pg_merchant_id,
'pg_payment_id' => 12345,
'pg_refund_amount'=> 50,
'pg_salt' => 'some random string',
];
//generate a signature and add it to the array
ksort($request); // sort alphabetically
array_unshift($request, 'revoke.php');
array_push($request, $secret_key);
$request['pg_sig'] = md5(implode(';', $request)); // signature
unset($request[0], $request[1]);