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


Current Path : /proc/thread-self/root/var/www/html/cuk/orms_nt_stop/
Upload File :
Current File : //proc/thread-self/root/var/www/html/cuk/orms_nt_stop/verify.php

<?php
//require_once("links/header.php");
?>
<html lang="en">
<head>
	<meta charset="utf-8" />
	<title>ORMS</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' />
	
	<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/home.js" type="text/javascript"></script>
	<script src="js/home2.js" type="text/javascript"></script>
</head>
<body onload="loaddata()">
	<!-- 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="home()" style = 'cursor: pointer;' >Home</span>&nbsp;|&nbsp;<span onclick="logoutsession()" style = 'cursor: pointer;'>Logout</span></span>
				</div>
				<!-- header -->
				<header class="header">
						<h1 id="logo"><a href="#">Logisys</a> 

						<input type = 'hidden' id = 'appno' >
						<input type = 'hidden' id = 'post_id' >
						<input type = 'hidden' id = 'post_subject' >
						
						<span id = "postdata" style = "font-size:18px;margin-left:30%;float:center;"></span>
						</h1>
					<br style="clear:both;"/>
					
					<nav id="navigation" >
						<ul style = "margin-left:3%;">
							<li class=""><a href="#" class="" ></a></li>
							<li class=""><a href="#" ></a></li>
							<li class=""><a href="#"></a></li>
							<li class=""><a href="#"  ></a></li>
							<li class=""><a href="#" ></a></li>
							<li class=""><a href="#"  ></a></li>
							<li class=""><a href="#"  ></a></li>
							<li class=""><a href="#" ></a></li>
							<li class=""><a href="#" ></a></li>
							<li class=""><a href="#"  ></a></li>
							<!-- <li><a href="#">Upload documents</a></li>
							<li><a href="#">Preview</a></li>
							<li><a href="#">Payment</a></li>
							<li>
								<a href="#">Reprint Challan</a>								
							</li> -->
						</ul>
					</nav>
					<div class="cl">&nbsp;</div>
				</header>
				<!-- end of header -->
				<div class="main" id = 'page_main_page' style = "margin-left:3%;margin-right:2%;" >	
				
				<?php /*
		require_once(dirname(__FILE__)."/cconfig.php");
		ini_set("display_errors","On");
		error_reporting(E_ALL ^ E_NOTICE^ E_WARNING);
		require_once("cconfig.php");
		$aobj_context=CConfig::CreateNewDbContext();
		$status=$_POST["status"];
		$firstname  =$_POST["firstname"];
		$amount     =$_POST["amount"];
		$txnid      =$_POST["txnid"];
		$posted_hash=$_POST["hash"];
		$key        =$_POST["key"];
		$productinfo=$_POST["productinfo"];
		$email      =$_POST["email"];
		//$salt = "MQmZaJLHtO";//MQmZaJLHtO
		$salt = "k1pKwbz0em";
		$remarks="";
		
		foreach($_POST as $ak=>$av)
		{
			$remarks.="{$ak} => ".addslashes($av)." \n";
		}
			$update="update postdet set  fpaymentremarks='{$remarks}',
									fpaymentstatus='{$status}',
									ftranid='{$txnid}',
									fpaymentdate = now()	
									where fappno='{$productinfo}'";
					$lobj_update =  $aobj_context->mobj_db->Execute($update);
	 
		If(isset($_POST["additionalCharges"])) 
		{
			$additionalCharges=$_POST["additionalCharges"];
			$retHashSeq = $additionalCharges.'|'.$salt.'|'.$status.'|||||||||||'.$email.'|'.$firstname.'|'.$productinfo.'|'.$amount.'|'.$txnid.'|'.$key;
				
		}
		else 
		{	  
			$retHashSeq = $salt.'|'.$status.'|||||||||||'.$email.'|'.$firstname.'|'.$productinfo.'|'.$amount.'|'.$txnid.'|'.$key;
		}
		$hash = hash("sha512", $retHashSeq);
		//var_dump($posted_hash);
		if ($hash != $posted_hash) 
		{
			echo "<h1 style='color:red;'>Invalid Transaction.Please try again";							   
		}
		else 
		{	
			$get_data=" select fpaymentstatus from postdet 
			where FAPPNO ='{$productinfo}' limit 1";
			$lobj_get_data=$aobj_context->mobj_db->GetRow($get_data);
				//
	 //
			$pay = $lobj_get_data['fpaymentstatus'];	
				
			if($pay == 'success')
			{
					$update="update postdet set  appstatus = 'T' where fappno = '{$productinfo}'";
					$lobj_update =  $aobj_context->mobj_db->Execute($update);
					
					echo " <div class='col-xs-9 center-block' style='float:none;margi:0 auto;'>  <h1 style='color:green;'>Thank You. Your payment status is ". $status ."</h1>";
					echo "<h2>Your Transaction ID for this transaction is ".$txnid.".</h2>";
					echo "<h3>We have received a payment of Rs. " . $amount  ."</h3>";
					$html='<button style = "text-align:center;background-color:lightblue;font-family:italic;" onclick=\'Printapplication("'.$productinfo.'");\' type="button">Print Application</button>';
					$html.='</div> ';
					echo $html; 
			}
			else
			{
				echo "<div id='table_left_div' style='background:#fff;'><div style='height:450px;'><h1 style='color:red;'>Transaction " .$lobj_get_data[fpaymentstatus]. "  Please try again</h1></div></div>";			
			}		
		} */        
	?>	 

