Üye iş yeri için yeni bir PF kaydı eklemek için kullanılmaktadır. Üye iş yerinin benzersiz bir üye iş yeri anahtarı (merchant_key) ile talebi başlatma yetkisine sahip olması gerekir. Ayrıca her istek, daha sonra bir ödeme başlatmak için kullanılabilecek benzersiz bir PF kimliği sağlamalıdır. Eğer PF id sistemde kayıtlı ise kayıt işlemi sonlandırılacaktır. Aşağıda belirtilen işlev, istekle birlikte uygun hash oluşturmak için kullanılmalıdır.
Method | URL | Content-Type |
---|---|---|
POST | Test: https://provisioning.iqmoneytr.com/ccpayment/api/addSubMerchantPF | application/json |
POST | Production: https://app.iqmoneytr.com/ccpayment/api/addSubMerchantPF | application/json |
Parametre | Değer | Şart |
---|---|---|
Header/Authorization | Bearer/string | Zorunlu |
merchant_key | string | Zorunlu |
pf_id | digits:5 | Zorunlu |
name | string | Zorunlu |
vkn | digits:10 | Zorunlu |
tckn | digits:11 | Zorunlu |
city | string | Zorunlu |
address | string | Zorunlu |
iso_country_code | digits:3 | Zorunlu |
post_code | digits:5 | Zorunlu |
site_url | url | Zorunlu |
hash_key | string | Zorunlu |
Authorization , bağlantı girişine izin verildiğini doğrulayan bir başlık anahtarıdır. Yöntem " Bearer " olmalıdır.
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;
}
{
"merchant_key" : "$2y$10$FRKuzQFSml7AxwBpd57Wzu3zVocr7r15vVWIFPpc.JvHhRmmPdnoG",
"pf_id": "10294",
"hash_key":"944357f199c09d70:1481:6ssfvYiTGF2iU3fYFI5F3A==",
"name": "Tony Stark",
"vkn":"0315453065",
"tckn":"23840256753",
"city":"Istanbul",
"address": "Küçükbakkalköy, Kayışdağı Cd. No:1, Allianz Tower No: 13 34752
Ataşehir/İstanbul",
"iso_country_code" : "792",
"post_code": "34752",
"site_url" : "https://stark.Industries.com"
}
{
"status_code": 30,
"status_description": "An entry with this pf id 10294 is already exist but inactive. Please contact support.",
"data": {
"id": 35,
"merchant_id": 9950,
"pf_id": "10294",
"name": "Tony Stark",
"vkn": "0315453065",
"tckn": "23840256753",
"post_code": "34752",
"city": "Istanbul",
"address": "Küçükbakkalköy, Kayışdağı Cd. No:1, Allianz Tower No: 13 34752 Ataşehir/İstanbul",
"iso_country_code": "792",
"site_url" : "https://stark.Industries.com",
"status": 0,
"source": 3,
"created_at": "2021-10-01T14:24:11.000000Z",
"updated_at": "2021-10-01T14:24:11.000000Z"
}
}
Successful
{
"status_code": 100,
"status_description": "PF records is successfully added. To activate the pf record please contact support.",
"data": {
"merchant_id": 9950,
"pf_id": "10294",
"name": "Tony Stark",
"vkn": "0315453065",
"tckn": "23840256753",
"city": "Istanbul",
"address": "Küçükbakkalköy, Kayışdağı Cd. No:1, Allianz Tower No: 13 34752 Ataşehir/İstanbul",
"iso_country_code": "792",
"post_code": "34752",
"site_url" : "https://stark.Industries.com",
"status": 0,
"source": 3,
"updated_at": "2021-10-01T14:26:52.000000Z",
"created_at": "2021-10-01T14:26:52.000000Z",
"id": 36
}
}