Author Topic: PUDS v0.2.7 - PayPal-ULX Donation System  (Read 331918 times)

0 Members and 1 Guest are viewing this topic.

Offline Wully616

  • Jr. Member
  • **
  • Posts: 64
  • Karma: 10
    • WullysGamers
PUDS v0.2.7 - PayPal-ULX Donation System
« on: August 05, 2013, 01:13:39 PM »
PUDS v0.2.7
PayPal-ULX Donation System

This web based application is an automated donation system.
This has been made to ease the strain on myself on my server when users donate and I'm not around to add them to the correct rank they donated for.
PUDS solves this issue.
Since I don't know Lua this method works for me and is customizable to my linking.
I have tested this extensively on my server and using paypals Sandbox, the scripts can be edited to work with the sandbox easily, I recommend you google how the sandbox works before playing around with it.

If there is any bugs/features you would like please comment here or on github!


Features:

  • Automatic Promotion to the correct ULX group upon successful payment.
  • The user does not need to be ingame for it to work! The server just needs to be online.
  • Provides a framework for custom donation systems without the use of LUA addons.
  • E-mails buyers of successful payment & promotion or if the payment or promotion failed.
  • Saves donator information to a MySQL database for future processing (eg creating a list of donators)
  • Users can log in through Steam to fill out their details

Example:

This is my own setup for my sandbox server, hosted on my website. Using the ULX MOTD to pass things such as the player's steamID, map, hostname to the index.php I created for my MOTD. It autofills out player name and SteamID when they view it ingame, this speeds up the processes further and helps to ensure there is less chance of mistakes happening, though the player can still change the data (perhaps they want to donate on behalf of someone). Once the player donates through the MOTD they automatically get the rank within a few seconds.

http://www.wullysgamers.co.uk/motd/index.php?steamid=STEAM_0:0:14806053&mapname=gm_flatgrass&hostname=Donate


Requirements:


Installation:

https://github.com/Wully616/PUDS/wiki/Installation-Tutorial-%5BPartially-Outdated!%5D

PayPal Sandbox Testing Tutorial:
https://github.com/Wully616/PUDS/wiki/PayPal-Sandbox-Tutorial

Changelog:
Code: [Select]
Minor Fix

A login loop was caused by a function being commented out. This is now fixed.

Version 0.2.7

Implemented a new login system.
Fixed directory redirection using absolute referencing
Implemented, broke, then fixed a web based config!

Version 0.2.6
Fixed Steam login issue.
PUDS has some config changes be sure to check the config.php file!
PUDS now requires a Steam API key! http://steamcommunity.com/dev/registerkey

Version 0.2.5

Escaped MySQL inputs.

Version 0.2.4

Users can now log into Steam to get their ingame name/SteamID to simplify the process.
Checked the first rank on the donation page by default to make sure something is indeed sent to paypal.

Version 0.2.3

Fixed broken rcon commands.
Fixed db config (again)

Version 0.2.2

Escaped database username/passwords etc. (oops)
Added option in the config file to specify the command for each rank
Fixed issue with closing mysql connection when DB wasn't in use. (Thanks born2beatu)
Fixed undefined variables for the config file. (Thanks born2beatu)
Fixed depreciated eregi in paypal.class.php to preg_match. (Thanks born2beatu)

Added install.php form to write a config file - WIP

Version 0.2.1
Fixed: New lines in the log not working,
Fixed: Security issue where rcon passwords were shown in log file and could be accessed if user didn't change the log file permissions. (removed displaying the password)

Version 0.2:

