Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Dekaron > Dekaron Private Server
You last visited: Today at 19:09

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[RELEASE]Automatic Coin Delivery from PayPal IPN payment messages

Discussion on [RELEASE]Automatic Coin Delivery from PayPal IPN payment messages within the Dekaron Private Server forum part of the Dekaron category.

Reply
 
Old   #1
 
freeskier4lif3's Avatar
 
elite*gold: 0
Join Date: Sep 2008
Posts: 231
Received Thanks: 149
Post [RELEASE]Automatic Coin Delivery from PayPal IPN payment messages

Here is a script to automatically send coins to your players based on payments made through PayPal. This does require a good amount of setup and I would recommend testing it before going live.

Note: This script is using the older mysql / mssql PHP functions. I highly recommend using PDO, and that you use this code only as a reference for getting your PayPal IPN setup.

Important!
This script assumes that you sent the users account name through PayPal IPN's 'custom' field when they made the payment. You have to edit your PayPal provided button code to add an input field with the name custom and value account name. This can be hidden if you have the information already by having the user logged into your website, or you can have the user enter their account name by having the field not hidden.

for example:
Code:
<input value='accountname' name='custom' type='hidden'>
Requirements
- PayPal account that can make payment buttons
- Web server with mssql and mysql php extensions enabled
- MySQL database, for logging payments
- Patience


Setup Setup on your sever side
- Open paypalipnconfig.php and fill out for your server information and what packages you will offer
- Open paypalDB.sql and copy it into your MySQL Database and run it, this creates a table called 'paypal_logs' which will store paypal payments and coins sent out.
- Done on your server's end...

PayPal Setup
- Create a button
- make sure to set a fixed donation amount
- click "Step 3: Customize advanced features
- click add advanced variables and add the following line to the text area with your path to the script
Code:
notify_url="http://www.mydomain.com/folder/paypalipn.php"

Error Logging
If there is an error with a payment, either an invalid IPN, or email, or user name, anything... it will be output to a file _paypal_error_log.txt in the same directory that holds the script. All error messages are timestamped so you can review errors and see what's going on with them.


Make sure to test the system before making it live on your server!

Enjoy!


The Code
paypalipnconfig.php

paypalipn.php

mysql.class.php

mssql.class.php

logger.php


Edit:Added new file below.
paypalipn.php -> this one stores your paypal logs in mssql. Just make a table with the same layout as the mysql example above in your mssql "cash" db.
Attached Files
File Type: zip PayPalIPNforDekaron.zip (5.4 KB, 612 views)
freeskier4lif3 is offline  
Thanks
15 Users
Old 07/18/2012, 22:14   #2
 
elite*gold: 0
Join Date: Oct 2011
Posts: 149
Received Thanks: 34
Awesome great job bro, keep up the good work!
fastswipe is offline  
Old 07/19/2012, 01:33   #3
 
Zektor's Avatar
 
elite*gold: 40
Join Date: Aug 2007
Posts: 617
Received Thanks: 440
Excellent tutorial, shouldn't be charging so much for installing this for others (I understand it's a service, but it doesn't take too long to configure IPN).
Zektor is offline  
Old 07/19/2012, 07:38   #4
 
freeskier4lif3's Avatar
 
elite*gold: 0
Join Date: Sep 2008
Posts: 231
Received Thanks: 149
Quote:
Originally Posted by Zektor View Post
Excellent tutorial, shouldn't be charging so much for installing this for others (I understand it's a service, but it doesn't take too long to configure IPN).
Thank you, and about charging that much... it's for time. Which is the reason I explained it well, if they can follow the majority of the tutorial and need help for like 30 mins they only owe me for 30 mins. But tech savvy people shouldn't really need any help if they google how to test IPN with paypal's sandbox.

Also, going to add a second paypalipn.php that stores the data in mssql and not in mysql for people that aren't running mysql for their website. Just make a table with the same fields as explained in the mysql one and you'll be set.
freeskier4lif3 is offline  
Old 04/16/2013, 09:12   #5
 
killer2p's Avatar
 
elite*gold: 0
Join Date: Jun 2010
Posts: 417
Received Thanks: 159
with some edits couldn't it be used for Shaiya?
killer2p is offline  
Old 05/26/2013, 08:45   #6
 
Ultimo ☼'s Avatar
 
elite*gold: 0
Join Date: Nov 2011
Posts: 566
Received Thanks: 317
What web server can use mssql extension? i use XAMPP but it can only use sqlsrv extension
Ultimo ☼ is offline  
Old 07/02/2013, 02:54   #7

 
Bocc1337's Avatar
 
