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

Solved Zaypay dont give points

bybbzan

mapper
Joined
Aug 4, 2012
Messages
809
Solutions
2
Reaction score
136
Location
Sweden
Hello! :)
I dont recieve points.. The purchase part is fine because i do get money on my Zaypay account.
I put the zaypay_report URL to "http://myserver.org/?subtopic=zaypay_report" on zaypay.com
And then it shows *bugged config* on that page.
Please help me with this.
Here is the file, whats the problem?
changed numbers to X



Thanks.

Lua:
<?php
$options[130114]['name'] = 'Buy 100 premium points';
$options[130114]['payalogue_id'] = xxxxxx;
$options[130114]['price_id'] = xxxxx ;
$options[130114]['price_key'] = 'xxxxxxxxxxxxxxxxxxx';
$options[130114]['points'] = 100;

$options[130124]['name'] = 'Buy 150 premium points';
$options[130124]['payalogue_id'] = xxxxxx;
$options[130124]['price_id'] = xxxxxx;
$options[130124]['price_key'] = 'xxxxxxxxxxxxxxxxxxx';
$options[130124]['points'] = 150;

$options[130134]['name'] = 'Buy 300 premium points';
$options[130134]['payalogue_id'] = xxxxxx;
$options[130134]['price_id'] = xxxxxx;
$options[130134]['price_key'] = 'xxxxxxxxxxxxxxxxxxx';
$options[130134]['points'] = 300;
 
Last edited:
should be: http://whateveryourservernameis/zaypay/report.php

report.php
Lua:
<?php
/*-----------------------------------------------------------------------
  Name         : report.php
  Version      : 1.2-PHP5
  Description  : Retrieve payment information, when triggerd by Zaypay
  Date         : June 2009, Amsterdam, The Netherlands
  By           : Zaypay International B.V. 2008 - 2009 (RDF)
  Last changes : Made class easier to use and understand
  -----------------------------------------------------------------------*/
  
  require_once('includes/config.php');
  require_once('includes/Zaypay.class.php');
  require_once('includes/database.php');
  $Zaypay = New Zaypay($price_setting_id, $price_setting_key);
  
  if (isset($_GET['payment_id'])) {    
    $zaypay_info    = $Zaypay->show_payment($_GET['payment_id']);  
    
    $payment_id     = $zaypay_info['payment']['id'];
    $payment_status = $zaypay_info['payment']['status'];
    
    // Get the ID
    $result = mysql_query("SELECT * FROM zaypay_payment WHERE payID='{$payment_id}' LIMIT 1");
    $array = mysql_fetch_assoc($result);

     // Get current amount of points
    $pp = mysql_query("SELECT premium_points FROM accounts WHERE accounts.id = '{$array['account_id']}'");
    $points = mysql_fetch_assoc($pp);
    $point = $points["premium_points"] + $points_to_give;

    // Update to new status in database
    mysql_query("UPDATE zaypay_payment SET status = '{$payment_status}' WHERE payID = '{$payment_id}'");
    
    // Only give points if the status is "paid"
    if ($payment_status == "paid" && $array["status"] != "paid") {
        // Update points in account table
        mysql_query("UPDATE accounts SET premium_points = '$point' WHERE accounts.id = '{$array['account_id']}'");  
        mysql_query("INSERT INTO `z_shop_points_bought` (`id`, `amount`, `type`, `accountid`, `code`, `paypalmail`, `date`) VALUES (NULL , '".$points_to_give."', 'Zaypay', '".$array['account_id']."', '".$payment_id."', 'N/A',CURRENT_TIMESTAMP);"); 
    }
}
  
  die ('*ok*');
  
?>
 
should be: http://whateveryourservernameis/zaypay/report.php

report.php
Lua:
<?php
/*-----------------------------------------------------------------------
  Name         : report.php
  Version      : 1.2-PHP5
  Description  : Retrieve payment information, when triggerd by Zaypay
  Date         : June 2009, Amsterdam, The Netherlands
  By           : Zaypay International B.V. 2008 - 2009 (RDF)
  Last changes : Made class easier to use and understand
  -----------------------------------------------------------------------*/
  
  require_once('includes/config.php');
  require_once('includes/Zaypay.class.php');
  require_once('includes/database.php');
  $Zaypay = New Zaypay($price_setting_id, $price_setting_key);
  
  if (isset($_GET['payment_id'])) {    
    $zaypay_info    = $Zaypay->show_payment($_GET['payment_id']);  
    
    $payment_id     = $zaypay_info['payment']['id'];
    $payment_status = $zaypay_info['payment']['status'];
    
    // Get the ID
    $result = mysql_query("SELECT * FROM zaypay_payment WHERE payID='{$payment_id}' LIMIT 1");
    $array = mysql_fetch_assoc($result);

     // Get current amount of points
    $pp = mysql_query("SELECT premium_points FROM accounts WHERE accounts.id = '{$array['account_id']}'");
    $points = mysql_fetch_assoc($pp);
    $point = $points["premium_points"] + $points_to_give;

    // Update to new status in database
    mysql_query("UPDATE zaypay_payment SET status = '{$payment_status}' WHERE payID = '{$payment_id}'");
    
    // Only give points if the status is "paid"
    if ($payment_status == "paid" && $array["status"] != "paid") {
        // Update points in account table
        mysql_query("UPDATE accounts SET premium_points = '$point' WHERE accounts.id = '{$array['account_id']}'");  
        mysql_query("INSERT INTO `z_shop_points_bought` (`id`, `amount`, `type`, `accountid`, `code`, `paypalmail`, `date`) VALUES (NULL , '".$points_to_give."', 'Zaypay', '".$array['account_id']."', '".$payment_id."', 'N/A',CURRENT_TIMESTAMP);"); 
    }
}
  
  die ('*ok*');
  
?>

Well depends what the script is called, mine is called zaypay_report.php :p but ill try ur script anyway.
I'll edit soon.

Forgot to say.. Im using Gesior's zaypay script so its a bit different, it has no "includes" and "Zaypay.class" etc.
But i tried to edit your script by changing
Lua:
  require_once('includes/config.php');
to my settings
Lua:
  require_once('./custom_scripts/zaypay/config.php');
But still.. it didnt work :/
 
Last edited:
Back
Top