Alt üye iş yeri PF kaydı, alt üye iş yeri oluşturulduğu zaman inaktif olarak oluşturulur. Webhook servisi aracılığıyla PF işlemleri tamamlandığı zaman ve aktif olduğunda bir bildirim gelir.
Hash_key, üye iş yerinin sitesinden daha fazla doğrulama için gönderilecektir. Şifreleme algoritması aşağıda verilmiştir.
Tip |
Parametre |
URL |
PF Webhook |
any_key_name |
https://merchant.site/getWebook |
Parametreler
Parametre |
Değer |
Örnek |
status_code |
digits |
100 |
merchant_id |
digits |
98950 |
pf_id |
digits |
79520 |
message |
string |
PF Activated |
hash_key |
string |
9fgrtyhs874sgsatardfgs$sdg842tnj2tjj |
hash_key
hash_key hash_key Şifreleme algoritmasını aşağıda görebilirsiniz.
function generateSubMerchantPFHashKey($merchant_key, $pf_id, $app_secret) {
$data = $merchant_key.'|'.$pf_id;
$iv = substr(sha1(mt_rand()), 0, 16);
$password = sha1($app_secret);
$salt = substr(sha1(mt_rand()), 0, 4);
$saltWithPassword = hash('sha256', $password . $salt);
$encrypted = openssl_encrypt(
"$data", 'aes-256-cbc', "$saltWithPassword", null, $iv
);
$msg_encrypted_bundle = "$iv:$salt:$encrypted";
$hash_key = str_replace('/', '__', $msg_encrypted_bundle);
return $hash_key;
}