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

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/vhosts/federalpolyede.edu.ng/httpdocs/eace_admin_student/paystack_callback.php
<?php
session_start();
 $descr=$_SESSION['descr'];
$formNo=$_SESSION['formNo'];
$matNo=$_SESSION['matNo'];
$curl = curl_init();
$reference = isset($_GET['reference']) ? $_GET['reference'] : '';
if(!$reference){
    die('No reference supplied');
}


//https://api.paystack.co/transaction/verify/reference
curl_setopt_array($curl, array(
    CURLOPT_URL => "https://api.paystack.co/transaction/verify/" . rawurlencode($reference),
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_SSL_VERIFYPEER=> false,
    CURLOPT_HTTPHEADER => [
        "accept: application/json",
        "authorization: Bearer sk_test_36658e3260b1d1668b563e6d8268e46ad6da3273",
        "cache-control: no-cache"
    ],
));
$response = curl_exec($curl);
$err = curl_error($curl);

if($err){
    // there was an error contacting the Paystack API
    die('Curl returned error: ' . $err);
}
$tranx = json_decode($response);

if(!$tranx->status){
    // there was an error from the API
    die('API returned error: ' . $tranx->message);
}
if('success' == $tranx->data->status){
//  print_r  ($tranx);
    $response_code= ($tranx->status);
    $orderID=$reference;
//    echo $msg=$tranx->message;
//   echo $tranx->data->created_at;
    $trans_num= $tranx->data->id;
   $amt=$tranx->data->amount/100;
    $status_desc=$tranx->data->gateway_response;
    $transDate=$tranx->data->paid_at;
    $transCreated=$tranx->data->created_at;

//    print_r (text['status']);
   //https://api.paystack.co/transaction/verify/DG4uishudoq90LD
?>
<!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 align="left">
                               <b>Receipt ID:</b></td>
                            <td><?php echo $reference;?></td>
</tr>
        <tr class="active">
            <td align="left">
                <b>Transaction ID:</b></td>
            <td><?php echo $trans_num;?></td>
        </tr>
<!--						                        <tr class="active">-->
<!--                            <td >-->
<!--                               GET  Transaction ID:</td>-->
<!--                            <td>--><?php //echo $transids;?><!--</td>-->
<!--                        </tr>-->
<tr class="info">
    <td align="left">
        <b>Transaction Status:</b></td>
    <td><?php echo $status_desc; ?></td>
</tr>
<!--						 <tr class="info">-->
<!--                            <td >-->
<!--                                GET Transaction Status:</td>-->
<!--                            <td>--><?php //echo $status_descs; ?><!--</td>-->
<!--                        </tr>-->
<tr class="active">
    <td align="left">
        <b>Payment Description:</b></td>
    <td><?php echo $descr; ?></td>
</tr>
<!--						                       <tr class="active">-->
<!--                            <td >-->
<!--                                GET Payment Description:</td>-->
<!--                            <td>--><?php //echo $references; ?><!--</td>-->
<!--                        </tr>-->
<tr class="info">
    <td align="left">
        <b> Amount:</b></td>
    <td><?php echo $amt; ?></td>
</tr>
<!--						 <tr class="info">-->
<!--                            <td >-->
<!--                                GET Amount:</td>-->
<!--                            <td>--><?php //echo $amount; ?><!--</td>-->
<!--                        </tr>-->
</table>
<?php
//    echo "here here";
        require_once('../connect.php');
        $db=db_connect();
        require('../filetoU/logFile.php');
//        $orderID=$transid;
        $logD='Payment. OrderID: '.$orderID.' PaymentType: '.$reference;
        logDetail($matNo,$logD);
//    UPDATE `fedpoly`.`eace_remitaorder` SET `remitaRRR` = '',`transDate` = CURRENT_TIMESTAMP,`transStatus` = '',`transDetail` = '',`transApproved` ='' WHERE `eace_remitaorder`.`orderID` =''
    $transApproved='True';
         $ade="UPDATE `fedpoly`.`eace_remitaorder` SET `remitaRRR` = '$trans_num',`transDate` = CURRENT_TIMESTAMP,`transStatus` = '$response_code',`transDetail` = '$msg',`transApproved` ='$transApproved' WHERE `eace_remitaorder`.`orderID` ='$reference'";
        $db->query($ade);


        //=====================Acceptance fees ======================================
        if (($descr == 'Acceptance Fee')) {
            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 eace_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 eace_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`.`eace_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', '4')");
                    }
                }
            }
        }
        //=======================End Acceptance =====================================
//echo $reference;
        if (($descr == 'School Fees')) {
            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 eace_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';
                    }
                }
                //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 eace_realdata where fresher='40' ";
                $matResult = $db->query($matSQL);
                 $matNum = $matResult->rowCount();
                if ($matNum > 0) {
                    $realNo = $matNum + 1;
                    if ($realNo < 10) {
                        $serialNo = '2018' . $levelCode . '0000' . $realNo;
                    } elseif ($realNo < 100) {
                        $serialNo = '2018' . $levelCode . '000' . $realNo;
                    } elseif ($realNo < 1000) {
                        $serialNo = '2018' . $levelCode . '00' . $realNo;
                    } elseif ($realNo < 10000) {
                        $serialNo = '2018' . $levelCode . '0' . $realNo;
                    } else {
                        $serialNo = '2018' . $levelCode . $realNo;
                    }
                } else {
                    $serialNo = '2018' . $levelCode . '00001';
                }
                $newMatNo = 'ACE' . $prefix . $serialNo;
                $real="UPDATE `fedpoly`.`eace_realdata` SET `matNo` = '$newMatNo',`usernamea` = '$newMatNo',`passworda` = '$newMatNo',`fresher` = '40' WHERE `eace_realdata`.`formNo` ='$matNo'";
                $db->query($real);
                 $real2="UPDATE `fedpoly`.`eace_remitaorder` SET `regNo` = '$newMatNo' WHERE `eace_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>';
            }
        }

       //

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




    // transaction was successful...
    // please check other things like whether you already gave value for this ref
    // if the email matches the customer who owns the product etc
    // Give value
} ?>

Youez - 2016 - github.com/yon3zu
LinuXploit