• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Paypal & Zaypay Report

freddzor11

Member
Joined
May 25, 2009
Messages
695
Reaction score
5
Hey otlanders!

I have a big problem, I use 0.3.6 TFS and when people buy points from me then their not recieve their points, so I have to give it manuel. I don't know how to install it correctly, it would be nice if someone could help me fix this problem.

Zaypay: here I use payalouges but don't know wich report I am supposed to link, is it my report.php or what? because I tried that once, but did not working.

Paypal: Someone told me something about API, what's this? and how am I supposed to make paypal connect to my server, I also recieve their money with paypal, but they don't recieve my points.

Kind regards,
Freddzor11
 
I'm not sure if it's this way for everyone, but at least my ZayPay script, it was sending the player's account ID as the account name.

report.php

Change
Code:
mysql_query("UPDATE accounts SET premium_points = premium_points + ".$point." WHERE accounts.id = '{$array['account_id']}'");

To
Code:
mysql_query("UPDATE accounts SET premium_points = premium_points + ".$point." WHERE accounts.name = '{$array['account_id']}'");

That's the only idea I have.
Red
 
I'm not sure if it's this way for everyone, but at least my ZayPay script, it was sending the player's account ID as the account name.

report.php

Change
Code:
mysql_query("UPDATE accounts SET premium_points = premium_points + ".$point." WHERE accounts.id = '{$array['account_id']}'");

To
Code:
mysql_query("UPDATE accounts SET premium_points = premium_points + ".$point." WHERE accounts.name = '{$array['account_id']}'");

That's the only idea I have.
Red

I have the new gesior zaypay wich called Zaypay_report.php is it the same here or how do i fix it here?
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;

I have an old report.php that is from stians zaypay, can I use that report with my new payalouges if I only change "id" until "name"? or could you fix this zaypay_report?
 
Last edited:
Back
Top