<?php

require('razorpay/config.php');
@session_start();

require('razorpay/razorpay-php/Razorpay.php');
use Razorpay\Api\Api;
use Razorpay\Api\Errors\SignatureVerificationError;

$success = true;

$error = "Payment Failed";


if (empty($_POST['razorpay_payment_id']) === false)
{
    $api = new Api($keyId, $keySecret);
   
    try
    {
        // Please note that the razorpay order ID must
        // come from a trusted source (session here, but
        // could be database or something else)

        $attributes = array(
            'razorpay_order_id' => $_SESSION['razorpay_order_id'],
            'razorpay_payment_id' => $_POST['razorpay_payment_id'],
            'razorpay_signature' => $_POST['razorpay_signature']
        );
       // var_dump($attributes);
        $api->utility->verifyPaymentSignature($attributes);
        //var_dump($api);
    }
    catch(SignatureVerificationError $e)
    {
        $success = false;
        $error = 'Razorpay Error : ' . $e->getMessage();
    }
}
//pay_BM9pU1wNQgNrzY
if ($success === true)
{
    $html = "<p>Your payment was successful</p>
             <p>Payment ID: {$_POST['razorpay_payment_id']}</p>";
            $paymentid = $_POST['razorpay_payment_id'];
            $api = new Api($keyId, $keySecret);
            $payment = $api->payment->fetch("{$paymentid}");
      
            $servername = "97.74.228.93";
            $username   = 'logisys3_logu';
            $password  = "Logisys@2106";
            $dbname = 'logisys3_orms_nt';

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

            $status = "success";
            $productinfo = $payment->notes->appno;
            $txnid = $payment->id;

            $payment['TXNAMOUNT'] = ((float)$payment->amount/100);
           
            $firstname = 'razorpay';
            $html = "";
            echo "<h1 style='color:green;'>Thank You. Your order status is success</h1>";
            echo "<h2>Your Transaction ID for this transaction is ".$txnid.".</h2>";
            echo "<h3>We have received a payment of Rs. " . $payment['TXNAMOUNT']  ."</h3>";
            $html="";

           

            
              $button="<button style='font-size: 16px;font-weight: 600;' id='paytmBtn' type='button' class='btn btn-success waves-effect btn-lg' 
              onclick = \"Printapplication('$productinfo')\">Print Application</button>";
			  echo $button;
			  

			  $update = "update postdet set  fpaymentremarks='{$txnid}',
									fpaymentstatus='success',
									fappstatus = 'T',
									ftranid='{$txnid}',
									fpaymentdate = now()	
									where fappno='{$productinfo}'";
				$result=$conn->query($update);
}
else
{
    $html = "<p>Your payment failed</p>
             <p>{$error}</p>";
}

echo $html;
?>

	<div >

					</div>	
				</div>
				<section style="background: url(images/appfromHd.jpg) repeat 0 0;">

				</section>
				<!-- end of main -->
			</div>
			
			<!-- end of container -->			
		</div>
	
	<!-- end of wrappert -->
		<!-- end of shell -->
	</div>
	
	<script src="js/script.js"></script>
	<script src="js/home.js" type="text/javascript"></script>
</body>

</html> 
<!-- END CONTAINER 
<?php
//require_once("links/footer.php");
?>