Hello. I have followed this tutorial
but i kinda made it another way. I wanted to make it like Paypal.
So i made like this:
C:/www/paygol_report.php
C:/www/pages/paygol.php
Also added here because i saw Paypal had it. But i didnt know excactly what to add.
C:/www/custom_scripts/paygol/config.php
What could be wrong? It works on website.
but i kinda made it another way. I wanted to make it like Paypal.
So i made like this:
C:/www/paygol_report.php
Code:
<?php
$_GET['subtopic'] = 'paygol_report';
$_REQUEST['subtopic'] = 'paygol_report';
include('index.php');
Code:
<?PHP
$main_content .= '
<b>SMS DONATION</b></CENTER><br /><br />
<ol>
<li>Enter your account number.</li>
<li>Choose the amount of points you want.</li>
<li>Click on the red button.</li>
<li>Follow the instructions.</li>
<li>Your points will be added automatically.</li>
</ol>
</br>
<center><b><li>50 Premium Points for 3.0 EUR</li>
<li>125 Premium Points for 6.0 EUR</li>
<li>200 Premium Points for 9.0 EUR</li>
</center></b>
</br>
';
$main_content .= '<center>
<!-- PayGol JavaScript -->
<script src="http://www.paygol.com/micropayment/js/paygol.js" type="text/javascript"></script>
<!-- PayGol Form -->
<form name="pg_frm">
Enter account number:<p>
<input type="text" name="pg_custom" value=""><p>
<input type="hidden" name="pg_serviceid" value="47655">
<input type="hidden" name="pg_currency" value="EUR">
<input type="hidden" name="pg_name" value="Premium Points">
<!-- With Option buttons -->
<input type="radio" name="pg_price" value="1"checked>50 Premium Points<p>
<input type="radio" name="pg_price" value="2">125 Premium Points<p>
<input type="radio" name="pg_price" value="3">200 Premium Points<p>
<input type="hidden" name="pg_return_url" value="http://yankees.zapto.org/index.php?subtopic=shopsystem">
<input type="hidden" name="pg_cancel_url" value="">
<input type="image" name="pg_button" class="paygol" src="http://www.paygol.com/micropayment/img/buttons/125/red_en_pbm.png" border="0" alt="Make payments with PayGol: the easiest way!" title="Make payments with PayGol: the easiest way!" onClick="pg_reDirect(this.form)">
</form> </center>';
?>
Also added here because i saw Paypal had it. But i didnt know excactly what to add.
C:/www/custom_scripts/paygol/config.php
Code:
<?php
/*
Note:Before starting you have to create an account at http://www.paygol.com/register?affiliatecode=T8Y7-LK0M-NY0R-Y6O3
*/
// check that the request comes from PayGol server
if(!in_array($_SERVER['REMOTE_ADDR'],
array('109.70.3.48', '109.70.3.146', '109.70.3.58'))) {
header("HTTP/1.0 403 Forbidden");
die("Error: Unknown IP");
}
// CONFIG
$your_service_id = 47655; // Your service ID from Paygol
// get the variables from PayGol system
$message_id = $_GET['message_id'];
$service_id = $_GET['service_id'];
$shortcode = $_GET['shortcode'];
$keyword = $_GET['keyword'];
$message = $_GET['message'];
$sender = $_GET['sender'];
$operator = $_GET['operator'];
$country = $_GET['country'];
$custom = $_GET['custom'];
$points = $_GET['points'];
$price = $_GET['price'];
$currency = $_GET['currency'];
//Replace these parameters by your database details
$dbhost = "127.0.0.1"; //Your database domain
$dbuser = "root"; //Database username
$dbpassword = "test"; //Database password
$db = "theforgottenserver"; //Database name
if ($your_service_id == $service_id) {
//Connect to Database
$conn = mysql_connect($dbhost, $dbuser, $dbpassword);
mysql_select_db($db);
$sql = "UPDATE accounts SET premium_points = premium_points+'".mysql_real_escape_string($points)."' WHERE name = '".mysql_real_escape_string($custom)."'";
mysql_query($sql);
mysql_close($conn);
}
?>
What could be wrong? It works on website.