Nubaza
LUA Scripter
Hello i have this error on the process of ContenidoPago.com so the players don't receive the automatic points in his account...
This is:
Error: service id wrong
Page: Znote ACC
Can anyone help me in this?
THANKS SO MUCH:*
This is:
PHP:
<?php
// Require the functions to connect to database and fetch config values
require 'config.php';
require 'engine/database/connect.php';
// Fetch contenidopago configurations
$contenidopago = $config['contenidopago'];
// check that the request comes from contenidopago server
if($contenidopago['servicekey']!= $_GET['key'])
{
die("Access not autorized");
}
// get the variables from ContenidoPago system
$service_id = $_GET['t'];
$shortcode = $_GET['n'];
$keyword = $_GET['tipo'];
$message = $_GET['t'];
$sender = $_GET['mo'];
$operator = $_GET['o'];
$country = $_GET['p'];
$custom = $_GET['name'];
$points = $_GET['puntos'];
$price = $_GET['co'];
$currency = 'EUR';
// FUNCTIONS
function sanitize($data)/* Security reasons */ {
return htmlentities(strip_tags(mysql_real_escape_string($data)));
}
function user_data($user_id)/* account data */ {
$data = array();
$user_id = sanitize($user_id);
$func_num_args = func_num_args();
$func_get_args = func_get_args();
if ($func_num_args > 1) {
unset($func_get_args[0]);
$fields = '`'. implode('`, `', $func_get_args) .'`';
$data = mysql_fetch_assoc(mysql_query("SELECT $fields FROM `accounts` WHERE `id` = $user_id;"));
return $data;
}
}
// Since only contenidopago.com is able to communicate with this script, we will blindly trust them until proven othervise.
if ($service_id == $contenidopago['servicekey']) {
$new_points = $points;
$data = user_data($custom, 'name');
if ($data['name']) {
// Sanitize all data: (ok, we do not completely trust them blindly. D:)
$service_id = sanitize($service_id);
$shortcode = sanitize($shortcode);
$keyword = sanitize($keyword);
$message = sanitize($message);
$sender = sanitize($sender);
$operator = sanitize($operator);
$country = sanitize($country);
$custom = sanitize($name);
$points = sanitize($points);
$price = sanitize($price);
$currency = sanitize($currency);
// Give points to user
$old_points = mysql_result(mysql_query("SELECT `premium_points` FROM `accounts` WHERE `id`='$custom';"), 0, 'premium_points');
echo 'Custom: '. $custom .'<br>';
echo "Query: SELECT `premium_points` FROM `accounts` WHERE `id`='$custom';<br>";
echo 'Old points: '. $old_points .'<br>';
$new_points += $old_points;
echo 'New points: '. $new_points .'<br>';
$update_account = mysql_query("UPDATE `accounts` SET `premium_points`='$new_points' WHERE `id`='$custom'")or die(mysql_error());
echo 'Account id 2 shold be updated now!';
} else echo ' character data false';
} else echo 'service id wrong';
?>
Error: service id wrong
Page: Znote ACC
Can anyone help me in this?
THANKS SO MUCH:*