[Dev] MuOnline Payment Gateway by r00tme

dota-sdso

Well-Known Member
Joined
Apr 30, 2014
Messages
590
Reaction score
822
I am developing MuOnline payment gateway which will be released as soon is completed for free. Only in this forum, of course.

Key facts about the project

First of all it will be UP TO DATE, fully working and free

About the Code
- Procedural Coding
- Strong Security (Encrypted GET variables and IN/OUT)
- SQLSRV Based (Support PHP7)
- Many debugging comments/marks and code explanations
- Bootstrap / Simple and responsive front end

About the Module
- Fully Automated
- Payment History
- Detailed Logs
- Easy Setup

* Can be easily prepared to work with any web

Main Config So Far
PHP:
<?php

//Connection Credentials
$option['sql_user']           = "sa";             // Your SQL username used for connection here
$option['pc_name']            = "r00tme-pc";      // Your PC name here 
$option['sql_db']             = "MuOnline";       // Your SQL database name used for connection here
$option['sql_pass']           = "111";         // Yuor SQL password used for connection here

//Web Session and Tables
$option['web_session']        = "user";           // Web Sessoin that is used in your website
$option['cr_table']           = "Memb_Credits";   // Table name that is used to store credits/wzcoins and so on
$option['cr_column']          = "credits";        // Column name that is used to store credits/wzcoins and so on
$option['cr_user']            = "memb___id";      // Column name that is used to select user

//***************//*************************//***********************************
// PayGol Settings
$option['paygol']             = 1;                                      // 1=ON/0=OFF  / Use this option to switch this module off

// PaymentWall Settings
$option['p_wall']             = 1;                                      // 1=ON/0=OFF  / Use this option to switch this module off

// Mobio Settings
$option['mobio']              = 1;                                      // 1=ON/0=OFF  / Use this option to switch this module off

// Paypal Settings
$option['paypal']             = 1;                                      // 1=ON/0=OFF  / Use this option to switch this module off

// E-Pay Settings
$option['epay']               = 1;                                      // 1=ON/0=OFF  / Use this option to switch this module off

// Fortumo Settings
$option['fortumo']            = 1;                                      // 1=ON/0=OFF  / Use this option to switch this module off
$option['row_p_page']         = 5;                                      // How many rows from transactions table to be displayed on each page
$option['encode_key']         = "^%FL%6710tyTS1*F(&^%#@!";              // Individual(Unique) Security Key used for encryption / Must be changed 
$option['service_id']         = "3dc65d738d97dce5ccdbb351b73ba701";     // This is your service id and can be found in fortumo.com dashboard after adding new service
$option['secret_key']         = "99ad5e42d56909776e7071b4a79c2e40";     // This is your security can and can be found in fortumo.com dashboard after adding new service
                             

//****SQL Connection********//*****************************//*******************
$connectionInfo = array("UID" => $option['sql_user'], "PWD" => $option['sql_pass'], "Database"=>$option['sql_db']);
$serverName = $option['pc_name'];
$conn = sqlsrv_connect($serverName, $connectionInfo);

?>


Fortumo Module
PHP:
<script src="https://assets.fortumo.com/fmp/fortumopay.js" type="text/javascript"></script>


<?php
if (end(explode("/", $_SERVER['PHP_SELF'])) == basename(__FILE__)) {
    header('HTTP/1.0 403 Forbidden');
    exit;
}

$pag          = (isset($_GET['page']) &&  $_GET['page'] > 0) ? (int)$_GET['page'] : 1;
$page         = (int)($pag);
$sql          = sqlsrv_query($conn,"Select * from [MEMB_INFO] where [memb___id] = '".$_SESSION[$option['web_session']]."'",array());
$info         = sqlsrv_fetch_array($sql);
$count_logs   = sqlsrv_query($conn,"Select * from [Payment_Logs] where [account] = '".$_SESSION[$option['web_session']]."' and payment_method = 'Fortumo'",array(),array( "Scrollable" => 'static' ));
$max_pages    = ceil(sqlsrv_num_rows($count_logs)/$option['row_p_page']);
$offset       = ($option['row_p_page'] * ($page - 1)); 
$sql1         = sqlsrv_query($conn,pagination($offset, $option['row_p_page'], "[id],[account],[credits],[data],[date],[payment_method]", "Payment_Logs", "id desc", "id","account='".$_SESSION[$option['web_session']]."' and payment_method = 'Fortumo'"),array());

