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.147.82.108


Current Path : /var/www/results/vskub/
Upload File :
Current File : /var/www/results/vskub/pgResponse.php

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <link rel="shortcut icon" type="image/jpg" href="img/favicon.jpg" />    
    <?php require_once("links/js_files.php");?> 
    <script src="js/candidate_list.js"></script>
    <script type="text/javascript">
        $(function(){
        
          $('.index_label_div').corner("5px").css("border","1px solid #6F6868");    
           $('.messageboard-div').corner("5px").css("border","1px solid #6F6868");  
          $('.reg_no_div').corner("bl br").css("border","1px solid #6F6868");   
          $('#main_message_board').corner("bl br").css("border","1px solid #2596CE");   
          $('.submit_div_button').corner("5px");    
          $('.div_app_form_center_blue').corner("tl tr");
          $('.div_app_form_center_black').corner("tl tr");
          $('#print_app_form').corner("5px");
             
        });
     
</script>

</head>

<body  >
<div id='main_frame'>
    <div class='header_main_div'>
        <?php require_once("links/header.php");?> 
        <div id='main_page_div' style=' text-align: center;'>
        


<?php
header("Pragma: no-cache");
header("Cache-Control: no-cache");
header("Expires: 0");

// following files need to be included
require_once("Paytm/lib/config_paytm.php");
require_once("Paytm/lib/encdec_paytm.php");
//include("sendsmsapi.php");
include("/var/www/config.php");

$paytmChecksum = "";
$paramList = array();
$isValidChecksum = "FALSE";

$servername = SERVERNAME;
$username = USERNAME;
$password = PASSWORD;
$dbname = "logisys3_vku";

/*$servername = "localhost";
$username = "root";
$password = "";
$dbname = "logisys3_dud";*/

$conn = new mysqli($servername, $username, $password, $dbname);

$paramList = $_POST;
//var_dump($paramList);
$paytmChecksum = isset($_POST["CHECKSUMHASH"]) ? $_POST["CHECKSUMHASH"] : ""; //Sent by Paytm pg

$isValidChecksum = verifychecksum_e($paramList, 'EMPM0b9D7egogZbQ', $paytmChecksum); 
echo $isValidChecksum;



if($isValidChecksum == "TRUE") 
{
		$status = $_POST["STATUS"];
		echo $status;
		$orderid = $_POST["ORDERID"];
		$productinfo = $_POST["MERC_UNQ_REF"];
		
		$txnid = $_POST["TXNID"];
		$MID = $_POST["MID"];
		$CHECKSUMHASH = $_POST["CHECKSUMHASH"];
		echo $productinfo;
		//$productinfo = '103E3050155';
		$MID = 'VSKUni69536899513859';
		$requestParamList = array();
		$responseParamList = array();
		
		$requestParamList = array("MID" => "{$MID}" , "ORDERID" => "{$orderid}", "MERC_UNQ_REF" => "{$productinfo}");  

		$checkSum = getChecksumFromArray($requestParamList,'EMPM0b9D7egogZbQ');
		
		$requestParamList['CHECKSUMHASH'] = urlencode($checkSum);

		$data_string = "JsonData=".json_encode($requestParamList);
		$ch = curl_init();                    // initiate curl
		
		//$url = "https://securegw-stage.paytm.in/merchant-status/getTxnStatus"; 
		
		// where you want to post data
		$url = "https://securegw.paytm.in/merchant-status/getTxnStatus"; 

		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);
	
	if ($data["STATUS"] == "TXN_SUCCESS") 
	{
		$status = $data["STATUS"];
		$ORDERID = $data["ORDERID"];
		$productinfo = $data["MERC_UNQ_REF"];
		$txnid = $data["TXNID"];
		$MID = $data["MID"];
		//$CHECKSUMHASH = $data["CHECKSUMHASH"];
		
			$txnid = $data['TXNID'];
			$firstname = 'Paytm';
			
			echo "<h1 style='color:green;'>Thank You. Your order status is success</h1>";
			echo "<h2>Your Transaction ID for this transaction is ".$data['TXNID'].".</h2>";
			echo "<h3>We have received a payment of Rs. " . $data['TXNAMOUNT']  ."</h3>";
			$html = "
			<div class='raval_submit' style='width:241px;float:none; margin: 0 auto;' >
			<span onclick=\"PrintRevaluationApplicationForm('{$productinfo}');\" style='float:left;margin-left:8px;cursor: pointer; line-height: 19px;font-size:14px;font-weight:bold;'>Click here to take a PrintOut</span>
			</div>";
			echo $html;


			 $update = "update res_stud set FPAYMENTREMARKS='{$txnid}',FPAYMENTSTATUS='success',
                    FPAYMENTCONFIRM='success', fackdate = current_date(), funivrecdate = current_date(), 
                    fackuser = '{$firstname}', FCHALLANNO = '{$ORDERID}'
                    where APPNO='{$productinfo}'";


			$result = $conn->query($update); 
		

          
            mysqli_close($conn);
	}
	else 
	{
		echo "<b>Transaction status is failure</b>" . "<br/>";
	}

	/* if (isset($_POST) && count($_POST)>0 )
	{ 
		foreach($_POST as $paramName => $paramValue) {
				echo "<br/>" . $paramName . " = " . $paramValue;
		}
	}
	 */
}
/* else 
{
	echo "<b>Checksum mismatched.</b>";
	//Process transaction as suspicious.
} */

?>
</div>
     
    <?php require_once("links/footer.php");?> 

    </div>
</div>
</br>
</body>
</html>