Raised This Month: $32 Target: $400
 8% 

[ANY] PayPal Donations (Advanced)


Post New Thread Reply   
 
Thread Tools Display Modes
michaelrw
Senior Member
Join Date: Jul 2017
Old 01-09-2018 , 04:28   Re: [ANY] PayPal Donations (Advanced)
Reply With Quote #61

ive added functionality to where you can have multiple tiers that will create entry into sourcebans database and assign different flags and/or admin group to each user (all inside of the sb_admins table). There is also a separate query to the paypal_donations database that keeps track of all the donations info separately.

What im working on now is a new query that, based on which donation tier you buy/select, will provide access to a particular server or server group (especially useful for communities with multiple servers on their sourcebans database). Without this, assigning flags and admin groups is pointless because the user still needs to be granted access to a server.. (remember, when you make new admins in SB, you not only have to assign privileges or a admin group, but you also have to designate which server(s) or server groups (if you have created server groups) you want these permissions to be applicable on. If you do not, then they will not have privs on any server.
The problem Im having is, in order to assign server or server group access via a db query, I need to know the admin id of the user. The admin id of the user is generated when the first db query 'INSERT' is submitted .. the admin id is simply a unique index value that depends on how many other admins are in the database at the time of the creation. MySQL performs an AUTO INCREMENT and assigns the new 'admin', or VIP in this case, a unique index that +1 from the previous. But, I need a way of pulling that index, after it is created in the first query, storing it in a php variable, then passing it into my second query that will assign sever/server_group access to that particular id.

I do not know how this can be done.. I know it can be, I just dont know how.. if anyone is experienced with this stuff, im more than willing to send you the code and you can take a crack at it.

here is a glimpse:

Query 1 (to create the admin/VIP):
PHP Code:
if ($item_name == "Tier 1: Remove Ads"){
      
$db2->query('INSERT INTO sb_admins (user, authid, email, srv_group, srv_flags) VALUES (?, ?, ?, ?, ?)', [
        
$steamid,
        
$steamid,
        
$payer_email,
        
$tier1_group,
        
$tier1_sbflags
    
]);} elseif ($item_name == "Tier 2: VIP"){
      
$db2->query('INSERT INTO sb_admins (user, authid, email, srv_group, srv_flags) VALUES (?, ?, ?, ?, ?)', [
        
$steamid,
        
$steamid,
        
$payer_email,
        
$tier2_group,
        
$tier2_sbflags
    
]);}

// admin_id is created automatically via AUTO INCREMENT when this query is run and the new admin/vip is added to the table.. i will need this number below 
Query 2 (to assign server/server_group access):
PHP Code:
    $aid // I need to find a way to get the admin_id for this user, and use it below to insert into `sb_admins_servers_groups` table

    
if ($item_name == "Tier 1: Remove Ads"){
      
$db2->query('INSERT INTO sb_admins_servers_groups (admin_id, group_id, srv_group_id, server_id) VALUES (?, ?, ?, ?)', [
        
$aid,
        
$tier1_group_id,
        
$tier1_srvr_group,
        
$tier1_srvr_id
    
]);} elseif ($item_name == "Tier 2: VIP"){
      
$db2->query('INSERT INTO sb_admins_servers_groups (admin_id, group_id, srv_group_id, server_id) VALUES (?, ?, ?, ?)', [
        
$aid,
        
$tier2_group_id,
        
$tier2_srvr_group,
        
$tier2_srvr_id
    
]);} 
__________________

michaelrw is offline
malec321
Senior Member
Join Date: May 2009
Location: Los Angeles
Old 01-31-2018 , 02:18   Re: [ANY] PayPal Donations (Advanced)
Reply With Quote #62

PHP Code:
Warningmysqli::__construct(): (HY000/1044): Access denied for user 'sql3218758'@'%' to database 'paypal' in /storage/ssd5/113/4494113/public_html/classes/Database.php on line 22
Failed to connect to database

This is the error I get.. I have the correct API set + made sure 50 times that I entered the correct database info...

Any ideas what I am possibly doing wrong?

Here is the link

https://donationcenter.000webhostapp.com/

The main page runs fine you can login to steam, but once you try hitting donation it gives that error
__________________
Ayyylmao
malec321 is offline
Arkarr
Veteran Member
Join Date: Sep 2012
Location: Just behind my PC screen
Old 01-31-2018 , 03:19   Re: [ANY] PayPal Donations (Advanced)
Reply With Quote #63

Quote:
Originally Posted by malec321 View Post
PHP Code:
Warningmysqli::__construct(): (HY000/1044): Access denied for user 'sql3218758'@'%' to database 'paypal' in /storage/ssd5/113/4494113/public_html/classes/Database.php on line 22
Failed to connect to database

This is the error I get.. I have the correct API set + made sure 50 times that I entered the correct database info...

Any ideas what I am possibly doing wrong?

Here is the link

https://donationcenter.000webhostapp.com/

The main page runs fine you can login to steam, but once you try hitting donation it gives that error
Pretty sure 000webhistapp.com doesn't allow you to connect to external database or something like that if you are a free user. I remember having trouble with them.
__________________
Want to check my plugins ?

Last edited by Arkarr; 01-31-2018 at 03:20.
Arkarr is offline
malec321
Senior Member
Join Date: May 2009
Location: Los Angeles
Old 01-31-2018 , 11:52   Re: [ANY] PayPal Donations (Advanced)
Reply With Quote #64

Quote:
Originally Posted by Arkarr View Post
Pretty sure 000webhistapp.com doesn't allow you to connect to external database or something like that if you are a free user. I remember having trouble with them.
Yea I realized that so I just use the 000webhost for the hosting and am using myfreesqlhosting which allows remote access.

With that I am getting this error
__________________
Ayyylmao
malec321 is offline
nhnkl159
Senior Member
Join Date: Jul 2012
Location: Israel 3>
Old 01-31-2018 , 15:33   Re: [ANY] PayPal Donations (Advanced)
Reply With Quote #65

Quote:
Originally Posted by michaelrw View Post
ive added functionality to where you can have multiple tiers that will create entry into sourcebans database and assign different flags and/or admin group to each user (all inside of the sb_admins table). There is also a separate query to the paypal_donations database that keeps track of all the donations info separately.

What im working on now is a new query that, based on which donation tier you buy/select, will provide access to a particular server or server group (especially useful for communities with multiple servers on their sourcebans database). Without this, assigning flags and admin groups is pointless because the user still needs to be granted access to a server.. (remember, when you make new admins in SB, you not only have to assign privileges or a admin group, but you also have to designate which server(s) or server groups (if you have created server groups) you want these permissions to be applicable on. If you do not, then they will not have privs on any server.
The problem Im having is, in order to assign server or server group access via a db query, I need to know the admin id of the user. The admin id of the user is generated when the first db query 'INSERT' is submitted .. the admin id is simply a unique index value that depends on how many other admins are in the database at the time of the creation. MySQL performs an AUTO INCREMENT and assigns the new 'admin', or VIP in this case, a unique index that +1 from the previous. But, I need a way of pulling that index, after it is created in the first query, storing it in a php variable, then passing it into my second query that will assign sever/server_group access to that particular id.

I do not know how this can be done.. I know it can be, I just dont know how.. if anyone is experienced with this stuff, im more than willing to send you the code and you can take a crack at it.

here is a glimpse:

Query 1 (to create the admin/VIP):
PHP Code:
if ($item_name == "Tier 1: Remove Ads"){
      
$db2->query('INSERT INTO sb_admins (user, authid, email, srv_group, srv_flags) VALUES (?, ?, ?, ?, ?)', [
        
$steamid,
        
$steamid,
        
$payer_email,
        
$tier1_group,
        
$tier1_sbflags
    
]);} elseif ($item_name == "Tier 2: VIP"){
      
$db2->query('INSERT INTO sb_admins (user, authid, email, srv_group, srv_flags) VALUES (?, ?, ?, ?, ?)', [
        
$steamid,
        
$steamid,
        
$payer_email,
        
$tier2_group,
        
$tier2_sbflags
    
]);}

// admin_id is created automatically via AUTO INCREMENT when this query is run and the new admin/vip is added to the table.. i will need this number below 
Query 2 (to assign server/server_group access):
PHP Code:
    $aid // I need to find a way to get the admin_id for this user, and use it below to insert into `sb_admins_servers_groups` table

    
if ($item_name == "Tier 1: Remove Ads"){
      
$db2->query('INSERT INTO sb_admins_servers_groups (admin_id, group_id, srv_group_id, server_id) VALUES (?, ?, ?, ?)', [
        
$aid,
        
$tier1_group_id,
        
$tier1_srvr_group,
        
$tier1_srvr_id
    
]);} elseif ($item_name == "Tier 2: VIP"){
      
$db2->query('INSERT INTO sb_admins_servers_groups (admin_id, group_id, srv_group_id, server_id) VALUES (?, ?, ?, ?)', [
        
$aid,
        
$tier2_group_id,
        
$tier2_srvr_group,
        
$tier2_srvr_id
    
]);} 

That's a bad way doing this, pretty lucky I've seen this thread while making my own VIP System..

https://i.imgur.com/07S4xlw.png

Integrate it into sb might be bit problem , but there are some ways that can be done with some time.
__________________

Last edited by nhnkl159; 01-31-2018 at 15:33.
nhnkl159 is offline
Send a message via Skype™ to nhnkl159
michaelrw
Senior Member
Join Date: Jul 2017
Old 02-05-2018 , 00:34   Re: [ANY] PayPal Donations (Advanced)
Reply With Quote #66

Quote:
Originally Posted by nhnkl159 View Post
That's a bad way doing this, pretty lucky I've seen this thread while making my own VIP System..

https://i.imgur.com/07S4xlw.png

Integrate it into sb might be bit problem , but there are some ways that can be done with some time.
what is this image you show?

also, im not a coder so i dont know why what i did is bad. I was just trying to use what i know, and trying to add real sourcebans support. is there a better way of doing this? link?
__________________


Last edited by michaelrw; 02-05-2018 at 00:34.
michaelrw is offline
meister
Junior Member
Join Date: Nov 2014
Location: Singapore
Old 09-08-2019 , 08:12   Re: [ANY] PayPal Donations (Advanced)
Reply With Quote #67

Quote:
Originally Posted by michaelrw View Post
what is this image you show?

also, im not a coder so i dont know why what i did is bad. I was just trying to use what i know, and trying to add real sourcebans support. is there a better way of doing this? link?
You could try checking GitHub: https://github.com/sourcemod-donations
__________________
meister is offline
Vulden
Junior Member
Join Date: Aug 2019
Old 09-09-2019 , 09:45   Re: [ANY] PayPal Donations (Advanced)
Reply With Quote #68

I also have the issue when I log in I keep going back to the login page never any futher any suggestions?
__________________
Jailbreak server 198.20.96.211:27015 feel free to come and have a look!
Vulden is offline
BReeZ
AlliedModders Donor
Join Date: Feb 2013
Location: Denmark
Old 02-05-2020 , 04:34   Re: [ANY] PayPal Donations (Advanced)
Reply With Quote #69

Hello,

(CS:GO Linux)

How's the plugin holding up now after Panorama update? Will it give a link in print chat for ingame players?

Demo page is not working. Anyone has a screenshot of how the panel looks like?

Any current "issues" with the plugin you should be worried about?
I read through comments, and it looks like you can't do subscriptions (only one time payments).

Cheers!
__________________
BReeZ is offline
ItsCEED
Member
Join Date: Jun 2016
Old 02-11-2020 , 08:36   Re: [ANY] PayPal Donations (Advanced)
Reply With Quote #70

Quote:
Originally Posted by BReeZ View Post
Hello,

(CS:GO Linux)

How's the plugin holding up now after Panorama update? Will it give a link in print chat for ingame players?

Demo page is not working. Anyone has a screenshot of how the panel looks like?

Any current "issues" with the plugin you should be worried about?
I read through comments, and it looks like you can't do subscriptions (only one time payments).

Cheers!
Judging by your website, you are capable of developing custom things.

I highly suggest to create your own donation system that integrates with SourceBans
ItsCEED is offline
Send a message via Skype™ to ItsCEED
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 17:27.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode