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

[MyAAC][Plugin] Gesior Shop System

Shop system is not delivering items on my OT using 1.2
relog and nothing, restarted server, nothing :S

ok I am going to assume this has to be delivered to store inbox which brings up a new issue, I cant open store inbox on my client.
:S so much has changed since I ran OT back in the early days :(

Wait for version 2.0 of the shop system, it will be released soon. Then all the issues will be fixed!
 
I am having issues with the automatic points transfer to accounts. I receive the money via paypal however it does not update their ac I was just wonder if you have had similar issues in the past?

Could it be possibly related to the config.php file? Is the a way of testing what might be going wrong?

$paypal_report_url = 'http://anderion.net/paypal_report.php';
$paypal_return_url = 'http://anderion.net/?subtopic=shopsystem';
$paypal_image = 'https://www.paypal.com/en_US/i/btn/btn_donate_LG.gif';
$paypal_payment_type = '_xclick'; // '_xclick' (Buy Now) or '_donations'
 
I am having issues with the automatic points transfer to accounts. I receive the money via paypal however it does not update their ac I was just wonder if you have had similar issues in the past?

Could it be possibly related to the config.php file? Is the a way of testing what might be going wrong?

$paypal_report_url = 'http://anderion.net/paypal_report.php';
$paypal_return_url = 'http://anderion.net/?subtopic=shopsystem';
$paypal_image = 'https://www.paypal.com/en_US/i/btn/btn_donate_LG.gif';
$paypal_payment_type = '_xclick'; // '_xclick' (Buy Now) or '_donations'

Did you changed $paypal_report_url to your URL?
 
Yes I did just copy and pasted yours as an example.

Could it be because port 3306 is not open?
 
Yes I did just copy and pasted yours as an example.

Could it be because port 3306 is not open?

No this is the port used by mysql. The only port needed to be open is :80.

Is your website accessible from the internet? I mean, does it work when someone else goes to your website?
 
No this is the port used by mysql. The only port needed to be open is :80.

Is your website accessible from the internet? I mean, does it work when someone else goes to your website?
Yes it is an active server currently been up for a few months. Been having this issue for a while just cannot work out what the problem is :(.

Port 80 is open. Only thing I can think of it's not redirecting back to the page to transfer the points? Maybe you could explain to me how the paypal payment works so I can get a better understanding? What's the best way to identify the problem?
 
Yes it is an active server currently been up for a few months. Been having this issue for a while just cannot work out what the problem is :(.

Port 80 is open. Only thing I can think of it's not redirecting back to the page to transfer the points? Maybe you could explain to me how the paypal payment works so I can get a better understanding? What's the best way to identify the problem?

It calls your $paypal_report_url - paypal_report.php after payment is received, and this script takes care of adding points.
 
It calls your $paypal_report_url - paypal_report.php after payment is received, and this script takes care of adding points.

Ah ok I see. It currently refers to this file (paypal_report.php):

Code:
<?php
$_GET['subtopic'] = 'paypal_report';
$_REQUEST['subtopic'] = 'paypal_report';
include('index.php');

Should I be directing to this file in the pages folder (also paypal_report.php)?

Code:
<?php
if(!defined('INITIALIZED'))
    exit;

require_once(SYSTEM . 'pay/paypal/config.php');

$ip = $_SERVER['REMOTE_ADDR'];

require(SYSTEM . 'pay/paypal/PaypalIPN.php');
$ipn = new PaypalIPN();
// Use the sandbox endpoint during testing.
//$ipn->useSandbox();
$ipn->usePHPCerts();
$verified = $ipn->verifyIPN();
if (!$verified) {
    log_append('paypal_scammer.log', $ip);
    die('Access denied.');
}

$receiverMail = $_REQUEST['receiver_email']; // ots admin mail
$status = $_REQUEST['payment_status']; // payment status, we add only when is 'Completed'
$currency = $_REQUEST['mc_currency']; // money currency, like USD or EUR
$gross = $_REQUEST['mc_gross']; // amount of money, like: 10.00
$payerMail = $_REQUEST['payer_email']; // player mail
$accountID = $_REQUEST['custom']; // user account ID
$transactionID = $_REQUEST['txn_id']; // transaction ID

$logFile = SYSTEM . 'pay/paypal/reported_ids/' . $transactionID . '.log';
if(!file_exists($logFile) && $status == 'Completed')
{
    foreach($paypals as $pay)
    {
        if($receiverMail == $pay['mail'] && $currency == $pay['money_currency'] && $gross == $pay['money_amount'])
        {
            $account = new OTS_Account();
            $account->load($accountID);
            if($account->isLoaded())
            {
                if(file_put_contents($logFile, 'accountID:' . $accountID . ',mail:' . $payerMail . ',amount:' . $gross . ' ' . $currency . ',points:' . $pay['premium_points']) !== false)
                {
                    add_points($account, $pay['premium_points']);
                }
            }
            break;
        }
    }
}

function add_points(OTS_Account $account, $amount)
{
    if(!$account->isLoaded())
        return false;

    $account->setCustomField('premium_points', $account->getCustomField('premium_points') + $amount);
    return true;
}

header("HTTP/1.1 200 OK");

Server is TFS 1.3 Client 10.00
 
After long waiting - here it is - the 2.0 beta version of the shop system for everyone (some screenshots few posts above).

Download: Releases · slawkens/myaac-gesior-shop-system · GitHub

Fortumo, paypal, cryptobox (bitcoins) and pagseguro works. (tested)

Not tested: homepay.pl and dotpay.pl

Changelog:
Code:
* new payment gateway: GoUrl.io (CryptoBox global Coins - bitcoins, speedcoin, dash and more)
* new payment gateway: fortumo.com (SMS Worldwide)
* new payment gateway: PagSeguro (Brazil payments)
* new payment gateway: homepay.pl (Poland SMS and Bank Transfer)
* simple admin panel for adding offers
* support for new offers: pacc, addons, mounts, unban, redskull
* cleaner buy points page (with images for gateways)
* general folder structure reorganisation (more clean now)
* removed support for zaypay as it doesn't exist anymore
* you can now hide item from showing by settings hidden to 1 in z_shop_offer table
* fixed some php notices and warnings
* fixed mysql error - Duplicate entry 'x' for key 'PRIMARY'
* renamed z_shop_history_item to z_shop_history (it will store history from all)
* general optimizations
* added CHANGELOG
 
Last edited by a moderator:
@slawkens Wow, Thanks so much.

work smooth!

well, i guess i talk bit to fast.

i have issue, using 2.0 beta version of the shop system and tfs 1.1.
it just not delivering, not mounts nor outfits. (haven't tested items yet.)

kinda lost since i don't have error to give, just the fact that it dosent delivering :(

sorry for multiple replies just can't edit my previous post :(
i think this might help, why is it on "wait"?
also what should i write there to make it accepted (menuel)

and if there's any way to make it automatic?

shop bug.png
 
Last edited by a moderator:
sorry for multiple replies just can't edit my previous post :(
i think this might help, why is it on "wait"?
also what should i write there to make it accepted (menuel)

and if there's any way to make it automatic?

View attachment 31890

Did you installed the .lua script that is bundled with the .zip file? It should be automatically unpacked into your www folder after installing the plugin - main directory of MyAAC where config.php is located. There should be file called gesior-shop-system.lua, you need to install it as globalevent to your server.
 
Did you installed the .lua script that is bundled with the .zip file? It should be automatically unpacked into your www folder after installing the plugin - main directory of MyAAC where config.php is located. There should be file called gesior-shop-system.lua, you need to install it as globalevent to your server.

♥ Thanks thats work ♥
 
@slawkens Wow, Thanks so much.

work smooth!

well, i guess i talk bit to fast.

i have issue, using 2.0 beta version of the shop system and tfs 1.1.
it just not delivering, not mounts nor outfits. (haven't tested items yet.)

kinda lost since i don't have error to give, just the fact that it dosent delivering :(

sorry for multiple replies just can't edit my previous post :(
i think this might help, why is it on "wait"?
also what should i write there to make it accepted (menuel)

and if there's any way to make it automatic?

View attachment 31890

Did you installed the .lua script that is bundled with the .zip file? It should be automatically unpacked into your www folder after installing the plugin - main directory of MyAAC where config.php is located. There should be file called gesior-shop-system.lua, you need to install it as globalevent to your server.

It worked on a normal player but while using a Admin/God i keep getting this errors .. its a massive spam :/

[0:44:06.109] [Error - GlobalEvent Interface]
[0:44:06.109] data/globalevents/scripts/gesior-shop-system.lua:eek:nThink
[0:44:06.140] Description:
[0:44:06.140] data/globalevents/scripts/gesior-shop-system.lua:186: attempt to perform arithmetic on global 'container_weight' (a boolean value)
[0:44:06.158] stack traceback:
[0:44:06.161] data/globalevents/scripts/gesior-shop-system.lua:186: in function <data/globalevents/scripts/gesior-shop-system.lua:149>
[0:44:06.174] [Error - GlobalEvents::think] Couldn't execute event: gesior-shop-system
 
Just a question i haven't tested this system yet but i wondering what if u buy item form this shop and u have no place in bag or your hands, where item will be spawned? Depo? But then what if u dont have place in depo either? :D will this system let u buy items still? Or it will say you have no place?
 
for those who do not understand the code and want to do more categories, it's a complicated case, I've been almost 1 hour trying to understand and edit the file gifts.php, in my opinion you should put in the admin panel something useful to the shop system

Yeah its complicated, cause categories are not really thought to be extended. Every category has a different kind of things. What type of item/thing would you need to add as new category?

It worked on a normal player but while using a Admin/God i keep getting this errors .. its a massive spam :/

[0:44:06.109] [Error - GlobalEvent Interface]
[0:44:06.109] data/globalevents/scripts/gesior-shop-system.lua:eek:nThink
[0:44:06.140] Description:
[0:44:06.140] data/globalevents/scripts/gesior-shop-system.lua:186: attempt to perform arithmetic on global 'container_weight' (a boolean value)
[0:44:06.158] stack traceback:
[0:44:06.161] data/globalevents/scripts/gesior-shop-system.lua:186: in function <data/globalevents/scripts/gesior-shop-system.lua:149>
[0:44:06.174] [Error - GlobalEvents::think] Couldn't execute event: gesior-shop-system

Thanks. I will try to fix it today in the evening.

Just a question i haven't tested this system yet but i wondering what if u buy item form this shop and u have no place in bag or your hands, where item will be spawned? Depo? But then what if u dont have place in depo either? :D will this system let u buy items still? Or it will say you have no place?

It won't be sent at all. It will show you a message like "Please make a free place in your backpack". It won't use depo.
 
Hello, got a little problem with the latest version of your shop system, i can make a paypal donation but the donator doesn't get the points. i problably fucked up in setting up my paypal since there is no paypal_report and stuff in the new one, i don't really know how to set it up. im pretty new at this so would appreciate some help :)

Thanks
 
Hello everybody and @ratten,

Today I found the issue with the newest version of the shop (v2.0 beta). It wasn't delivering the points.

The solution is here: * fixed PayPal IPN - points weren't delivered! · slawkens/myaac-gesior-shop-system@f58fc4c

You need to modify the file: system/templates/gesior-shop-system/paypal.html.twig

You need to remove that " }}" part (with space!) in the correct place as shown in the commit.

It worked on a normal player but while using a Admin/God i keep getting this errors .. its a massive spam :/

[0:44:06.109] [Error - GlobalEvent Interface]
[0:44:06.109] data/globalevents/scripts/gesior-shop-system.lua:eek:nThink
[0:44:06.140] Description:
[0:44:06.140] data/globalevents/scripts/gesior-shop-system.lua:186: attempt to perform arithmetic on global 'container_weight' (a boolean value)
[0:44:06.158] stack traceback:
[0:44:06.161] data/globalevents/scripts/gesior-shop-system.lua:186: in function <data/globalevents/scripts/gesior-shop-system.lua:149>
[0:44:06.174] [Error - GlobalEvents::think] Couldn't execute event: gesior-shop-system

I cannot seem to reproduce your error using God account, with a backpack.

Are you sure the container item id that you added exists? That error tells me that the container doesn't exists.

Can't edit my post.. so I'm posting again.
It worked on a normal player but while using a Admin/God i keep getting this errors .. its a massive spam :/

[0:44:06.109] [Error - GlobalEvent Interface]
[0:44:06.109] data/globalevents/scripts/gesior-shop-system.lua:eek:nThink
[0:44:06.140] Description:
[0:44:06.140] data/globalevents/scripts/gesior-shop-system.lua:186: attempt to perform arithmetic on global 'container_weight' (a boolean value)
[0:44:06.158] stack traceback:
[0:44:06.161] data/globalevents/scripts/gesior-shop-system.lua:186: in function <data/globalevents/scripts/gesior-shop-system.lua:149>
[0:44:06.174] [Error - GlobalEvents::think] Couldn't execute event: gesior-shop-system

Check in your database (phpmyadmin) in table 'z_ots_comunication' look for wrong item ids in param3 and param1 (in your case most probably param3 is wrong item id). You need to modify it to correct id or remove.

This will fix your errors in console.
 
Last edited by a moderator:
Back
Top