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.144.123.61
Current Path : /var/www/html/gug/ |
| Current File : /var/www/html/gug/verify_1.php |
<html>
<head>
<title>Examination Automation</title>
<meta http-equiv="cache-control" content="max-age=0" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="0" />
<meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" />
<meta http-equiv="pragma" content="no-cache" />
<!-- css files-->
<link rel="shortcut icon" type="image/jpg" href="images/tarka_favicon.jpg" />
<link rel="stylesheet" type="text/css" href="css/main.css" />
<link rel="stylesheet" type="text/css" href="css/loginpage.css" />
<!-- <link rel="stylesheet" type="text/css" href="css/jquery.alerts.css" /> -->
<link rel="stylesheet" type="text/css" href="JQGrid3.5/css/jquery-ui-1.7.2.custom.css" />
<!--javascript files-->
<script type="text/javascript" src="js/checkbrowser.js"></script>
<script type="text/javascript" src="JQGrid3.5/js/jquery-1.3.2.js"></script>
<!-- <script type="text/javascript" src="JQGrid3.5/js/jquery-ui-1.7.2.custom.min.js"></script> -->
<script type="text/javascript" src ="js/index.js?v=21092018" ></script>
<script src="libs/jquery.jclock-1.2.0.js.txt" type="text/javascript"></script>
<!-- <script type="text/javascript" src="js/base_file/spinner.js"></script> -->
<script type="text/javascript">
/*
$(function(){
// Dialog
$('#dialog').dialog({
autoOpen: false,
modal: true,
width: 600,
buttons: {
"Ok": function() {
$(this).dialog("close");
},
"Cancel": function() {
$(this).dialog("close");
}
}
});
});
*/
$(function($) {
$('.jclock').jclock();
});
</script>
</head>
<body onload="loadwindow()" onkeydown="dologin(event)">
<div class="mainbody" align="center">
<!-- Header div part-->
<div class="header">
<div class="header-top">
<div class="logo" align="left"></div>
<div class="headerDetails" align="right">
<div class="tarka-site">
</div>
</div>
</div>
<div class="header-bottom">
<div style="float:left;"></div>
<div class="package" style="margin-left:2px;" ><span id='university_name'></span></div>
<div class="MainMenu" id="system_menu"></div>
</div>
<div id='tarka_menu_html_div' style="display:none"> </div>
</div>
<!-- End Header div part-->
<!--Main Contents Div -->
<div class="contents">
<div class="loginpage_main__div">
<br/>
<?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']
);
$api->utility->verifyPaymentSignature($attributes);
//var_dump($api);
}
catch(SignatureVerificationError $e)
{
$success = false;
$error = 'Razorpay Error : ' . $e->getMessage();
}
}
if ($success === true)
{
$html = "<p>Your payment was successful</p>
<p>Payment ID: {$_POST['razorpay_payment_id']}</p>";
// use Razorpay\Api\Api;
$paymentid = $_POST['razorpay_payment_id'];
$api = new Api('rzp_live_2gp0OHXko2psqf', '3gpdKlvGZMScC73py7qaIlUZ');
$payment = $api->payment->fetch("{$paymentid}");
$servername = "97.74.228.93";
$username = "logisys3_logu";
$password = "Logisys@2106";
/* $servername = "localhost";
$username = "root";
$password = "";*/
$dbname = "logisys3_comexam";
$conn = new mysqli($servername, $username, $password, $dbname);
$get_data = "select * from dbname where ifnull(fdeleted,'') <> 'T'";
$result1=$conn->query($get_data);
if (mysqli_num_rows($result1) > 0)
{
// output data of each row
$dbnames = array();
while($row = mysqli_fetch_assoc($result1))
{
$dbnames[$row['FUNIVCODE']] = $row['FDBNAME'];
}
}
mysqli_close($conn);
/* $servername = "97.74.228.93";
$username = "logisys3_logu";
$password = "Logisys@2106";*/
$servername = "localhost";
$username = "root";
$password = "";
$dbname = $dbnames[$payment->notes->univcode];
$conn = new mysqli($servername, $username, $password, $dbname);
$status = "success";
$productinfo = $payment->notes->appno;
$txnid = $payment->id;
$orderid = $payment->notes->order_id;
$orderid = $payment->notes->order_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>";
$update="update collfundtransfer set fpaymentremarks = '{$txnid}',fpaymentstatus = 'success'
where fid ='{$productinfo}'";
$result=$conn->query($update);
mysqli_close($conn);
}
else
{
$html = "<p>Your payment failed</p>
<p>{$error}</p>";
}
echo $html;
?>
</div>
<!-- login page main div-->
</div>
<!-- End Main Contents Div -->
<!-- Footer Div-->
<div class="footer"></div>
<div id="dialog" title=""></div>
</div>
</body>
</html>
|