İçeriğe geç

Request Hash testi (hashDataV2)

paynkolay’a gönderdiğiniz her istekte ilgili hash’i de oluşturup göndermelisiniz. Hash aşağıdaki yöntemlerle hesaplanmaktadır. Size özel sx ve merchantSecretKey bilgilerinizi panelinizden alabilirsiniz.

Aşağıdaki formu kullanarak hash hesaplama işlemini test edebilirsiniz:

Ortak Ödeme ve API’ler için Hash oluşturma

Section titled “Ortak Ödeme ve API’ler için Hash oluşturma”

Hash değerini bize diğer parametreler ile post ettiğinizde, biz de aynı değerleri hashliyoruz. Sizin gönderdiğiniz hash ile bizim ürettiğimiz hash bir birini tutar ise, request’in sizden geldiğini teyit ediyoruz.

example.php
$hashstr = $sx."|".$clientRefCode."|".$amount."|".$successUrl."|".$failUrl."|".$rnd."|".$customerKey."|".$merchantSecretKey;
$hash = mb_convert_encoding($hashstr, 'UTF-8');
$hashedBytes = hash("sha512", $hash, true);
$HashDatav2 = base64_encode($hashedBytes);

İptal-İade servisi için Hash oluşturma

Section titled “İptal-İade servisi için Hash oluşturma”
example.php
$hashstr = $sx."|".$referenceCode."|".$type."|".$amount."|".$trxDate."|".$merchantSecretKey;
$hash = mb_convert_encoding($hashstr, 'UTF-8');
$hashedBytes = hash("sha512", $hash, true);
$HashDatav2 = base64_encode($hashedBytes);
example.php
$hashstr = $sx."|".$startDate."|".$endDate."|".$clientRefCode."|".$merchantSecretKey;
$hash = mb_convert_encoding($hashstr, 'UTF-8');
$hashedBytes = hash("sha512", $hash, true);
$HashDatav2 = base64_encode($hashedBytes);
example.php
$hashstr = $sx."|".$full_name."|".$email."|".$gsm."|".$amount."|".$link_expiration_time."|".$merchantSecretKey;
$hash = mb_convert_encoding($hashstr, 'UTF-8');
$hashedBytes = hash("sha512", $hash, true);
$HashDatav2 = base64_encode($hashedBytes);
example.php
$hashstr = $sx."|".$gsm."|".$amount."|".$clientRefCode."|".$merchantSecretKey;
$hash = mb_convert_encoding($hashstr, 'UTF-8');
$hashedBytes = hash("sha512", $hash, true);
$HashDatav2 = base64_encode($hashedBytes);

Düzenli Ödeme İptal için Hash oluşturma

Section titled “Düzenli Ödeme İptal için Hash oluşturma”
example.php
$hashstr = $sx."|".$InstructionNumber."|".$merchantSecretKey;
$hash = mb_convert_encoding($hashstr, 'UTF-8');
$hashedBytes = hash("sha512", $hash, true);
$HashDatav2 = base64_encode($hashedBytes);

Kayıtlı Kartlar için HashDatav2 Oluşturma

Section titled “Kayıtlı Kartlar için HashDatav2 Oluşturma”

Kart Kayıt Etmek:

$hashstr = $sx."|".$cardNumber."|".$cvv."|".$merchantSecretKey;

Kayıtlı Kartları Listelemek:

$hashstr = $sx."|".$customerKey."|".$merchantSecretKey;

Kayıtlı Kartları Silmek:

$hashstr = $sx."|".$customerKey."|".$tranId."|".$token."|".$merchantSecretKey;

Saklı Karttan Ödeme Almak:

$hashstr = $sx."|".$clientRefCode."|".$amount."|".$successUrl."|".$failUrl."|".$rnd."|".$csCustomerKey."|".$merchantSecretKey;