Skip to content

Hash Response (hashDataV2)

You must check the hashDataV2 information returned to you at the end of each payment transaction…

HashDataV2 is the hash information you need to check at the end of the payment transaction.

The parameters we return to you are as follows. It is important for your security that you create your hash with the method here and compare it with the hash coming from us. If the hashes are not the same, you can terminate the transaction.

The rnd value sent here is different from the value you sent in the request hash. This value is randomly generated by us.

RESPONSE_CODE : 2
RESPONSE_DATA : Transaction Successful.
REFERENCE_CODE : IKSIRPF3938836128
USE_3D : true
MERCHANT_NO : 400000002
AUTH_CODE : S32533320
CLIENT_REFERENCE_CODE : 24809740
TIMESTAMP : 2022-02-24 13:58:36.353
TRANSACTION_AMOUNT : 1.00
AUTHORIZATION_AMOUNT : 1.00
COMMISION : 0.00
COMMISION_RATE : 0.0000
INSTALLMENT : 1
RND : 1645700316156
CURRENCY_CODE : TRY
hashData : NL5R04M8C4sjDNgBUnEZ/RCocEo=
hashDataV2 : Y4GMhUse2gPGV8UlDg6p96SZ7cDYR5mgUIp0p0cp0qbrvd14P4MS30KLlpC6oDbDaHceZ20XIJJdcvxHnOHJNg==

With the variables we post to your Success page…

example.php
$hashstr = $MERCHANT_NO . "|" . $REFERENCE_CODE . "|" . $AUTH_CODE . "|" . $RESPONSE_CODE . "|" . $USE_3D . "|" . $RND . "|" . $INSTALLMENT . "|" . $AUTHORIZATION_AMOUNT . "|" . $CURRENCY_CODE . "|" . $MERCHANTSECRETKEY;
$hash = mb_convert_encoding($hashstr, 'UTF-8');
$hashedBytes = hash("sha512", $hash, true);
$hashDataV2 = base64_encode($hashedBytes);