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

Zaypay report issues

Fredzor

New Member
Joined
Mar 31, 2008
Messages
48
Reaction score
0
Hello, I just got approved by zaypay and I'm doing some testing..
It seems that the users that pays doesn't get the points automatically, I get a log file with their account id and how much they paid so the script semi-works but the points doesn't get added, I have to do it manually.

Here is the zaypay script:
PHP:
<?php
if(!defined('INITIALIZED'))
	exit;

require_once('./custom_scripts/zaypay/config.php');

if(isset($_GET['payment_id']) && isset($_GET["price_setting_id"]) && isset($options[$_GET["price_setting_id"]]))
{
	$option = $options[$_GET["price_setting_id"]];
	$zaypay = new Zaypay($option['price_id'], $option['price_key']);
	$zaypay_info = $zaypay->show_payment($_GET['payment_id']);
	if($zaypay_info["payment"]["status"] == 'paid' && !file_exists('./custom_scripts/zaypay/used_codes/zay_id_' . $zaypay_info["payment"]["id"]. '.txt'))
	{
		$_acc = explode('=', $zaypay_info["payment"]["your-variables"]);
		$acc = $_acc[1];
		if(file_put_contents('./custom_scripts/zaypay/used_codes/zay_id_' . $zaypay_info["payment"]["id"]. '.txt' , 'account:' . $acc . ',amount-euro:' . $zaypay_info["payment"]["amount-euro"] . ',points:' . $option['points']) !== false)
		{
			$account = new Account($acc);
			if($account->isLoaded())
			{
				$account->set('premium_points', ($account->getCustomField('premium_points')+$number_of_points));
				$account->save();
			}
			echo '*ok*';
			exit;
		}
		else
		{
			echo '*cannot save code to folder used_codes*';
			exit;
		}
	}
	else
	{
		echo '*code already used*';
		exit;
	}
}
echo '*bugged config*';
exit;

Help is appreciated!

- - - Updated - - -

Bump
 
Back
Top