$mail         = $info['mail_addr'];
$ques         = $info['fpas_ques'];
$answ         = $info['fpas_answ'];
$id           = $info['memb_guid'];
$user         = $_SESSION[$option['web_session']];

echo '	
		<div  class="col-sm-3 col-sm-offset-4">
             <div class="panel panel-default">
                 <div class="panel-heading">
                    <a id="fmp-button" rel='.$option['service_id']."/".encode($user ."/".$mail."/".$ques."/".$answ ."/".ip()."/".$id,$option['encode_key']).'>
					<img src="imgs/fortumos.png" width="160px;" style="cursor:pointer" alt="Mobile Payments by Fortumo" border="0" /></a>
                 </div>					
             </div>
         </div>
        <div class="col-sm-12">
                <div class="panel panel-default">
                    <div class=" panel-heading">
                        <h3  class=" panel-title">
                          <i class="fa fa-window-maximize" aria-hidden="true"></i>Payment History
                        </h3>
                    </div>  
					<div class="panel-body table table-responsive">
                        <table class="table table-striped table-hover ">
                                <tr style="background:#f5f5f5">
                                    <td>#</td>
									<td>Order Date</td>
                                    <td>Credits Added</td>
									<td style="text-align:center">Paid Amount</td>
									<td style="text-align:center">SMS Number</td>
									<td style="text-align:center">Payment IP</td>
									<td style="text-align:center">Transsaction ID</td>
                                </tr>';
								$i = 0;
								while($row = sqlsrv_fetch_array($sql1)){
								$i++;			
                                $rank  = $i+$offset;
                                $data  = json_decode($row['data']);								
								echo '
								    <tr >
                                       <td scope="row">'.$rank.'</td>
								   	   <td>'.date("d-M-y H:i:s",$row['date']).'</td>
                                       <td style="text-align:right">'.number_format($row['credits']).'</td>
								   	   <td style="text-align:right">'.$data[2].'<img src="http://currencyconvertorpro.nanowebapps.com/vendor/images/flags/'.$data[4].'.png" width="20px"/></td>
								   	   <td style="text-align:right">+'.$data[0].'('.$data[3].')</td>
									   <td style="text-align:right">'.$data[6].'</td>
									   <td style="text-align:right">'.$data[5].'</td>
                                   </tr>
								    ';			
								}
								echo "</table></div></div>";
								pagi($page,$max_pages,"?link=6");
?>

ea1ab03d7b8147b1aa6d83e9b622f94d.png

a0c3f37998d848bfa5fbfaa9052ffc4f.png

71a433462b5a468e8284f0181be544f9.png



I haven't decided what payment modules to include yet, so any suggestions are very welcome.

What will have for sure is:
PayPal, E-Pay, PaymentWall, PayGol, Mobio
 
Last edited:

dota-sdso

Well-Known Member
Joined
Apr 30, 2014
Messages
590
Reaction score
822
Let me explain:

To be able to use the system you have to create an account into PayPal, PaymentWall, Fortumo and all other payment systems I was planning to implement, and to set it up properly (this is something individual and can not be created in advance). Then you have to use the settings given by the account to configure the payment system, something that most of you wont be able to do.

As soon I have realised the fact that no matter how good the system is, without understanding of how it works you will find a huge difficulties of using it. I do not want to answer every single stupid question regarding configurations or miss configurations that will follow such release.

So I have decided to stop developing it.
 
Last edited:
  • Like
Reactions: Apfre