Hash Hesaplama

Request Hash Testi

* Kart saklama hizmeti alınmıyorsa customerKey boş olacaktır.

PHP ile Hash oluşturma

$hashstr = $sx . $clientRefCode . $amount . $successUrl . $failUrl . $rnd . $merchantSecretKey . $customerKey;
$hashData = base64_encode(pack('H*',sha1($hashstr)));
.NET ile Hash oluşturma

String rnd = (DateTime.Now);
String str = sx + clientRefCode + amount + successUrl + failUrl + rnd + merchantSecretKey + customerKey;
System.Security.Cryptography.SHA1 sha = new System.Security.Cryptography.SHA1CryptoServiceProvider();
byte[] bytes = System.Text.Encoding.UTF8.GetBytes(str);
byte[] hashingbytes = sha.ComputeHash(bytes);
String hashData = Convert.ToBase64String(hashingbytes); 

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.