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.
Hash Test Formu #
Aşağıdaki formu kullanarak hash hesaplama işlemini test edebilirsiniz:
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 birbirini 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);var raw = $"{Sx}|{ClientRefCode}|{Amount}|{SuccessUrl}|{FailUrl}|{Rnd}|{CustomerKey}|{merchantSecretKey}";
using var sha512 = SHA512.Create();
HashDatav2 = Convert.ToBase64String(sha512.ComputeHash(Encoding.UTF8.GetBytes(raw)));import hashlib
import base64
# Assuming these variables are defined elsewhere in your code
raw = f"{sx}|{full_name}|{email}|{gsm}|{amount}|{link_expiration_time}|{merchantSecretKey}"
sha512 = hashlib.sha512()
sha512.update(raw.encode('utf-8'))
HashDatav2 = base64.b64encode(sha512.digest()).decode('utf-8')const crypto = require('crypto');
// Assuming these variables are defined elsewhere in your code
const raw = `${sx}|${full_name}|${email}|${gsm}|${amount}|${link_expiration_time}|${merchantSecretKey}`;
const hash = crypto.createHash('sha512');
hash.update(raw, 'utf8');
const HashDatav2 = hash.digest('base64');İ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);var raw = $"{sx}|{referenceCode}|{type}|{amount}|{trxDate}|{merchantSecretKey}";
using var sha512 = SHA512.Create();
HashDatav2 = Convert.ToBase64String(sha512.ComputeHash(Encoding.UTF8.GetBytes(raw)));import hashlib
import base64
# Assuming these variables are defined elsewhere in your code
hashstr = f"{sx}|{referenceCode}|{type}|{amount}|{trxDate}|{merchantSecretKey}"
hash_bytes = hashstr.encode('utf-8')
hashedBytes = hashlib.sha512(hash_bytes).digest()
HashDatav2 = base64.b64encode(hashedBytes).decode('utf-8')const crypto = require('crypto');
// Assuming these variables are defined elsewhere in your code
const raw = `${sx}|${referenceCode}|${type}|${amount}|${trxDate}|${merchantSecretKey}`;
const hash = crypto.createHash('sha512');
hash.update(raw, 'utf8');
const HashDatav2 = hash.digest('base64');Raporlama servisi için Hash oluşturma #
example.php
$hashstr = $sx."|".$startDate."|".$endDate."|".$clientRefCode."|".$merchantSecretKey;
$hash = mb_convert_encoding($hashstr, 'UTF-8');
$hashedBytes = hash("sha512", $hash, true);
$HashDatav2 = base64_encode($hashedBytes);var raw = $"{sx}|{startDate}|{endDate}|{clientRefCode}|{merchantSecretKey}";
using var sha512 = SHA512.Create();
HashDatav2 = Convert.ToBase64String(sha512.ComputeHash(Encoding.UTF8.GetBytes(raw)));
import hashlib
import base64
# Assuming these variables are defined elsewhere in your code
raw = f"{sx}|{startDate}|{endDate}|{clientRefCode}|{merchantSecretKey}"
sha512 = hashlib.sha512()
sha512.update(raw.encode('utf-8'))
HashDatav2 = base64.b64encode(sha512.digest()).decode('utf-8')const crypto = require('crypto');
// Assuming these variables are defined elsewhere in your code
const raw = `${sx}|${startDate}|${endDate}|${clientRefCode}|${merchantSecretKey}`;
const hash = crypto.createHash('sha512');
hash.update(raw, 'utf8');
const HashDatav2 = hash.digest('base64');Pay By Link için Hash oluşturma #
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);var raw = $"{sx}|{full_name}|{email}|{gsm}|{amount}|{link_expiration_time}|{merchantSecretKey}";
using var sha512 = SHA512.Create();
HashDatav2 = Convert.ToBase64String(sha512.ComputeHash(Encoding.UTF8.GetBytes(raw)));
import hashlib
import base64
# Assuming these variables are defined elsewhere in your code
raw = f"{sx}|{startDate}|{endDate}|{clientRefCode}|{merchantSecretKey}"
sha512 = hashlib.sha512()
sha512.update(raw.encode('utf-8'))
HashDatav2 = base64.b64encode(sha512.digest()).decode('utf-8')const crypto = require('crypto');
// Assuming these variables are defined elsewhere in your code
const raw = `${sx}|${startDate}|${endDate}|${clientRefCode}|${merchantSecretKey}`;
const hash = crypto.createHash('sha512');
hash.update(raw, 'utf8');
const HashDatav2 = hash.digest('base64');Düzenli Ödeme için Hash oluşturma #
example.php
$hashstr = $sx."|".$gsm."|".$amount."|".$clientRefCode."|".$merchantSecretKey;
$hash = mb_convert_encoding($hashstr, 'UTF-8');
$hashedBytes = hash("sha512", $hash, true);
$HashDatav2 = base64_encode($hashedBytes);var raw = $"{sx}|{gsm}|{amount}|{clientRefCode}|{merchantSecretKey}";
using var sha512 = SHA512.Create();
HashDatav2 = Convert.ToBase64String(sha512.ComputeHash(Encoding.UTF8.GetBytes(raw)));
import hashlib
import base64
# Assuming these variables are defined elsewhere in your code
raw = f"{sx}|{gsm}|{amount}|{clientRefCode}|{merchantSecretKey}"
sha512 = hashlib.sha512()
sha512.update(raw.encode('utf-8'))
HashDatav2 = base64.b64encode(sha512.digest()).decode('utf-8')const crypto = require('crypto');
// Assuming these variables are defined elsewhere in your code
const raw = `${sx}|${gsm}|${amount}|${clientRefCode}|${merchantSecretKey}`;
const hash = crypto.createHash('sha512');
hash.update(raw, 'utf8');
const HashDatav2 = hash.digest('base64');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);string hashStr = $"{sx}|{instructionNumber}|{merchantSecretKey}";
using var sha512 = SHA512.Create();
HashDatav2 = Convert.ToBase64String(sha512.ComputeHash(Encoding.UTF8.GetBytes(hashStr)));import hashlib
import base64
# Assuming these variables are defined elsewhere in your code
raw = f"{sx}|{InstructionNumber}|{merchantSecretKey}"
sha512 = hashlib.sha512()
sha512.update(raw.encode('utf-8'))
HashDatav2 = base64.b64encode(sha512.digest()).decode('utf-8')const crypto = require('crypto');
// Assuming these variables are defined elsewhere in your code
const raw = `${sx}|${InstructionNumber}|${merchantSecretKey}`;
const hash = crypto.createHash('sha512');
hash.update(raw, 'utf8');
const HashDatav2 = hash.digest('base64');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;