Witam mam problem ze sklepikiem OT. Mianowicie można wybrać usługę, ale przy płatności wyświetla taki komunikat:
moja konfiguracja sklepiku
oraz konfiguracja skryptów
paygol.php
add_sms_points_paygol.php
config.lua
Proszę o szybką pomoc.
moja konfiguracja sklepiku
oraz konfiguracja skryptów
paygol.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 = 105224; // 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 = "localhost"; //Your database domain
$dbuser = "root"; //Database username
$dbpassword = "niematakiegohasla"; //Database password
$db = "test"; //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 points = points+'".mysql_real_escape_string($points)."' WHERE account_id = '".mysql_real_escape_string($custom)."'";
mysql_query($sql);
/*
$points = mysql_real_escape_string($points)
$accou = mysql_real_escape_string($custom)
$points = mysql_real_escape_string($points);
$accou = mysql_real_escape_string($custom);
$query = "SELECT points FROM accounts WHERE id='$accou'" OR die("error");
mysql_query($query);
$result = mysql_fetch_array(mysql_query($query), MYSQL_ASSOC);
//punkty zapisywane w histori aby wiedziec ile punktow wplynelo lacznie na konto
$query3 = "SELECT points_history FROM accounts WHERE id='$accou'" OR die("error");
mysql_query($query3);
$result2 = mysql_fetch_array(mysql_query($query3), MYSQL_ASSOC);
$actualpoints = $result[points]; //punkty z bazy
$newpoints = $actualpoints + $points; //punkty z bazy + nowe punkty
$actualpoints2 = $result2[points_history]; //punkty historia z bazy
$newpoints2 = $actualpoints2 + $points; //punkty historia z bazy + nowe punkty
$query2="UPDATE accounts SET points='$newpoints' WHERE id='$accou'" OR die("Nie udało się dodać punktów");
mysql_query($query2);
//punkty historia
$query4="UPDATE accounts SET points_history ='$newpoints2' WHERE id='$accou'" OR die("error");
mysql_query($query4);
*/
mysql_close($conn);
}
?>
Code:
<?php
include ("include.inc.php");
$ptitle= "Add points - $cfg[server_name]";
include ("header.inc.php");
?>
<div id="content">
<div class="top">Add points option</div>
<div class="mid">
<center>
Please enter your account number and choose amount of points. If you have any problems please contact with the staff in game or by e-mail:[email protected]
</br>
<center><b><li>45 Premium Points for 1 EUR</li>
<li>100 Premium Points for 2 EUR</li>
<li>225 Premium Points for 4 EUR</li>
</center></b>
</br>
</br>
</br>
<!-- PayGol JavaScript -->
<script src="http://www.paygol.com/micropayment/js/paygol.js" type="text/javascript"></script>
<!-- PayGol Form -->
<form name="pg_frm">
Account Number:<p>
<input type="text" name="pg_custom" value=""><p>
<input type="hidden" name="pg_serviceid" value="105224">
<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>45 Premium Points<p>
<input type="radio" name="pg_price" value="2">100 Premium Points<p>
<input type="radio" name="pg_price" value="3">225 Premium Points<p>
<input type="hidden" name="pg_return_url" value="http://tibiapro.hmcloud.pl/account.php">
<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_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>
</div>
<div class="bot"></div>
</div>
<?php include ("footer.inc.php");?>
config.lua
Code:
---- DATABASE ----
-- SQL type
-- options: mysql, sqlite, odbc or pgsql
SQL_Type = "mysql"
--- SQL connection part
SQL_DB = "test"
-- These settings are not used by SQLite
SQL_Host = "localhost" --188.116.54.164
SQL_Port = 3306
SQL_User = "root"
SQL_Pass = "niematakiegohasla"
Proszę o szybką pomoc.