[REL] PayGol IPN - Automatic Mobile VIP - 100% Working.

Sledmore

Chaturbate Livestreamer
Staff member
FindRetros Moderator
Jul 24, 2010
5,199
3,934
Hey guys,

Today I'm going to release my IPN script for PayGol, I made this in a few minutes, very simple to make, you can change it I put comments on it.

It's default set with CloudFlare, and to connect with RevCMS, may want to change directory, I had it in; 'misc/paygol', hence the '../../'.

paygol.php:


HTML Form:


SQL: (If you keep the logging).


Notes:
  • In paygol.php, choose to delete or keep the CloudFLare option.
  • In paygol.php change the custom field to what you desire.
  • In paygol.php change the service ID to what you require.
  • In paygol.php change or remove or keep the logging to what you require.
  • In paygol.php change how the user get's VIP, in my example it's set for monthly payments via how I did it on the CMS.
  • In the HTML Form, change the currency, price and service ID, and return URL.
  • Might want to change the auto increment in the SQL, and maybe the fields.
- EDIT: -

Forgot to say, you can put your service into testing mode, and PayGol let you test it for free, do not publish the script live whilst in testing mode, or users will have VIP for free! Remember to turn it off once done! :D

- Cheers.
 

Sledmore

Chaturbate Livestreamer
Staff member
FindRetros Moderator
Jul 24, 2010
5,199
3,934
I'll try this out as soon as my site is back up :)

Good to hear, also I forgot to put in my first post, but you can put your service into testing mode, to ensure it works, basically choose testing mode, and click to buy, and it'll let you 'buy' it for free, and you will see if you got ranked :).

Might have to give this a whirl :)

Good to hear! :D
 
Sep 15, 2012
70
2
PHP:
$getInfo = mysql_fetch_assoc(mysql_query("SELECT * FROM users WHERE name = '".$custom."'"));
    mysql_query("INSERT INTO users_subscriptions (userid,email,date_bought,category) VALUES('".$getInfo['id']."','Bought via Mobile.','".time()."','VIP')");
    mysql_query("INSERT INTO `logs_paygol_payments` (username,ip_address,timestamp,currency,price) VALUES ('".$custom."', '".$_SERVER['REMOTE_ADDR']."', '".time()."', '".$currency."', '".$price."')");//Log this.

How do I make it so it will give them the exact rank I want them to have, and how long it lasts for.. MySQL is the only language I'm not really confident in.. Lol.

Help would be appreciated! :)
 

Sledmore

Chaturbate Livestreamer
Staff member
FindRetros Moderator
Jul 24, 2010
5,199
3,934
PHP:
$getInfo = mysql_fetch_assoc(mysql_query("SELECT * FROM users WHERE name = '".$custom."'"));
    mysql_query("INSERT INTO users_subscriptions (userid,email,date_bought,category) VALUES('".$getInfo['id']."','Bought via Mobile.','".time()."','VIP')");
    mysql_query("INSERT INTO `logs_paygol_payments` (username,ip_address,timestamp,currency,price) VALUES ('".$custom."', '".$_SERVER['REMOTE_ADDR']."', '".time()."', '".$currency."', '".$price."')");//Log this.

How do I make it so it will give them the exact rank I want them to have, and how long it lasts for.. MySQL is the only language I'm not really confident in.. Lol.

Help would be appreciated! :)

PHP:
mysql_query("UPDATE `users` SET `rank` = 'VIPRANK' WHERE `username` = '".$custom."'");

As for auto expiry, I did that myself in the CMS, so you'll have to work that out, sorry.
 

-Jordan-

Member
Feb 19, 2011
71
5
PHP:
$getInfo = mysql_fetch_assoc(mysql_query("SELECT * FROM users WHERE name = '".$custom."'"));
    mysql_query("INSERT INTO users_subscriptions (userid,email,date_bought,category) VALUES('".$getInfo['id']."','Bought via Mobile.','".time()."','VIP')");
    mysql_query("INSERT INTO `logs_paygol_payments` (username,ip_address,timestamp,currency,price) VALUES ('".$custom."', '".$_SERVER['REMOTE_ADDR']."', '".time()."', '".$currency."', '".$price."')");//Log this.

How do I make it so it will give them the exact rank I want them to have, and how long it lasts for.. MySQL is the only language I'm not really confident in.. Lol.

Help would be appreciated! :)
Use a cron script to check for dates, run it every hour or so... there are better ways, thats just all I can think off right now lol.
 

Users who are viewing this thread

Top