Please wait...

PAYMENT STATUS

"{$MID}" , "ORDERID" => "{$productinfo}", "MERC_UNQ_REF" => "{$appno}"); $checkSum = getChecksumFromArray($requestParamList,'CC_cHhDZDqzUskbQ'); $requestParamList['CHECKSUMHASH'] = urlencode($checkSum); $data_string = "JsonData=".json_encode($requestParamList); $update="update studadm set FPAYMENTREMARKS='{$data_string}' where fappno ='{$appno}'"; $result=$conn->query($update); $ch = curl_init(); // initiate curl //$url = "https://pguat.paytm.com/oltp/HANDLER_INTERNAL/getTxnStatus?"; // where you want to post data $url = "https://secure.paytm.in/oltp/HANDLER_INTERNAL/getTxnStatus?"; // where you want to post data 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); $data = json_decode($output, true); //echo "Checksum matched and following are the transaction details:" . "
"; if ($data["STATUS"] == "TXN_SUCCESS") { $status = $data["STATUS"]; $txnid = $data["TXNID"]; $MID = $data["MID"]; $productinfo = $_POST["ORDERID"]; $appno = $_POST["MERC_UNQ_REF"]; $CHECKSUMHASH = $_POST["CHECKSUMHASH"]; echo "

Thank You. Your order status is success

"; echo "

Your Transaction ID for this transaction is ".$data['TXNID'].".

"; echo "

We have received a payment of Rs. " . $data['TXNAMOUNT'] ."

"; $html="
"; echo $html; $update="update studadm set FPAYMENTSTATUS='success', FPAYMENTID = '{$txnid}',FPAYMENTDATE = now() where fAPPNO ='{$appno}'"; $result=$conn->query($update); } else { echo "Transaction status is failure" . "
"; } } ?>