Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64
Your IP : 18.219.12.88
<?php
$txnid = "202411204723012448";
$key = "XV2M3WMH8Z";
$amount = "4445.00";
$email = "saichandu2003@gmail.com";
$phone = "9743188760";
$salt = "20XG6RKN3R";
$hashData = $txnid . "|" . $key . "|" . $amount . "|" . $email . "|" . $phone . "|" . $salt; // Example data
$hash = hash("sha512", $hashData);
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://dashboard.easebuzz.in/transaction/v1/retrieve",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "txnid=$txnid&key=$key&amount=$amount&email=$email&phone=$phone&hash=$hash",
CURLOPT_HTTPHEADER => [
"Accept: application/json",
"Content-Type: application/x-www-form-urlencoded"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
|