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

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/vhosts/federalpolyede.edu.ng/httpdocs_backup/admin_student/postjson_otherpaymentACC.php
<?php
ob_start();

include('headMain2.php');
extract($_POST);
/**
 * Created by PhpStorm.
 * User: adisa
 * Date: 3/2/2016
 * Time: 3:31 PM
 */
//session_start();


//echo $amt.'<br>';
//echo $amtc.'<br>';

require('../connect.php');
$db=db_connect();


$sql_current=$db->query("select * from current where sn=2");
$num_current=$sql_current->rowCount($sql_current);
$row_current=$sql_current->fetch(PDO::FETCH_BOTH);

if ($num_current>0){
    $semester=$_SESSION['asemester']=$row_current['asemester'];
    $asession=$_SESSION['asession']=$row_current['asession'];
}

$_SESSION['payerName']=$payerName;
$_SESSION['payerID']=$_SESSION['idNo']=$regNo=$idNo;
$_SESSION['payerEmail']=$payerEmail;
$_SESSION['payerPhone']=$payerPhone;
$_SESSION['amount']=$amt;
$_SESSION['charges']=$amtc;
$_SESSION['totalAmount']=$amt+$amtc;
//echo $asession=$_SESSION['asession'];
//die();
//echo $paymentType=$ptypek;
$ptype1=explode(',',$_POST['ptype']);
$paymentType=$_SESSION['paymentTYPE']=$ptype1[0];

$specialAspoa="select * from paymentspecial where paymentName='$paymentType' and typeCost<>0";

$specialAspoaQuery=$db->query($specialAspoa);
if ($specialAspoaQuery->rowCount()==1){
    $specialAspoa_fetch=$specialAspoaQuery->fetch(PDO::FETCH_BOTH);
    $_SESSION['amount']=$specialAspoa_fetch['typeCost'];
    $_SESSION['charges']=$specialAspoa_fetch['typecharges'];
    $_SESSION['totalAmount']=$specialAspoa_fetch['totalAmount'];
//    die();
}
//echo $amt.'<br>';
//echo $specialAspoaQuery.'<br>';
// echo $_SESSION['ptype'].'<br>';
//echo $_SESSION['amount'].'<br>';
//echo $_SESSION['charges'].'<br>';
//echo $_SESSION['totalAmount'].'<br>';
////die();

?>
<br>

<div class="col-lg-8 col-lg-offset-2">
    <div class="form-group">
        <label class="col-sm-4 control-label">Payer Name</label>
        <div class="col-sm-8">
            <input type="text" class="form-control" value="<?php echo $_SESSION['payerName']  ;?>"  name="name" >
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-4 control-label">Payer Email</label>
        <div class="col-sm-8">
            <input type="text" class="form-control" value="<?php echo $_SESSION['payerEmail'];?>" name="email" >
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-4 control-label">Payer Phone</label>
        <div class="col-sm-8">
            <input type="text" class="form-control" value="<?php echo $_SESSION['payerPhone'] ;?>" name="phone" >
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-4 control-label">Amount</label>
        <div class="col-sm-8">
            <input type="text" class="form-control" value="<?php echo $_SESSION['amount'] ;?>" name="f_amount" disabled="disabled">
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-4 control-label">Processing Fee</label>
        <div class="col-sm-8">
            <input type="text" class="form-control" value="<?php echo $_SESSION['charges']  ;?>" name="f_charges" disabled="disabled">
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-4 control-label">Total Amount</label>
        <div class="col-sm-8">
            <input type="text" class="form-control" value="<?php echo $_SESSION['totalAmount']  ;?>" name="amount" disabled="disabled">
        </div>
    </div>
    <?php
    include 'remita_constants2.php';
    //require 'remita_constants2_Demo.php';
    $totalAmount = $_SESSION['totalAmount'];

    //die();
    if (( $paymentType=="New Transcript Request") or ( $paymentType=="Reprint Transcript2") or ( $paymentType=="Additional Reprint Transcript")  or ( $paymentType=="Additional Transcript Payment") ){
        $servicetypeId = SERVICETYPEID_TRA;
    }elseif( $paymentType=="Development") {
        $servicetypeId = SERVICETYPEID_DEV;
//    $servicetypeId = SERVICETYPEID_TRA;
    }elseif( $paymentType=="Certificate Levy") {
        $servicetypeId = SERVICETYPEID_CER;
    }elseif( $paymentType=="Accommodation Levy") {
        $servicetypeId = SERVICETYPEID_ACC;
    }elseif( $paymentType=="Student Association/Club Reg.") {
        $servicetypeId = SERVICETYPEID_STU;
    }elseif( $paymentType=="JAMB Regularization") {
        $servicetypeId = SERVICETYPEID_JAM;
    }elseif( $paymentType=="Additional JAMB Regularization") {
        $servicetypeId = SERVICETYPEID_JAM;
    }elseif( $paymentType=="Refund of Turning Advance") {
        $servicetypeId = SERVICETYPEID_REF;
    }elseif( $paymentType=="Change of Course Fee") {
        $servicetypeId = SERVICETYPEID_COC;
    }elseif( $paymentType=="Late Registration Penalty Charges") {
        $servicetypeId = SERVICETYPEID_LRF;
    }elseif( $paymentType=="Registration of contractor") {
        $servicetypeId = SERVICETYPEID_ACC;
        //Created on = 01/03/2016-4:48pm
//}elseif($paymentType=="Tender Fee") {
//    $servicetypeId = SERVICETYPEID_COC;
        //Created on = 01/03/2016-4:48pm
    }else {
        $servicetypeId = SERVICETYPEID_OTH;
    }

    die($servicetypeId);
    $id=substr($payerPhone,8);
    //$id=1;
    $timesammp=DATE("dmyHis");
    if ($id<10){
        $id='0000'.$id;
    }else if($id<100){
        $id='000'.$id;
    }else if($id<1000){
        $id='00'.$id;
    }else if($id<10000){
        $id='0'.$id;
    }else{
        $id=$id;
    }