elite*gold: 737
Join Date: Oct 2007
Posts: 730
Received Thanks: 133
hello free i would like for you to set up the auto coin delivery system on my server.i tryed my best to do it my self and cant do it.. you can find me on skype as bocc1337 please i really need this to work. thx i will be watching for your reply.
Bocc1337 is offline  
Old 11/12/2013, 23:31   #8
 
elite*gold: 0
Join Date: Aug 2013
Posts: 45
Received Thanks: 6
So if I has followed the tutorial there 100%

So under the:
advanced variables I should put this and ONLY this?:
notify_url="http://server1.bloodteardekaron.com/donate/paypalipn.php"

and in the donate website I should have a form that says:
<input value='accountname' name='custom' type='hidden'>
Donate link
Donate amount(5)

<input value='accountname' name='custom' type='hidden'>
Donate link
donate Amount(50)

And it would know by the IPN how much that was send, and in the array it would give correct amount of DCoins?
DivineDK is offline  
Old 11/13/2013, 02:29   #9
 
freeskier4lif3's Avatar
 
elite*gold: 0
Join Date: Sep 2008
Posts: 231
Received Thanks: 149
Yes, you configure the dollar amount to coin amount in paypalipnconfig.php and when an IPN message is received it looks at the received dollar amount and gives coins based on the array you set up.
freeskier4lif3 is offline  
Old 11/13/2013, 10:03   #10
 
elite*gold: 0
Join Date: Aug 2013
Posts: 45
Received Thanks: 6
So this is right for the posting?

<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input value='accountname' name='custom' type='text'>
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="FNL9D7EFRTMXF">
<input type="image" src="https://www.paypalobjects.com/en_US/US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal – den sikre og nemme måde at betale på nettet.">
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>


and on paypal it is said to be 0.01 USD (for testing purposes)
and this in advanced variables:

address_override=1
notify_url=http://server1.bloodteargames.com/donate/paypalipn.php

Does that sound right?
DivineDK is offline  
Old 11/13/2013, 16:45   #11
 
freeskier4lif3's Avatar
 
elite*gold: 0
Join Date: Sep 2008
Posts: 231
Received Thanks: 149
yea, looks good.

Also, you can use the paypal sandbox to test sending payments without actually sending real money. So you don't have to send an actual penny back and forth.
freeskier4lif3 is offline  
Old 11/13/2013, 18:31   #12
 
elite*gold: 0
Join Date: Aug 2013
Posts: 45
Received Thanks: 6
How?
As that code I just end to you, does not work at all, can I add you over skype?

As my friend donates, fill in the accountname, but nothing happens, we waited 10mins and no change of dcoins.

and how do I test with the sandbox?

as I had edited that curl thingy in the ipn.php, no change, no report of working or not working.

NVM I found out why, I had forgotten to portforward the port 443 on the server -.-

And that did not help it at all.
DivineDK is offline  
Old 12/16/2013, 01:39   #13
 
elite*gold: 0
Join Date: Dec 2013
Posts: 6
Received Thanks: 0
Hey add me on skype: Mystra-Shaiya
I am trying to set this up for Shaiya server i just need help with the IPN setup because i am sure that i did everyting right ;o
Thanks!
Mystra-Shaiya is offline  
Old 12/16/2013, 06:10   #14
 
janvier123's Avatar
 
elite*gold: 20
Join Date: Nov 2007
Posts: 2,853
Received Thanks: 1,876
Quote:
Originally Posted by Mystra-Shaiya View Post
Hey add me on skype: Mystra-Shaiya
I am trying to set this up for Shaiya server i just need help with the IPN setup because i am sure that i did everyting right ;o
Thanks!
dude, really ?
this is the DEKARON section!
janvier123 is offline  
Thanks
1 User
Old 12/16/2013, 23:29   #15
 
elite*gold: 0
Join Date: Aug 2007
Posts: 554
Received Thanks: 136
he could be confused, after all remember silk's release of the 1click dekaron an it being named shaiya, but yeah this is dekaron :P
xfactorbowler is offline  
Reply


Similar Threads Similar Threads
Question: Automatic server messages??
07/11/2012 - Shaiya Private Server - 3 Replies
What i am looking for is how to add or change server messages.. Ex: guild ranking battle messages and messages sent when relics are taken....
*** World of Warcraft GameKeys *** 24H Delivery *** PSC-Payment ***
10/18/2011 - World of Warcraft Trading - 4 Replies
....
want to buy psc i will pay alot for it buy paypal only. Messages me
03/15/2011 - elite*gold Trading - 0 Replies
thank you danke.
release: KSF radio messages
12/31/2010 - Soldier Front Hacks, Bots, Cheats & Exploits - 17 Replies
good day troopers.. want to feel like playing in KSF,, hear KSF radio messages and announcement in-game.. download this.. sound_001.rar paste this on..



All times are GMT +1. The time now is 19:09.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.