Hello,
Martins donate system links are dead thats why i decided to "remake" it
Its realy simple code and ipn is as simple as it can get so dont rage..
LINK TO SERVER SIDED CODE:
http://www.rune-server.org/runescape...on-system.html
LINK TO WEBSITE CODE DOWNLOAD:
http://blanked-studios.info/test/class.zip
LIVE PREVIEW:
http://blanked-studios.info/test
Ok if you downloaded files, create mysql user and database. Go in class file and edit database.class.php . Change database connect details to yours.
When that is done go to phpmyadmin and create this table:
Code:
CREATE TABLE IF NOT EXISTS `donation` (
`username` varchar(32) NOT NULL,
`time` varchar(100) NOT NULL,
`productid` varchar(100) NOT NULL,
`price` decimal(10,0) NOT NULL,
`tickets` int(11) NOT NULL,
`index` int(11) NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`index`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
Now when your database is set up, its time to set up donation itself!
Edit index.php and change next defines:
PAYPAL_EMAIL = email where you want to recieve payments to
PAYPAL_RETURN_URL = url where paypal will redict user if payment is sucessfull/unsucessfull
PAYPAL_IPN_URL = url to ipn file which is located in class folder. Example:
http://blanked-studios.info/test/class/ipn.php
How do I add rewards?
Adding rewards is realy simple, all you have to do is add new option in form.
Code:
<option value="3">Purple phat</option>
value is product id! Remember that because you will need it later.
So now when item is added to form, you have to add it to array.
Code:
$rewards = array
(
array("REWARD PRICE", "REWARD NAME"),
array(12, "Dragon Claws"), // Reward 1
array(13, "Armadyl Godsword"), // Reward 2
array(14, "Purple phat"), // Etc..
);
As you can see first value in array is
reward price . If you for example set it to 10, reward will cost 10$ .
Second value is reward name.
When adding rewards make sure you dont delete this row:
Code:
array("REWARD PRICE", "REWARD NAME"),
because if you do, it wont work anymore
Thats all for now, if you like it leave a thanks and if you need help feel free to ask me
For those who dont like current IPN, I'll write new one. This one looks like that because I didnt have time to make it better
Credits: Web sided: to me
Server sided to martin ofc