| Server IP : 172.64.80.1 / Your IP : 172.70.50.62 Web Server : Apache System : Linux mail.federalpolyede.edu.ng 5.10.0-32-amd64 #1 SMP Debian 5.10.223-1 (2024-08-10) x86_64 User : federalpolyede.edu.ng_idh35skikv ( 10000) PHP Version : 7.4.33 Disable Function : opcache_get_status MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/vhosts/federalpolyede.edu.ng/httpdocs_backup/ace_admin_student/ |
Upload File : |
<?php
/**
* Created by PhpStorm.
* User: fpe
* Date: 1/18/2020
* Time: 5:07 PM
*/
session_start();
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Making Payment via eTranzact</title>
</head>
<body topmargin="0" leftmargin="0" >
<?php
//Generate your own unique transId per transaction request.
$time = time();
//$transId = "etz".$time."web";
$id=$_SESSION['sn'];
$pt=$_POST['pt'];
if ($_POST['pt']){
$descr =$_SESSION['paymentType']= $pt;
}else{
// if($_GET[])
}
require_once('eTranConstant_C.php');
$transId=$orderID;
//$orderID="af-ACE19".$id.mt_rand(1000, 9999);
$transId =$orderID;
$payerName=$_POST['payerName'];
$payerEmail=$_POST['payerEmail'];
$payerPhone=$_POST['payerPhone'];
$formNo=$_SESSION['matNo'];
$matNo=$_SESSION['matNo'];
$amount = $_POST['amt'];
//$terminalId = "0000000001"; if ($terminalId == null) $terminalId = "0000000001";
//$responseurl = "http://localhost:81/projects/Webconnect/response.php";
//$responseurl = "https://www.federalpolyede.edu.ng/ace_admin_student/payment.php";
if ($amount == null) $amount = 1000;
$success ="";
//$secret_key="DEMO_KEY";
$str=$amount.$terminalId.$transId.$responseurl.$secret_key;
$checksum=md5($str);
$cheksum=md5($amount.$terminalId.$transId.$responseurl.$secret_key);
//Here holds the form method you are to post into
if ($success == null) { //or success = "" for php
echo "<form method='POST' action='".$eTran."'>";
echo "<input type='hidden' name='TERMINAL_ID' value='" . $terminalId . "'>";
echo "<input type='hidden' name = 'TRANSACTION_ID' value='" . $transId . "'>";
echo "<input type='hidden' name = 'AMOUNT' value='" . $amount . "'>";
echo "<input type='hidden' name = 'DESCRIPTION' value='" . $descr . "'>";
echo "<input type='hidden' name = 'EMAIL' value='".$payerEmail."'>";
echo "<input type='hidden' name = 'CURRENCY_CODE' value='NGN'>";
echo "<input type='hidden' name = 'RESPONSE_URL' value='" . $responseurl . "'>";
echo "<input type='hidden' name = 'CHECKSUM' value='" . $cheksum . "'>";
echo "<input type='hidden' name = 'FULL_NAME' value='".$payerName."'>";
echo "<input type='hidden' name = 'LOGO_URL' value='http://localhost:81/projects/Webconnect/images/elogo.fw.png'>";
echo "<input type='hidden' name = 'PHONENO' value='".$payerPhone."'>";
echo "</form>";
//die();
require('../connect.php');
$db = db_connect();
$channel = $_SESSION['medium'];
require('../filetoU/logFile.php');
$logD = 'OrderID: ' . $orderID . ' ACE_PaymentType: ' . $descr;
logDetail($formNo, $logD);
$ip2 = $_SERVER['HTTP_X_FORWARDED_FOR'];
$ip1 = $_SERVER['REMOTE_ADDR'];
$amount2 = $amount - 1050;
if ($descr == 'aceForm'){
$aspoa = "INSERT INTO `fedpoly`.`ace_remitaorderform` (`sn`, `orderID`, `remitaRRR`, `transDate`, `transStatus`, `regNo`, `transDetail`, `amtPaid`, `paymentType`, `transApproved`,`clientIP`,`clientProxy`,`pay_session`,`channnel`) VALUES (NULL, '$orderID', '0', CURRENT_TIMESTAMP, '-1', '$formNo', 'Not Yet Approved', '$amount2', '$descr', 'False','$ip1','$ip2','2019/2020','$channel')";
$db->query($aspoa);
// die();
}else {
$aspoa = "INSERT INTO `fedpoly`.`ace_remitaorder` (`sn`, `orderID`, `remitaRRR`, `transDate`, `transStatus`, `regNo`, `transDetail`, `amtPaid`, `paymentType`, `transApproved`,`clientIP`,`clientProxy`,`pay_session`,`channnel`) VALUES (NULL, '$orderID', '0', CURRENT_TIMESTAMP, '-1', '$formNo', 'Not Yet Approved', '$amount2', '$descr', 'False','$ip1','$ip2','2019/2020','$channel')";
$db->query($aspoa);
//die($aspoa);
$aspoa2 = "UPDATE `fedpoly`.`ace_admitted` SET `email` = '$payerEmail',`gsm` = '$payerPhone' WHERE `ace_admitted`.`formNo` = '$formNo'";
$db->query($aspoa2);
}
// die($aspoa2);
echo "<script language='javascript'>";
echo "var form = document.forms[0];";
echo "form.submit()</script>";
}else{
echo "Error while requesting for transaction authorisation, Transaction ID no more valid ";
}
?>
</body>
</html>