Hello,
A wile ago i created a tutorial for Paygol to Gesior.
The same installation as : http://otland.net/threads/paygol-complete-tutorial-with-photos-and-scripts.186213/
But use this scripts instead:
(Don't ask me how to do, just read the old thread that i linked to how to install. Just use this scripts for Znote.)
NOTE: This scripts use mysql_* and that is not supported in the new version of Znote AAC. It is not hard to change, so do not ask for it please. Just change the mysql to mysqli.
paygol.php
paygolshop.php
A wile ago i created a tutorial for Paygol to Gesior.
The same installation as : http://otland.net/threads/paygol-complete-tutorial-with-photos-and-scripts.186213/
But use this scripts instead:
(Don't ask me how to do, just read the old thread that i linked to how to install. Just use this scripts for Znote.)
NOTE: This scripts use mysql_* and that is not supported in the new version of Znote AAC. It is not hard to change, so do not ask for it please. Just change the mysql to mysqli.
paygol.php
PHP:
<?php
// Znote PayGol automatic points.
require_once 'engine/init.php';
include 'layout/overall/header.php';
$my_id = 86647; // This is paygol service ID
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");
} else
{
$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'];
if ($my_id == $service_id)
{
function accNameToId($acc) {
$query = ("SELECT `id` FROM `accounts` WHERE `name`='$acc'");
$result = mysql_query($query) or die(var_dump($query)."<br>(query - <font color='red'>SQL error</font>) <br>Type: <b>select_single</b> (select single row from database)<br><br>".mysql_error());
$row = mysql_fetch_assoc($result);
return $row['id'];
}
mysql_query("UPDATE znote_accounts SET points = points+'".mysql_real_escape_string($points)."' WHERE account_id = '".mysql_real_escape_string(accNameToId($custom))."'");
} else
{
die("Service not recognized.");
}
}
?>
paygolshop.php
Code:
<?PHP
require_once 'engine/init.php';
include 'layout/overall/header.php';
// Select single row from database
echo '
<b>SMS DONATION</b></CENTER><br /><br />
<ol>
<li>Enter your account number.</li>
<li>Choose your payment price.</li>
<li>Click on the red Pay by mobile button.</li>
<li>Follow the instructions.</li>
<li>Your points will be added automatically.</li>
<li>DONT FORGET TO PUT IN YOUR ACCOUNT NUMBER! IF YOU DONT DO IT YOU WONT GET ANY POINTS!</li>
<li>IF YOU FORGET TO PUT IN YOUR ACCOUNT NUMBER ANY STAFF WONT GIVE YOU POINTS!</li>
</ol>
</br>
</br>
';
echo '<center>
<!-- PayGol JavaScript -->
<script src="http://www.paygol.com/micropayment/js/paygol.js" type="text/javascript"></script>
<!-- PayGol Form -->
<form name="pg_frm">
<h1>Enter account number:</h1><p>
<input type="text" name="pg_custom" value=""><p>
<input type="hidden" name="pg_serviceid" value="86647">
<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>25 Premium Points for 2 EUR<p>
<input type="radio" name="pg_price" value="2">55 Premium Points For 4 Euro<p>
<input type="radio" name="pg_price" value="3">65 Premium Points For 6 Euro<p>
<input type="hidden" name="pg_return_url" value="http://localhost/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>';
?>
Last edited: