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.116.13.192
Current Path : /var/www/html/gug/ |
| Current File : /var/www/html/gug/CHECK_TxnStatuss.php |
<?php
header("Pragma: no-cache");
header("Cache-Control: no-cache");
header("Expires: 0");
// following files need to be included
//require_once("./lib/config_paytm.php");
require_once("./lib/encdec_paytm.php");
$ORDER_ID = "";
$requestParamList = array();
$responseParamList = array();
$requestParamList = array("MID" => "COGNIT81026571732998" , "ORDERID" => "xxxxx");
$checkSum = getChecksumFromArray($requestParamList,"NYvcn5jnUPIpRHQR");
$requestParamList['CHECKSUMHASH'] = urlencode($checkSum);
$data_string = "JsonData=".json_encode($requestParamList);
echo $data_string;
$ch = curl_init(); // initiate curl
//$url = PAYTM_STATUS_QUERY_URL; //Live server where you want to post data
$url = "https://securegw-stage.paytm.in/merchant-status/getTxnStatus?"; //staging server
//$url = "https://securegw.paytm.in/merchant-status/getTxnStatus?"; // Live server
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_POST, true); // tell curl you want to post something
curl_setopt($ch, CURLOPT_POSTFIELDS,$data_string); // define what you want to post
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // return the output in string format
$headers = array();
$headers[] = 'Content-Type: application/json';
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$output = curl_exec($ch); // execute
$info = curl_getinfo($ch);
//echo "kkk".$output;
$data = json_decode($output, true);
echo "<pre>";
print_r($data);
echo "</pre>";
?>
|