• 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 support -> Points doesn't get added

vingo

Active Member
Joined
Oct 27, 2012
Messages
464
Reaction score
43
as written, I go to zaypay -> press donate, make it test on zaypay.com and change to paid, it says I have paid and should get the points, but my account does not show them..

PHP:
For this item you need 30 points. You have only 0 premium points. Please select other item or buy premium points.
website^


PHP:
premium_points 	int(11) 			0


database^
 
It is simple. Your script does not work.
You can post it so anyone can help you, though I myself don't know Zaypay nor did I ever use it.
 
PHP:
<?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('custom_scripts/config.php');
        require_once('classes/Zaypay.php');
        require_once('system/load.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*');
?>

- - - Updated - - -

im guessing its this one
 
Great script, replaces the current amount the account has with their new purchase. It should give + points and not replace.

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

with
PHP:
mysql_query("UPDATE accounts SET premium_points = premium_points + ".$point." WHERE accounts.id = '{$array['account_id']}'");
 
Getting this error in apache error logs


PHP:
[Thu Nov 01 15:34:23 2012] [error] [client 91.216.137.31] PHP Fatal error:  require_once(): Failed opening required '.custom_scripts/config.php' (include_path='.;C:/UniServer/usr/local/php/includes;C:/UniServer/usr/local/php/pear;C:/UniServer/home/admin/www/plugins/pear/PEAR') in C:\\UniServer\\www\\pages\\zaypay_report.php on line 10


up^

didnt fix it, still not getting points
 
I see, anyway I'll upload Zaypay files that I used myself without any errors.

zaypay.rar - Speedy Share - upload your files here
 
okey thanks but this is the thing that confuses me..

PHP:
  require_once('includes/config.php');
  require_once('includes/Zaypay.class.php');
  require_once('includes/database.php');


change or not? if yes, how do i change it if my database is named "load.database.php" in a folder called system ?

- - - Updated - - -

and greatly I would appreciate if you helped me integrate it into my website, If you dont want to its ok i can figure it out, but would really want to get some help fixing this stuff.


thanks alot

- - - Updated - - -

I imported all ur files but the thing I get now is that when I go to -> shopsystem -> click on zaypay I get a white screen only

- - - Updated - - -

I think that im using your script correctly but still not getting points, Is anyone willing to help me abit more in-depth please?
 
PHP:
$mysqlConn = $db = mysql_connect("MYUSERNAME", "MYPASSWORD", "MYPASSWORD");
mysql_select_db("DBNAME", $mysqlConn);
?>



Is those the things im going to change? right?
 
Should be like this :p

PHP:
$mysqlConn = $db = mysql_connect("localhost", "USERNAME", "PASSWORD");
mysql_select_db("DBNAME", $mysqlConn);
?>
 
once again, you save me from my stupidity thanks

- - - Updated - - -

even tho I changed that im really sad to say, It does not give points... argh..!!

- - - Updated - - -

and i havent changed anything except config + database
 
Did you execute this to the database? I'm not 100 percent sure that changing from "test" to "paid" would give you points anyway.

SQL:
CREATE TABLE IF NOT EXISTS `vapus_payment` (
  `payID` bigint(30) NOT NULL,
  `account_id` int(20) NOT NULL,
  `status` varchar(255) NOT NULL,
  `payto` tinyint(1) NOT NULL,
  `payopt` tinyint(4) NOT NULL,
  PRIMARY KEY (`payID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;


-- --------------------------------------------------------


--
-- Table structure for table `vapus_payment_storage`
--


CREATE TABLE IF NOT EXISTS `vapus_payment_storage` (
  `name` varchar(127) NOT NULL,
  `value` int(11) NOT NULL,
  PRIMARY KEY (`name`),
  KEY `value` (`value`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
 
As I mentioned before, are you testing the script with the "test" payment?
 
Yes Im changing it to test then "paid"

- - - Updated - - -

But i mean it sends the same stuff as if it was paid, why wouldnt it work ? :(

- - - Updated - - -

bump

- - - Updated - - -

bump
 
Cause I have no idea how to implent it, otherwise I would :/, I would need like step by step help or guidelines of what to edit (files)
 
It was already there I just changed ids and logins

- - - Updated - - -

I already got the shop to deliver items to ingame but then its just the matter of points not getting automatically added to the account whom donates
 
I got no clue about this, I never used this system before, but check once again if you have configured right the DB, password, etc.

- - - Updated - - -

I think that the problem is here.

Code:
$mysqlConn = $db = mysql_connect("MYUSERNAME", "MYPASSWORD", "MYPASSWORD");
mysql_select_db("DBNAME", $mysqlConn);
?>

Try putting something like this:

Code:
$mysqlConn = $db = mysql_connect("root", "localhost", "yourpassword");
mysql_select_db("yourdb", $mysqlConn);
?>
 
Back
Top