Made the web application more easily configurable (everything is now done in config.php)
Donation prices and ranks are stored in arrays and the index.php is dynamically generated based on the number of ranks/prices. (So you can now enter as many ranks/prices as you wish in the config.php file and don't need to edit the index.php file or ipn.php file anymore!)


Download:

Right here: https://github.com/Wully616/PUDS


Support:

If you wish to support me I would appreciate any donations for helping to automate your server donations :D

Donate to Wully Here
« Last Edit: February 04, 2014, 10:39:52 AM by Wully616 »
[/url]

Offline Panicx72

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
Re: PUDS - PayPal-ULX Donation System
« Reply #1 on: August 05, 2013, 02:44:12 PM »
Thanks a <censor> lot!
Testing it right away.


Edit: After some struggling got it to work!
« Last Edit: August 05, 2013, 04:10:01 PM by Panicx72 »

Offline TheAndroid1

  • Newbie
  • *
  • Posts: 7
  • Karma: 0
Re: PUDS - PayPal-ULX Donation System
« Reply #2 on: August 07, 2013, 11:04:04 AM »
<Edit - JamminR> No need to quote entire first post.
I am willing to make a Lua addon for this which syncs with the MySQL DB if you like because using RCon is unreliable, I will start when I have the time.
Also if I get around to it I could maybe send you some CSS or something to make this look a little nicer?
Add me on Steam at http://steamcommunity.com/id/theandroid1/
« Last Edit: August 07, 2013, 02:27:26 PM by JamminR »

Offline SatoshiAaron

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
Re: PUDS - PayPal-ULX Donation System
« Reply #3 on: August 08, 2013, 10:41:39 AM »
I've just payed for one of these ;~; Only yesterday too D:

Offline Wully616

  • Jr. Member
  • **
  • Posts: 64
  • Karma: 10
    • WullysGamers
Re: PUDS - PayPal-ULX Donation System
« Reply #4 on: August 09, 2013, 07:21:00 AM »
I've just payed for one of these ;~; Only yesterday too D:

As long as it wasn't this one someone sold you :P
[/url]

Offline BlueGhostHD

  • Newbie
  • *
  • Posts: 10
  • Karma: 0
Re: PUDS - PayPal-ULX Donation System
« Reply #5 on: August 12, 2013, 03:27:34 PM »
Hmm, I cant get it to work with my Database, but other than that it runs perfect.

Offline Wully616

  • Jr. Member
  • **
  • Posts: 64
  • Karma: 10
    • WullysGamers
Re: PUDS - PayPal-ULX Donation System
« Reply #6 on: August 14, 2013, 02:00:58 AM »
Hmm, I cant get it to work with my Database, but other than that it runs perfect.


What sort of issue are you having with your database, is there any errors?
Have you previously created a table called donations or something else?

The ipn.php file automatically creates a new table in your database called donations or whatever $DBTABLE is set to in config.php. If you already have a table created but do not have any fields in the table it may fail to create the fields since the script will assume the fields are already there as the table exists.
[/url]

Offline Bite That Apple

  • Hero Member
  • *****
  • Posts: 858
  • Karma: 416
  • Apple Innovations 2010®
    • Fun 4 Everyone Gaming
Re: PUDS - PayPal-ULX Donation System
« Reply #7 on: August 14, 2013, 03:30:54 AM »
Very nice idea here. When I have time later today, I'll take a look at it and give it a spin on sandbox.paypal.com
Quote from: John F. Kennedy 1963
A man may die, nations may rise and fall, but an idea lives on.

Offline Wully616

  • Jr. Member
  • **
  • Posts: 64
  • Karma: 10
    • WullysGamers
Re: PUDS - PayPal-ULX Donation System
« Reply #8 on: August 14, 2013, 08:20:19 AM »
Added an example of my own donation MOTD on the op.

Very nice idea here. When I have time later today, I'll take a look at it and give it a spin on sandbox.paypal.com

Thank you chaos, let me know if there is any issues!



[/url]

Offline Bite That Apple

  • Hero Member
  • *****
  • Posts: 858
  • Karma: 416
  • Apple Innovations 2010®
    • Fun 4 Everyone Gaming
Re: PUDS - PayPal-ULX Donation System
« Reply #9 on: August 15, 2013, 03:54:55 AM »
Added an example of my own donation MOTD on the op.

Thank you chaos, let me know if there is any issues!

I'm not the best with Paypal, and maybe other people may not be. So I would suggest maybe put a little more instruction on this thread or maybe the readme. Maybe even make a youtube video on it.

 I literlly spent like three hours just trying to get anything to work, sadly I was unable to get it to work. Though, it might just be a me, but sandbox.paypal is acting stupid..
« Last Edit: August 15, 2013, 04:12:46 AM by chaos13125 »
Quote from: John F. Kennedy 1963
A man may die, nations may rise and fall, but an idea lives on.

Offline Wully616

  • Jr. Member
  • **
  • Posts: 64
  • Karma: 10
    • WullysGamers
Re: PUDS - PayPal-ULX Donation System
« Reply #10 on: August 15, 2013, 06:34:26 PM »
I'm not the best with Paypal, and maybe other people may not be. So I would suggest maybe put a little more instruction on this thread or maybe the readme. Maybe even make a youtube video on it.

 I literlly spent like three hours just trying to get anything to work, sadly I was unable to get it to work. Though, it might just be a me, but sandbox.paypal is acting stupid..

I'm looking to work with TheAndroid1 to make it more userfriendly and configurable view a webbased GUI, but I will certainly create more of a step by step tutorial tomorrow to explain the installation.
[/url]

Offline Bite That Apple

  • Hero Member
  • *****
  • Posts: 858
  • Karma: 416
  • Apple Innovations 2010®
    • Fun 4 Everyone Gaming
Re: PUDS - PayPal-ULX Donation System
« Reply #11 on: August 15, 2013, 07:10:03 PM »
I'm looking to work with TheAndroid1 to make it more userfriendly and configurable view a webbased GUI, but I will certainly create more of a step by step tutorial tomorrow to explain the installation.

Glad to hear you've made friends here on the ulx forums to help you. Though, I don't host servers anymore, and I made addons for ulx myself now, I like to test other people's addons and see fit that they work good and correctly.

I hope to see ulx server that do donations use this.
Quote from: John F. Kennedy 1963
A man may die, nations may rise and fall, but an idea lives on.

Offline Wully616

  • Jr. Member
  • **
  • Posts: 64
  • Karma: 10
    • WullysGamers
Re: PUDS - PayPal-ULX Donation System
« Reply #12 on: August 18, 2013, 05:47:43 AM »
Updated:

  • Made the web application more easily configurable (everything is now done in config.php)
  • Donation prices and ranks are stored in arrays and the index.php is dynamically generated based on the number of ranks/prices. (So you can now enter as many ranks/prices as you wish in the config.php file and don't need to edit the index.php file or ipn.php file anymore!)

I have also created a tutorial, forgive the formatting on github, it's my first time using it to create a wiki  ;)

https://github.com/Wully616/PUDS/wiki/Installation-Tutorial
[/url]

Offline Bite That Apple

  • Hero Member
  • *****
  • Posts: 858
  • Karma: 416
  • Apple Innovations 2010®
    • Fun 4 Everyone Gaming
Re: PUDS - PayPal-ULX Donation System
« Reply #13 on: August 18, 2013, 05:49:17 AM »
Updated:

  • Made the web application more easily configurable (everything is now done in config.php)
  • Donation prices and ranks are stored in arrays and the index.php is dynamically generated based on the number of ranks/prices. (So you can now enter as many ranks/prices as you wish in the config.php file and don't need to edit the index.php file or ipn.php file anymore!)

I have also created a tutorial, forgive the formatting on github, it's my first time using it to create a wiki  ;)

https://github.com/Wully616/PUDS/wiki/Installation-Tutorial

Very nice mate. That's what I'm talking about. I'll take a look when I have time, at this moment dealing with a table issue.
Quote from: John F. Kennedy 1963
A man may die, nations may rise and fall, but an idea lives on.

Offline bender180

  • Full Member
  • ***
  • Posts: 217
  • Karma: 42
    • Benders Villa
Re: PUDS - PayPal-ULX Donation System
« Reply #14 on: August 18, 2013, 09:07:28 AM »
having a small issue after the paypal transaction is complete the donator gets this as an email
Code: [Select]
Thank you for your purchase

Your rank information
-------------------------
Paid:
SteamID:
Rank:
-------------------------

There has been an issue when adding your SteamID to the correct usergroup.
Please contact the server admin to resolve this issue.
Ive tested it my self and i get the same results if i check the php table the info is there (seen here: https://dl.dropboxusercontent.com/u/2418443/images/php.JPG)
i get the money from the transaction and im positive i set up the config.php correctly.

EDIT: upon investigation i found in the error log
Quote
Unable to connect!Unable to connect to Rcon, please check your configuration.
the ip the port and the pass are all correct im not sure what the issue is....
« Last Edit: August 18, 2013, 09:28:58 AM by bender180 »
Made community pool and community bowling and for the life of me couldn't tell you why they are popular.
Also made the ttt ulx commands.