İşlemleri Sorgula

getTransactions API, belirli bir tarihe göre satış detaylarına ulaşmak için kullanılmaktadır.

Method API Uç Noktası (Endpoint) İçerik-Türü
POST /api/getTransactions application/json

Requestte boş iletmiş olduğunuz parametreleri Hash Key fonksiyonuna Empty String ("") olarak iletmeniz gerekmektedir.


function generateAPIHashKey($merchant_key, $date, $invoiceid, $currency_id, $paymentmethodid, $minamount, $maxamount, $transactionState){

    $data = $date.'|'.$invoiceid.'|'.$currency_id.'|'.$paymentmethodid.'|'.$minamount.'|'.$maxamount.'|'.$transactionState;

    $iv = substr(sha1(mt_rand()), 0, 16);
    $password = sha1($merchant_key);

    $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;
}

Örnek Kodlar

{
  "merchant_key": "$2y$10$w/ODdbTmfubcbUCUq/ia3OoJFMUmkM1UVNBiIQIuLfUlPmaLUT1he",
  "hash_key": "823e40a698c3ca1f:4c80:cYTC/9s5ehGRtGeYyXA0Tw==",
  "date": "2021-02-10",
  "invoiceid": "",
  "currency_id": "",
  "paymentmethodid": "",
  "minamount": "",
  "maxamount": "",
  "transactionState": ""
}