ATT3
Intermediate OT User
- Joined
- Sep 22, 2010
- Messages
- 512
- Reaction score
- 100
Hello, I have been trying to solve this but simply couldnt.
I have found many threads like this which none of them seem to have answer..
As the title says my problem is ZayPay report URL bugged config.
When I enter http://gythium.net/zaypay_report.php
anyways.
I am using Gesior 0.4~
custom_scirpts folders are writeable.
config.php
Everything should be correct above.
zaypay_report.php
Just ask if you need more information, thanks.
I have found many threads like this which none of them seem to have answer..
As the title says my problem is ZayPay report URL bugged config.
When I enter http://gythium.net/zaypay_report.php
anyways.
I am using Gesior 0.4~
custom_scirpts folders are writeable.
config.php
Code:
<?php
$options[149743]['name'] = 'Buy 100 premium points';
$options[149743]['payalogue_id'] = 133957;
$options[149743]['price_id'] = 149743;
$options[149743]['price_key'] = 'fd752123d08dd57841d796cfabfac069';
$options[149743]['points'] = 100;
$options[149745]['name'] = 'Buy 200 premium points';
$options[149745]['payalogue_id'] = 133959;
$options[149745]['price_id'] = 149745;
$options[149745]['price_key'] = '5b772708f9ff9df125c5d9ca8dbf8f61';
$options[149745]['points'] = 200;
$options[149747]['name'] = 'Buy 300 premium points';
$options[149747]['payalogue_id'] = 133961;
$options[149747]['price_id'] = 149747;
$options[149747]['price_key'] = '04ca249aed4196669926ca779b3fd1b6';
$options[149747]['points'] = 300;
Everything should be correct above.
zaypay_report.php
Code:
<?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')+$option['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;
Just ask if you need more information, thanks.
Last edited: