• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

PayGol System - How to Add?

Keram

Member
Joined
Jan 8, 2012
Messages
491
Reaction score
12
Location
DUBLIN
Hello,

I started using this system today but I have no idea how to install it on my gesior 0.6.2 ;/

I tried everythiing :( Putting different things in buypoints.php... creating new foolder paygol in the main folder www of uniserver...

I am using uniform server for testing... Please help me setting this up ;/ Whenever I will finish, I will make a nicely done tutorial for everyone and I will give credits to the users that will help me now...

I got the paygol.php script and I got the paygol.html script that I configurated on their website... I was using this tutorial:
Paygol automatic sms payments in Tibia

Now, let's all sit and help each other and at the end I will make a tutorial as I said, crediting EVERYONE who helped in some way here. :)


Here is paygol.php that I downloaded:
PHP:
<?php
/*
English:
This script will help you to integrate PayGol as your sms payment gateway in your Tibia, users can donate and they can have their points in-game, this mean they don't have to wait hours or even days to get their points.
Please read this link http://www.slideshare.net/paygol/paygol-automatic-sms-payments-in-tibia which will guide you step by step.

Note:Before starting you have to create an account at http://www.paygol.com/register

Espanol:
Este codigo te ayudara a integrar PayGol como tu plataforma de pagos por sms en tu Tibia, tus usuarios podran donar y podran obtener sus puntos de inmediato, no tendran que esperar horas o hasta dias para obtener sus puntos.
Por favor, lee esta guia http://www.slideshare.net/paygol/paygol-automatic-smspaymentsintibiaes que te ayudara paso a paso..

Nota:Antes de comenzar, debes crear una cuenta en http://www.paygol.com/register
*/


// 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");
}
  

//Get all parameters from PayGol
$message_id	= $_GET[message_id];
$shortcode	= $_GET[shortcode];
$keyword		= $_GET[keyword];
$message		= $_GET[message];
$sender			= $_GET[sender];
$operator		= $_GET[operator];
$country		= $_GET[country];
$custom	    = $_GET[custom];//
$price			= $_GET[price];
$currency		= $_GET[currency];
$points		  = $_GET[points];

//Replace these parameters by your database details
$dbhost     = "localhost"; //Your database domain
$dbuser     = "****"; //Database username
$dbpassword = "****"; //Database password
$db         = "****"; //Database name

//Connect to Database
$conn = mysql_connect($dbhost, $dbuser, $dbpassword);
mysql_select_db($db);

$sql = "UPDATE accounts SET premium_points = premium_points+$points WHERE name = '$custom'";
mysql_query($sql);

mysql_close($conn);

?>

and here is the paygol.html I made on the website:
HTML:
<!-- PayGol JavaScript -->
<script src="http://www.paygol.com/micropayment/js/paygol.js" type="text/javascript"></script> 

<!-- PayGol Form -->
<form name="pg_frm">
 Character<p>
 <input type="text" name="pg_custom" value=""><p>
 <input type="hidden" name="pg_serviceid" value="13460">
 <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>100 premium points €1<p>
 <input type="radio" name="pg_price" value="2">300 premium points €3<p>
 <input type="radio" name="pg_price" value="3">600 premium points €5<p>
 <input type="radio" name="pg_price" value="4">1350 premium points + 150 premium points gratis €10<p>
 <input type="radio" name="pg_price" value="5">3000 premium points + 300 premium points gratis €20<p>
 <input type="hidden" name="pg_return_url" value="">
 <input type="hidden" name="pg_cancel_url" value="">
 <input type="image" name="pg_button" class="paygol" src="http://www.paygol.com/micropayment/img/buttons/150/donate_en_3.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>

Now, how to add this to shop system? :/ Let's all think xD I tried different things but they were so stupid xD
 
Back
Top