'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[$funivcode];
$conn = new mysqli($servername, $username, $password, $dbname);
//IFNULL(cs.ftotalfee,0)
$get_data = "select cf.fcollcode, IFNULL(cf.famount,0) as famount, cl.fcollname,control.funivname,pdf_logo_path,
IFNULL(cl.fmobile,'') as fmobileno,IFNULL(cl.femail,'') as femail
from control, collfundtransfer cf
inner join college cl on cl.fcollcode = cf.fcollcode
where fid = '{$appno}'";
//var_dump($get_data);
$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['fcollcode'];
$ftotalfee = $row['famount'];
$fname = $row['fcollname'];
$fmobileno = $row['fmobileno'];
$femail = $row['femail'];
$funivname = $row['funivname'];
$logo = $row['pdf_logo_path'];
}
}
$_POST['merchant_id'] = '195905';
$number = rand(10000000,99999999);
$orderid = "HDFC".$number;
$_POST['order_id'] = $orderid;
$update_order_query = "update collfundtransfer set forderid = '{$orderid}' where fid = '{$appno}'";
$res_update = $conn->query($update_order_query);
$_POST['currency'] = 'INR';
$_POST['amount'] = $ftotalfee;
$protocol = stripos($_SERVER['SERVER_PROTOCOL'],'https') === true ? 'https://' : 'http://';
$_POST['redirect_url'] = $protocol."universitysolutions.in/bcu/hdfc/ccavResponseHandler.php";
$_POST['cancel_url'] = $protocol."universitysolutions.in/bcu/hdfc/ccavResponseHandler.php";
$_POST['language'] = 'EN';
$_POST['billing_name'] = $fname;
$_POST['billing_tel'] = $fmobileno;
$_POST['billing_email'] = $femail;
// merchant_param1
$_POST['merchant_param1'] = $funivcode;
$_POST['merchant_param2'] = $fregno;
$_POST['merchant_param3'] = $appno;
// var_dump($_POST);
// die();
foreach($_POST as $key => $value){
$merchant_data .= $key.'='.urlencode($value).'&';
}
// var_dump($merchant_data);die();
$encrypted_data=encrypt($merchant_data,$working_key); // Method for encrypting the data.
// var_dump($encrypted_data);
?>