For a while solving papara payment issues. i think i did everything correctly but curl not responding me..
Here is documentation https://merchant-api.papara.com/
and here is my codes for Qr payment
$paparaID = 123456;
$api_key = 'XXX';
$secure_key = 'XXX';
$environment_url = 'https://merchant-api.papara.com/qrpayments';
$payload = array(
"amount" => 99.99, //opsiyonel
"referenceId" => $paparaID,
"orderDescription" => "Kullanıcının ödeme sayfasında göreceği açıklama",
"notificationUrl" => "https://www.oyuntuccari.com/bakiye/obpapara", //opsiyonel
"redirectUrl" => "https://www.oyuntuccari.com/bakiye/obpapara", //opsiyonel
"currency" => 0 //opsiyonel
);
$header = [
"ApiKey:" . $api_key,
"Content-Type: application/json"
];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $environment_url);
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($payload));
curl_setopt($ch, CURLOPT_FRESH_CONNECT, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 50);
$result = curl_exec($ch);
if (curl_errno($ch)) {
print "Error: " . curl_error($ch);
exit();
}
curl_close($ch);
$result = json_decode($result, 1);
I hope papara developers help me on stackoverflow.