• 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!

[HELP]script paygol wrong

crashgb

Crash
Joined
Aug 20, 2013
Messages
48
Reaction score
0
system "paygol" does not work, can someone tell me what is wrong the "script"

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    = "xxx"; //Your database domain
$dbuser    = "root"; //Database username
$dbpassword = ""; //Database password
$db        = "xxx"; //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


PHP:
<?PHP


$main_content .= '
<b>SMS DONATION</b></CENTER><br /><br />



</br>
<center><b><li>100 Premium Points for 2 EUR</li>
<li>200 Premium Points for 4 EUR</li>
<li>500 Premium Points for 9 EUR</li>
<li>1000 Premium Points for 18 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">
<input type="hidden" name="pg_serviceid" value="70865">
<input type="hidden" name="pg_currency" value="EUR">
<input type="hidden" name="pg_name" value="FlaiteraOT">
<input type="hidden" name="pg_custom" value="">

<!-- With Option buttons -->
<input type="radio" name="pg_price" value="1"checked>100 Premium Points 2<p>
<input type="radio" name="pg_price" value="2">200 Premium Points 4<p>
<input type="radio" name="pg_price" value="3">500 Premium Points 9<p>
<input type="radio" name="pg_price" value="4">1000 Premium Points 18<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/black_es_pbm.png" border="0" alt="Realiza pagos con PayGol: la forma mas facil!" title="Realiza pagos con PayGol: la forma mas facil!" onClick="pg_reDirect(this.form)">
</form>  </center>'; 

?>


Players not receiving their premium points


THANQ PEOPLE <3!!
 
PHP:
<?php

   // 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");
   }   
   
   $db_host = "localhost";
   $db_username = "root";
   $db_password = "xxx";
   $db_name = "xxx";

   if(@!mysql_connect($db_host, $db_username, $db_password)) {
     exit;
   } else if(@!mysql_select_db($db_name)) {
     exit;
   }

   
   // get the variables from PayGol system
   $message_id   = anti_sql($_GET['message_id']);
   $service_id   = anti_sql($_GET['service_id']);
   $shortcode   = anti_sql($_GET['shortcode']);
   $keyword   = anti_sql($_GET['keyword']);
   $message   = anti_sql($_GET['message']);
   $sender    = anti_sql($_GET['sender']);
   $operator   = anti_sql($_GET['operator']);
   $country   = anti_sql($_GET['country']);
   $account    = anti_sql($_GET['custom']);
   $points    = anti_sql($_GET['points']);
   $price    = anti_sql($_GET['price']);
   $currency   = anti_sql($_GET['currency']);
   
   $params = "$message_id|$service_id|$shortcode|$keyword|$message|$sender|$operator|$country|$price|$currency";
   
   if ($service_id != 70865) // prevent external auth abuse
     exit;
     
   $newpoints = 0;
   $result = mysql_query("SELECT premium_points FROM accounts WHERE name='". $account ."'"); // indirect adding to prevent corrupt data
   if ($row = mysql_fetch_array( $result ))
     $newpoints = $row['premium_points'];
   $newpoints += $points;
   
   mysql_query("INSERT INTO `monkeypay_pg` (`account`, `time`, `points`, `params` ) VALUES('" . $account . "', " . time() . ", " . $points . ", '".$params."')");
   mysql_query("UPDATE accounts SET premium_points='".$newpoints."' WHERE name='". $account ."'");

function anti_sql($sql) {
   return mysql_real_escape_string(trim($sql));
}
?>




And this.




PHP:
<?PHP


$main_content .= '
<b>SMS DONATION</b></CENTER><br /><br />



</br>
<center><b><li>100 Premium Points for 2 EUR</li>
<li>200 Premium Points for 4 EUR</li>
<li>500 Premium Points for 9 EUR</li>
<li>1000 Premium Points for 18 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">
<input type="hidden" name="pg_serviceid" value="70865">
<input type="hidden" name="pg_currency" value="EUR">
<input type="hidden" name="pg_name" value="FlaiteraOT">
<input type="hidden" name="pg_custom" value="">

<!-- With Option buttons -->
<input type="radio" name="pg_price" value="1"checked>100 Premium Points 2<p>
<input type="radio" name="pg_price" value="2">200 Premium Points 4<p>
<input type="radio" name="pg_price" value="3">500 Premium Points 9<p>
<input type="radio" name="pg_price" value="4">1000 Premium Points 18<p>
<input type="hidden" name="pg_return_url" value="http://your ip here/?subtopic=shopsystem">
<input type="hidden" name="pg_cancel_url" value="http://Your ip here/?subtopic=latestnews">
<input type="image" name="pg_button" class="paygol" src="http://www.paygol.com/micropayment/img/buttons/150/black_es_pbm.png" border="0" alt="Realiza pagos con PayGol: la forma mas facil!" title="Realiza pagos con PayGol: la forma mas facil!" onClick="pg_reDirect(this.form)">
</form> </center>'; ?>
 
Back
Top