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.138.134.106
<html>
<head>
<title> Custom Form Kit </title>
</head>
<body>
<center>
<?php include('Crypto.php')?>
<?php
error_reporting(0);
$merchant_data='';
//$working_key='4C951A28AAA39C9F123E3897FC1C699E';//Shared by CCAVENUES
//$access_code='AVHI84GC05BH58IHHB';//Shared by CCAVENUES
$appno = $_GET['productinfo'];
$funivcode = "018";
$bank = 'hdfc';
$servername = "logisys.cluster-cv9maxyrxjgg.ap-south-1.rds.amazonaws.com";
$username = "admin";
$password = "Logisys2104";
/*$servername = "localhost";
$username = "root";
$password = "";*/
$dbname = "logisys3_sikkim";
$conn = new mysqli($servername, $username, $password, $dbname);
//IFNULL(cs.ftotalfee,0)
$get_data = "select * from masbank
where fenttype = 'adm' and fbank = '{$bank}'";
$result=$conn->query($get_data);
if (mysqli_num_rows($result) > 0)
{
// output data of each row
while($row = mysqli_fetch_assoc($result))
{
// var_dump($row);
$working_key = $row['fmid'];
$access_code = $row['fkey'];
$website = $row['fwebsite'];
$returnurl = $row['freturnurl'];
}
}
$get_data = "select cs.FROLLNO as fregno, IFNULL(cs.famount,0) as ftotalfee,
control.funivname,pdf_logo_path, FCONTACT_NO as fmobileno,
fname as fname,cs.femail as femail
from control, studadm cs
inner join college c on cs.fcollcode = c.fcollcode
where fappno = '{$appno}'";
$result=$conn->query($get_data);
if (mysqli_num_rows($result) > 0)
{
// output data of each row
while($row = mysqli_fetch_assoc($result))
{
// var_dump($row);
$fregno = $row['fregno'];
$ftotalfee = $row['ftotalfee'];
$fname = $row['fname'];
$fmobileno = $row['fmobileno'];
$femail = $row['femail'];
$funivname = $row['funivname'];
$logo = $row['pdf_logo_path'];
}
}
$_POST['merchant_id'] = $website;
$number = rand(10000000,99999999);
$orderid = "HDFC".$number;
$_POST['order_id'] = $orderid;
$_POST['currency'] = 'INR';
$_POST['amount'] = $ftotalfee;
$query = "update studadm set forderid = '{$orderid}', fpaymentype = '{$bank}' where fappno = '{$appno}'";
$res_update = $conn->query($query);
$protocol = stripos($_SERVER['SERVER_PROTOCOL'],'https') === true ? 'https://' : 'http://';
$url = $protocol.$returnurl;
//$_POST['redirect_url'] = $url;
//$_POST['cancel_url'] = $url;
$_POST['language'] = 'EN';
$_POST['billing_name'] = "Sikkim University";
$_POST['billing_tel'] = $fmobileno;
$_POST['billing_email'] = "abcd@gmail.com";
// merchant_param1
$_POST['merchant_param1'] = $funivcode;
$_POST['merchant_param2'] = $fregno;
$_POST['merchant_param3'] = $appno;
//var_dump($working_key);
//var_dump($_POST);
foreach($_POST as $key => $value){
$merchant_data .= $key.'='.urlencode($value).'&';
}
$merchant_data .= "&redirect_url=".$url."&cancel_url=".$url;
//var_dump($merchant_data);
//die();
$encrypted_data=encrypt($merchant_data,$working_key); // Method for encrypting the data.
//var_dump($encrypted_data);
//die();
//https://test.ccavenue.com/transaction/transaction.do?command=initiateTransaction
//https://secure.ccavenue.com/transaction/transaction.do?command=initiateTransaction
?>
<form method="post" name="redirect" action="https://secure.ccavenue.com/transaction/transaction.do?command=initiateTransaction">
<?php
echo "<input type=hidden name=encRequest value=$encrypted_data>";
echo "<input type=hidden name=access_code value=$access_code>";
?>
</form>
</center>
<script language='javascript'>document.redirect.submit();</script>
</body>
</html>
|