//    $orderID=mt_rand(10000, 99999).$id.'0';
    //die($orderID);

    $timesammp=DATE("ymd");
    $orderID=$timesammp.mt_rand(1000000, 9999999);

    $payerName = $_POST["payerName"];
    $payerEmail = $_POST["payerEmail"];
    $payerPhone = $_POST["payerPhone"];
    $responseurl = PATH . "/new-receipt-otherPayment.php";
    //$hash_string = MERCHANTID . $servicetypeId . $orderID . $totalAmount . $responseurl . APIKEY;
    //$totalAmount=7000;
    $hash_string = MERCHANTID . $servicetypeId . $orderID . $totalAmount . $responseurl . APIKEY;
    //die();
    $hash = hash('sha512', $hash_string);
    $itemtimestamp = $timesammp;
    $itemid1="itemid1";
    $itemid2="34444".$itemtimestamp;
    $itemid3="8694".$itemtimestamp;

    $beneficiaryName="Federal Polytechnic Ede";
    //$beneficiaryName2="OMEGA PLUS SOLUTIONS LIMITED";
    $beneficiaryName2="Cyberline Computer Technology";

    $beneficiaryAccount="0280451361018";
    //$beneficiaryAccount2="3041858843";
    //$beneficiaryAccount2="2027092585";
    $beneficiaryAccount2="0122927328";

    //$beneficiaryAccount3="4017904612";
    $bankCode="000";
    $bankCode2="035";
    $beneficiaryAmount =$_SESSION['amount'];
    $beneficiaryAmount2 =$_SESSION['charges'];
    //$beneficiaryAmount3 ="0";
    $deductFeeFrom=1;
    $deductFeeFrom2=0;
    /*
    $beneficiaryName="Oshadami Mke";
    $beneficiaryName2="Mujib Ishola";
    $beneficiaryName3="Ogunseye Olarewanju";
    $beneficiaryAccount="6020067886";
    $beneficiaryAccount2="0360883515";
    $beneficiaryAccount3="4017904612";
    $bankCode="011";
    $bankCode2="050";
    $bankCode3="070";
    //$bankCode3="070";
    $beneficiaryAmount =$_SESSION['amount'];
    $beneficiaryAmount2 =$_SESSION['charges'];
    //$beneficiaryAmount3 ="0";
    $deductFeeFrom=1;
    $deductFeeFrom2=0;

    //$deductFeeFrom3=0;
    */
    //The JSON data.

    //echo $paymentType;
    //echo $ptype;
    //echo $servicetypeId;
    //
    //die();
    $content = '{"merchantId":"'. MERCHANTID
        .'"'.',"serviceTypeId":"'.$servicetypeId
        .'"'.",".'"totalAmount":"'.$totalAmount
        .'","hash":"'. $hash
        .'"'.',"orderId":"'.$orderID
        .'"'.",".'"responseurl":"'.$responseurl
        .'","payerName":"'. $payerName
        .'"'.',"payerEmail":"'.$payerEmail
        .'"'.",".'"payerPhone":"'.$payerPhone
        .'","lineItems":[
{"lineItemsId":"'.$itemid1.'","beneficiaryName":"'.$beneficiaryName.'","beneficiaryAccount":"'.$beneficiaryAccount.'","bankCode":"'.$bankCode.'","beneficiaryAmount":"'.$beneficiaryAmount.'","deductFeeFrom":"'.$deductFeeFrom.'"},
{"lineItemsId":"'.$itemid2.'","beneficiaryName":"'.$beneficiaryName2.'","beneficiaryAccount":"'.$beneficiaryAccount2.'","bankCode":"'.$bankCode2.'","beneficiaryAmount":"'.$beneficiaryAmount2.'","deductFeeFrom":"'.$deductFeeFrom2.'"}
]}';
    //die();
    $curl = curl_init(GATEWAYURL);
    curl_setopt($curl, CURLOPT_HEADER, false);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($curl, CURLOPT_HTTPHEADER,
        array("Content-type: application/json"));
    curl_setopt($curl, CURLOPT_POST, true);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $content);

    /*$json_response = curl_exec($curl);
    $status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
    curl_close($curl);
    echo $jsonData = substr($json_response, 6, -1);
     $response = json_decode($jsonData, true);
     $statuscode = $response['statuscode'];
     $statusMsg = $response['status'];
    //echo "am here";

    if($statuscode=='025'){
    $rrr = trim($response['RRR']);
    $new_hash_string = MERCHANTID . $rrr . APIKEY;
    $new_hash = hash('sha512', $new_hash_string);
    */
    //echo $response['amtPaid'];
    //die();
    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
    $json_response = curl_exec($curl);
    $status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
    curl_close($curl);
    //echo $json_response;
    $jsonData = substr($json_response, 6, -1);
    $response = json_decode($jsonData, true);
    //echo var_dump($response);
    $statuscode = $response['statuscode'];
    $statusMsg = $response['status'];


    if($statuscode=='025'){
        $rrr = trim($response['RRR']);
        $new_hash_string = MERCHANTID . $rrr . APIKEY;
        $new_hash = hash('sha512', $new_hash_string);

        echo '<html>
<head>
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/bootstrap-dark.min.css">
</head>
<style type="text/css">
        body {
            background-color: #CFD1DE;
            background-image: url(../images/logo2fade.png);
        }
    </style>
<body>


<form action="'.GATEWAYRRRPAYMENTURL.'" method="POST">
<input id="merchantId" name="merchantId" value="'.MERCHANTID.'" type="hidden"/>
<input id="rrr" name="rrr" value="'.$rrr.'" type="hidden"/>
<input id="responseurl" name="responseurl" value="'.$responseurl.'" type="hidden"/>
<input id="hash" name="hash" value="'.$new_hash.'" type="hidden"/>
<div class="form-group">
	<label class="col-sm-4 control-label">Payment Type</label>
	<div class="col-sm-8">

		<select name="paymenttype" class="form-control">
			<option value=""> -- Select --</option>
			<option value="REMITA_PAY"> Remita Account Transfer</option>
			<option value="Interswitch"> Verve Card</option>
			<option value="UPL"> Visa</option>
			<option value="UPL"> MasterCard</option>
			<option value="PocketMoni"> PocketMoni</option>
			<option value="RRRGEN"> POS</option>
			<option value="ATM"> ATM</option>
			<option value="BANK_BRANCH">BANK BRANCH</option>
			<option value="BANK_INTERNET">BANK INTERNET</option>
		</select>
	</div>
</div>

 <div class="form-group">
	<div class="col-sm-8 col-sm-offset-4">
		<input type="submit" class="btn btn-sm btn-primary" name="submit" value="Submit" />
	</div>
</div>
	</form>


</div>

</body>
</html>';
        //echo "Here _o";

//    echo "Here";
        require('../filetoU/logFile.php');
        $logD='OrderID: '.$orderID.' PaymentType: '.$paymentType;
        logDetail($idNo,$logD);
        $ip2=$_SERVER['HTTP_X_FORWARDED_FOR'];
        $ip1=$_SERVER['REMOTE_ADDR'];
//    $amount=$amount-100;
//    echo "INSERT INTO `fedpoly`.`remitaorder` (`sn`, `orderID`, `remitaRRR`, `transDate`, `transStatus`, `regNo`, `transDetail`, `amtPaid`, `paymentType`, `transApproved`,`clientIP`,`clientProxy`,`descr`,`pay_session`) VALUES  (NULL, '$orderID', '0', '0', '-1', '$regNo', 'Not Yet Approved', '$amt', '$paymentType', 'False','$ip1','$ip2','$pdis','$asession')";
//    die();
        $db->query("INSERT INTO `fedpoly`.`remitaorder` (`sn`, `orderID`, `remitaRRR`,  `transStatus`, `regNo`, `transDetail`, `amtPaid`, `paymentType`, `transApproved`,`clientIP`,`clientProxy`,`descr`,`pay_session`) VALUES  (NULL, '$orderID', '0',  '-1', '$regNo', 'Not Yet Approved', '$amt', '$paymentType', 'False','$ip1','$ip2','$pdis','$asession')");
        $aspoa="INSERT INTO `fedpoly`.`remitaorder_2` (`sn`, `orderID`, `remitaRRR`,  `transStatus`, `regNo`, `transDetail`, `amtPaid`, `paymentType`, `transApproved`,`clientIP`,`clientProxy`,`descr`,`pay_session`) VALUES  (NULL, '$orderID', '0',  '-1', '$regNo', 'Not Yet Approved', '$amtc', '$paymentType', 'False','$ip1','$ip2','$pdis','$asession')";
        $db->query($aspoa);
//    die();
        // $db->query("INSERT INTO `fedpoly`.`remitaorder` (`sn`, `orderID`, `remitaRRR`, `transDate`, `dateCreated`, `transStatus`, `regNo`, `transDetail`, `amtPaid`, `paymentType`, `transApproved`, `bankCode`, `channnel`, `branchCode`, `datesent`, `daterequested`, `clientIP`, `clientProxy`, `descr`, `status`, `pay_session`) VALUES (NULL, '$orderID', '0', '0', CURRENT_TIMESTAMP, '-1', '$formNo', 'Not Yet Approved', '7', '8', '9', '0', '1', '2', '1', '2', '3', '4', '5', '6', '5')");

        //  echo "INSERT INTO `fedpoly`.`remitaorder` (`sn`, `orderID`, `remitaRRR`, `transDate`, `transStatus`, `regNo`, `transDetail`, `amtPaid`, `paymentType`, `transApproved`,`clientIP`,`clientProxy`,`pay_session`) VALUES (NULL, '$orderID', '0', '0', '-1', '$formNo', 'Not Yet Approved', '$amount', '$paymentType', 'False','$ip1','$ip2','2017/2018')";


//    $db->query("UPDATE `fedpoly`.`admitted` SET `email` = '$payerEmail',`gsm` = '$payerPhone',`acceptance`=1 WHERE `admitted`.`formNo` = '$formNo'");

        //  echo "Here";
//    ================ other payment table===================

        $sql="select * from otherpayment where idNo='$regNo'";
        $result=$db->query($sql);
        $num=$result->rowCount();
        if ($num>0){
//    die("here");
//    $dd="UPDATE `fedpoly`.`otherpayment` SET `names` = '$payerName',`email` = '$payerEmail',`phone` = '$payerPhone',`descr` = '$desc',`orderID` = '$orderID' WHERE `otherpayment`.`idNo` ='$idNo' and (`names`='' OR `names`='.')"
//	$db->query($dd);
            $princess=$db->prepare("UPDATE `fedpoly`.`otherpayment` SET `names` = ?,`email` = ?,`phone` = ?,`descr` = ?,`orderID` = ? WHERE `otherpayment`.`idNo` =? and (`names`='' OR `names`='.')");
            $princess->execute([$payerName,$payerEmail,$payerPhone,$pdis,$orderID,$regNo]);
        }else{
            $payerName=str_replace("'","''",$payerName);
            $desc=$pdis;
            $db->query("INSERT INTO `fedpoly`.`otherpayment` (`sn`, `idNo`, `names`, `email`, `phone`,`descr`,`orderID`) VALUES (NULL, '$regNo', '$payerName', '$payerEmail', '$payerPhone','$desc','$orderID')");
        }
//    ===================end of other payment================================================================


    }else{
//    require('../connect.php');
//$db=db_connect();
//        $db->query("INSERT INTO `fedpoly`.`remitaorder` (`sn`, `orderID`, `remitaRRR`, `transDate`, `transStatus`, `regNo`, `transDetail`, `amtPaid`, `paymentType`, `transApproved`,`clientIP`,`clientProxy`,`pay_session`) VALUES  (NULL, '$orderID', '0', '0', '-1', '$formNo', 'Not Yet Approved', '$amount', '$paymentType', 'False','$ip1','$ip2','2019/2020')");
//        echo $aspoa="INSERT INTO `fedpoly`.`remitaorder_2` (`sn`, `orderID`, `remitaRRR`, `transDate`, `transStatus`, `regNo`, `transDetail`, `amtPaid`, `paymentType`, `transApproved`,`clientIP`,`clientProxy`,`pay_session`) VALUES  (NULL, '$orderID', '0', '0', '-1', '$formNo', 'Not Yet Approved', '$amtc', '$paymentType', 'False','$ip1','$ip2','2019/2020')";
//        $db->query($aspoa);

        echo "Error Generating RRR - " .$statusMsg;
        echo $statuscode. '<h2>Kindly exercise patient, the error will be rectified as soon as possible. Thanks</h2>';
        echo $statusMsg;
    }

    ?>
</div>

Youez - 2016 - github.com/yon3zu
LinuXploit