0xV3NOMx
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 : 3.145.105.85


Current Path : /var/www/student/gfgcg/
Upload File :
Current File : /var/www/student/gfgcg/CHECK_TxnStatuss.php

<?php
    // following file need to be included
    require_once("Paytm/lib/encdec_paytm.php");
    $orderId = "37677347";
    $merchantMid = "Bengal67365349004712";
    $merchantKey = "JSVPzyZzG_J7bcjM";
    $paytmParams["MID"] = $merchantMid;
    $paytmParams["ORDERID"] = $orderId; 
    $paytmChecksum = getChecksumFromArray($paytmParams, $merchantKey);
    $paytmParams['CHECKSUMHASH'] = urlencode($paytmChecksum);
    $postData = "JsonData=".json_encode($paytmParams, JSON_UNESCAPED_SLASHES);
    $connection = curl_init(); // initiate curl
    // $transactionURL = "https://securegw.paytm.in/merchant-status/getTxnStatus"; // for production
    $transactionURL = "https://securegw-stage.paytm.in/merchant-status/getTxnStatus";
    curl_setopt($connection, CURLOPT_SSL_VERIFYHOST, 0);
    curl_setopt($connection, CURLOPT_SSL_VERIFYPEER, 0);
    curl_setopt($connection, CURLOPT_URL, $transactionURL);
    curl_setopt($connection, CURLOPT_POST, true);
    curl_setopt($connection, CURLOPT_POSTFIELDS, $postData);
    curl_setopt($connection, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($connection, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
    $responseReader = curl_exec($connection);
    $responseData = json_decode($responseReader, true);
    echo "<pre>"; print_r($responseData); echo "</pre>";
?>