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 : 18.119.119.81


Current Path : /var/www/html/PrathibhaKaranji_stop/
Upload File :
Current File : /var/www/html/PrathibhaKaranji_stop/pgResponse.php

<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
    <meta
      content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"
      name="viewport"
    />
    <title>PG Online Registration</title>
    <!-- Favicon-->
    <link rel="icon" href="images/favicon.jpg" type="image/x-icon" />

    <!-- Google Fonts -->
    <link
      href="https://fonts.googleapis.com/css?family=Open+Sans:400,600,700,800&amp;subset=latin-ext"
      rel="stylesheet"
    />
    <link
      href="https://fonts.googleapis.com/icon?family=Material+Icons"
      rel="stylesheet"
      type="text/css"
    />

    <!-- Bootstrap Core Css -->
    <link href="plugins/bootstrap/css/bootstrap.css" rel="stylesheet" />

    <!-- Waves Effect Css -->
    <link href="plugins/node-waves/waves.css" rel="stylesheet" />

    <!-- Custom Css -->
    <link href="css/style_adm.css" rel="stylesheet" />

    <!-- AdminBSB Themes. You can choose a theme from css/themes instead of get all themes -->
    <link href="css/themes/all-themes.css" rel="stylesheet" />
    <style>
      .font-16 {
        font-size: 16px !important;
      }
    </style>
  </head>

  <body class="theme-pink" onload="login()">
    <!-- Page Loader -->
    <div class="page-loader-wrapper">
      <div class="loader">
        <div class="preloader">
          <div class="spinner-layer pl-red">
            <div class="circle-clipper left">
              <div class="circle"></div>
            </div>
            <div class="circle-clipper right">
              <div class="circle"></div>
            </div>
          </div>
        </div>
        <p>Please wait...</p>
      </div>
    </div>
    <!-- #END# Page Loader -->
    <!-- Top Bar -->
    <nav class="navbar">
      <div class="container-fluid" style="color: #fff;">
        <div class="col-md-12 m-t--5">
          <center>
            <script type="text/javascript">
              var url = window.location.pathname.split("/");
              if (url[1] == "bnu")
                document.write(
                  '<h2 class="brand" style="margin-left: 50px;">Bengaluru North University</h2>'
                );
              else if (url[1] == "bcu")
                document.write(
                  '<h2 class="brand" style="margin-left: 50px;">Bengaluru Central University ( BCU )</h2>'
                );
            </script>
          </center>
          <center>
            <h3 style="margin-top: -4px;">
              Online Registration for PG Entrance test 2019-20
            </h3>
          </center>
        </div>
      </div>
    </nav>
    <section class="content" style="margin-top: 11%">
      <div class="row clearfix">
                        
      <div class="container-fluid">
          <div class="col-lg-10 col-md-10 col-sm-12 col-xs-12 ">
            <div class="card p-l-20 p-r-20 p-b-20">
              <div class="p-t-10 p-l-10 p-r-10" style="font-size: 15px;">
                        
<?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");


$paytmChecksum = "";
$paramList = array();
$isValidChecksum = "FALSE";
$servername = "97.74.228.93";
$username = "logisys3_logu";
$password = "Logisys@2106";
$dbname = "logisys3_bcu";

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

$conn = new mysqli($servername, $username, $password, $dbname);
//var_dump($conn);
$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, 'a7eKqVQ8PTTJ1GNo', $paytmChecksum); //will return TRUE or FALSE string.
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 = 'Bengal37636018916631';
		$requestParamList = array();
		$responseParamList = array();
		
		$requestParamList = array("MID" => "{$MID}" , "ORDERID" => "{$orderid}", "MERC_UNQ_REF" => "{$productinfo}");  

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

		$data_string = "JsonData=".json_encode($requestParamList);
		$ch = curl_init();                    // initiate curl
		
		//$url = "https://securegw-stage.paytm.in/merchant-status/getTxnStatus"; 
		$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';
			
			$update="update pgstudadm set FPAYREMARKS = '{$txnid}',FPAYID = '{$txnid}', 
            FPAYSTATUS = 'success', FPAYDATE = now()
            where fappno ='{$productinfo}'";
			$result=$conn->query($update);


			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='m-l-10 btn btn-primary waves-effect btn' >
			<span onclick=\"PrintApplicationFormNETBANKING('{$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;
		
	}
	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>
                     
                    </div>
                  </div>
                </div>
              </div>
    </section>
  
  <!-- Modal -->
  
  <script src="plugins/jquery/jquery.min.js"></script>
  
  <!-- Bootstrap Core Js -->
  <script src="plugins/bootstrap/js/bootstrap.js"></script>
  
  <!-- Select Plugin Js -->
  <script src="plugins/bootstrap-select/js/bootstrap-select.js"></script>
  
  <!-- Slimscroll Plugin Js -->
  <script src="plugins/jquery-slimscroll/jquery.slimscroll.js"></script>
  
  <!-- Waves Effect Plugin Js -->
  <script src="plugins/node-waves/waves.js"></script>
  <!-- Custom Js -->
  <script src="js/admin.js"></script>
  <!-- Demo Js -->
  <script src="js/demo.js"></script>
  <script src="js/pg/login.js"></script>
  <script src="js/pg/payment.js"></script>
  <script src="js/pg/reprint.js"></script>
  </body>
  </html>