Hi. I have a problem with the paygol configuration in my acc maker.
config.php (paygol section)
paygol_ipn.php
buypoints.php:
When I go to the paygol website, I can't find the "create a service" tab anywhere
What is wrong?
config.php (paygol section)
//////////////////
/// PAYGOL SMS ///
//////////////////
// https://www.paygol.com/
// !!! Paygol takes 60%~ of the money, and send aprox 40% to your paypal.
// You can configure paygol to send each month, then they will send money
// to you 1 month after receiving 50+ eur.
$config['paygol'] = array(
'enabled' => enabled,
'serviceID' => 4.....5, // Service ID from paygol.com
'secretKey' => 'a..............................................................4', // Secret key from paygol.com. Never share your secret key
'currency' => 'USD',
'price' => 1,
'points' => 100,
'name' => '100 points',
'returnURL' => "http://e.....g.pl/success.php",
'cancelURL' => "http://e.....g.pl/failed.php",
'ipnURL' => "http://e.....g.pl/paygol_ipn.php",
);
////////////
/// SHOP ///
////////////
// If useDB is set to true, player can shop in-game as well using Znote LUA shop system plugin.
$config['shop'] = array(
'enabled' => true,
'loginToView' => false, // Do user need to login to see the shop offers?
'enableShopConfirmation' => true, // Verify that user wants to buy with popup
'useDB' => true, // Fetch offers from database, or the below config array
'showImage' => true,
'imageServer' => 'items.znote.eu',
'imageType' => 'gif',
);
paygol_ipn.php
<?php
require 'config.php';
require 'engine/database/connect.php';
// Fetch and sanitize POST and GET values
function getValue($value) {
return (!empty($value)) ? sanitize($value) : true;
}
function sanitize($data) {
return htmlentities(strip_tags(mysql_znote_escape_string($data)));
}
// get the variables from PayGol system
$message_id = getValue($_GET['message_id']);
$service_id = getValue($_GET['service_id']);
$shortcode = getValue($_GET['shortcode']);
$keyword = getValue($_GET['keyword']);
$message = getValue($_GET['message']);
$sender = getValue($_GET['sender']);
$operator = getValue($_GET['operator']);
$country = getValue($_GET['country']);
$custom = getValue($_GET['custom']);
$points = getValue($_GET['points']);
$price = getValue($_GET['price']);
$currency = getValue($_GET['currency']);
$secret = getValue($_GET['secret']);
// config paygol settings
$paygol = $config['paygol'];
echo '<pre>' . print_r($config['paygol']) . '</pre>';
// Check for valid secret key
if($secret != $paygol['a..............................................................4']) {
header("HTTP/1.0 403 Forbidden");
die("Error: secretKey does not match.");
}
// Check if request serviceID is the same as it is in config
if($service_id != $paygol['4.......5']) {
header("HTTP/1.0 403 Forbidden");
die("Error: serviceID does not match.");
}
$new_points = $paygol['points'];
// Update logs:
mysql_insert("INSERT INTO `znote_paygol` VALUES ('', '$custom', '$price', '$new_points', '$message_id', '$service_id', '$shortcode', '$keyword', '$message', '$sender', '$operator', '$country', '$currency')");
// Fetch points
$account = mysql_select_single("SELECT `points` FROM `znote_accounts` WHERE `account_id`='$custom';");
// Calculate new points
$new_points = $account['points'] + $new_points;
// Update new points
mysql_update("UPDATE `znote_accounts` SET `points`='$new_points' WHERE `account_id`='$custom'");
buypoints.php:
<?php
if ($config['paygol']['enabled'] == true) {
?>
<!-- PayGol Form using Post method -->
<h2>Buy points using Paygol:</h2>
<?php $paygol = $config['paygol']; ?>
<p><?php echo $paygol['price'] ." ". hhb_tohtml($paygol['currency']) ."~ for ". $paygol['points'] ." points:"; ?></p>
<form name="pg_frm" method="post" action="http://www.paygol.com/pay" >
<input type="hidden" name="pg_serviceid" value="<?php echo hhb_tohtml($paygol['4.......5']); ?>">
<input type="hidden" name="pg_currency" value="<?php echo hhb_tohtml($paygol['USD']); ?>">
<input type="hidden" name="pg_name" value="<?php echo hhb_tohtml($paygol['Premium Points']); ?>">
<input type="hidden" name="pg_custom" value="<?php echo hhb_tohtml($session_user_id); ?>">
<input type="hidden" name="pg_price" value="<?php echo $paygol['1']; ?>">
<input type="hidden" name="pg_return_url" value="<?php echo hhb_tohtml($paygol['http://e........g.pl/success.php']); ?>">
<input type="hidden" name="pg_cancel_url" value="<?php echo hhb_tohtml($paygol['http://e........g.pl/failed.php']); ?>">
<input type="image" name="pg_button" src="https://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!">
</form>
<?php }
if (!$config['paypal']['enabled'] && !$config['paygol']['enabled'] && !$config['pagseguro']['enabled']) echo '<h1>Buy Points system disabled.</h1><p>Sorry, this functionality is disabled.</p>';
include 'layout/overall/footer.php'; ?>
When I go to the paygol website, I can't find the "create a service" tab anywhere
What is wrong?
Last edited: