Raised This Month: $51 Target: $400
 12% 

[ANY] PayPal Donations (Advanced)


Post New Thread Reply   
 
Thread Tools Display Modes
michaelrw
Senior Member
Join Date: Jul 2017
Old 10-24-2017 , 03:22   Re: [ANY] PayPal Donations (Advanced)
Reply With Quote #21

when i log into website via Steam, it returns me to login page without giving option to pay for donation
Spoiler
michaelrw is offline
Triniayo
Senior Member
Join Date: Apr 2011
Location: #include <germany>
Old 10-24-2017 , 04:38   Re: [ANY] PayPal Donations (Advanced)
Reply With Quote #22

Post your config file please, and apache error log.
__________________
If you need any help, feel free to add me on Steam.


Triniayo is offline
Send a message via Skype™ to Triniayo
Triniayo
Senior Member
Join Date: Apr 2011
Location: #include <germany>
Old 10-24-2017 , 05:25   Re: [ANY] PayPal Donations (Advanced)
Reply With Quote #23

Quote:
Originally Posted by nguyenbaodanh View Post
does this work with sourcebans ?
If you want it for sourcebans, please edit "../classes/paypal-listener,php".

Replace the code with this code:

PHP Code:
<?php //namespace Listener;

require __DIR__.'/paypal-api.php';
require 
__DIR__.'/../includes/db.php';
require 
__DIR__.'/../config.php';

use 
PaypalIPN;

$ipn = new PaypalIPN();

// Uncomment below, if you want to use sandbox
//$ipn->useSandbox();

$verified $ipn->verifyIPN();
if (
$verified) {
    
/*
     * Process IPN
     * A list of variables is available here:
     * https://developer.paypal.com/webapps/developer/docs/classic/ipn/integration-guide/IPNandPDTVariables/
     */
    
$item_name        $_POST['item_name'];
    
$item_number      $_POST['item_number'];
    
$payment_status   $_POST['payment_status'];
    
$payment_amount   $_POST['mc_gross'];
    
$payment_currency $_POST['mc_currency'];
    
$txn_id           $_POST['txn_id'];
    
$receiver_email   $_POST['receiver_email'];
    
$payer_email      $_POST['payer_email'];
    
$steamid          $_POST['custom'];
    
$payment_date date('Y-m-d H:i:s');
    
$db->query('INSERT INTO sb_admins (user, authid, email, srv_flags) VALUES (?, ?, ?, ?)', [
      
$steamid,
      
$steamid,
      
$payer_email,
      
$sourcebans_flag
    
]);
}

// Reply with an empty 200 response to indicate to paypal the IPN was received correctly.
header("HTTP/1.1 200 OK");
After this, edit your Config.php and replace everything with this code:

PHP Code:
<?php
    
/*
     * Donation Amounts
    */
    
$amount_tier1 "5.00"// Donation Amount for Tier 1
    
$amount_tier2 "10.00"// Donation Amount for Tier 2
    
$amount_tier3 "15.00"// Donation Amount for Tier 3
    
$amount_tier4 "25.00"// Donation Amount for Tier 4
    
$amount_tier5 "50.00"// Donation Amount for Tier 5
    
    /*
     * PayPal Settings
    */
    
    // Enter the currency which you use. (for example: EUR, USD, CHF)
    
$paypal_currency "EUR";
    
    
/*
     * PayPal URL
     * Sandbox-URL: https://www.sandbox.paypal.com/cgi-bin/webscr
     * Live-URL: https://www.paypal.com/cgi-bin/webscr
    */
    
$paypal_url "https://www.paypal.com/cgi-bin/webscr";
    
// Enter your PayPal E-Mail here.
    
$paypal_email "[email protected]";
    
//Enter your Notify URL here.
    
$notify_url "https://yourwebsite.com/donate/classes/paypal-listener.php";
    
// Enter your Success URL here.
    
$success_url "https://yourwebsite.com/donate/verify_success.php";
    
// Enter your Error URL here.
    
$cancel_url "https://yourwebsite.com/donate/verify_error.php";
    
    
/*
     * Steam API Settings
    */
    
    // Enter your API Key here - You can find it at: http://steamcommunity.com/dev/apikey
    
$steamauth['apikey'] = "YOUR-API-KEY";
    
    
// URL of your main website
    
$steamauth['domainname'] = "http://yourdomain.com/donate";
    
    
// URL which user get redirected to after logout
    
$steamauth['logoutpage'] = "http://yourdomain.com/donate";
    
    
// URL which user get redirected to after login
    
$steamauth['loginpage'] = "http://yourdomain.com/donate";

  
// Custom Sourcemod-Flag which donators receive after donating
  
$sourcebans_flag "t";
__________________
If you need any help, feel free to add me on Steam.



Last edited by Triniayo; 10-24-2017 at 05:27.
Triniayo is offline
Send a message via Skype™ to Triniayo
freak.exe_uLow
AlliedModders Donor
Join Date: Jul 2012
Location: Germany
Old 10-24-2017 , 05:54   Re: [ANY] PayPal Donations (Advanced)
Reply With Quote #24

Wow, and i buy for 3 days sdonate donation system...i hate my life

and thanks for share FreakyLike
freak.exe_uLow is offline
Triniayo
Senior Member
Join Date: Apr 2011
Location: #include <germany>
Old 10-24-2017 , 06:27   Re: [ANY] PayPal Donations (Advanced)
Reply With Quote #25

Quote:
Originally Posted by freak.exe_uLow View Post
Wow, and i buy for 3 days sdonate donation system...i hate my life

and thanks for share FreakyLike
You're welcome
__________________
If you need any help, feel free to add me on Steam.


Triniayo is offline
Send a message via Skype™ to Triniayo
ph
AlliedModders Donor
Join Date: Mar 2006
Old 10-24-2017 , 08:44   Re: [ANY] PayPal Donations (Advanced)
Reply With Quote #26

Does it support subscriptions ?
__________________
ph is offline
Triniayo
Senior Member
Join Date: Apr 2011
Location: #include <germany>
Old 10-24-2017 , 08:54   Re: [ANY] PayPal Donations (Advanced)
Reply With Quote #27

Quote:
Originally Posted by ph View Post
Does it support subscriptions ?
No. It's designed for one-time donations.
__________________
If you need any help, feel free to add me on Steam.


Triniayo is offline
Send a message via Skype™ to Triniayo
michaelrw
Senior Member
Join Date: Jul 2017
Old 10-24-2017 , 19:06   Re: [ANY] PayPal Donations (Advanced)
Reply With Quote #28

Quote:
Originally Posted by FreakyLike View Post
Post your config file please, and apache error log.
https://pastebin.com/dQVDrrZz

i dont have any error logs that i see (unless i am not looking in the right place)
michaelrw is offline
Triniayo
Senior Member
Join Date: Apr 2011
Location: #include <germany>
Old 10-25-2017 , 02:56   Re: [ANY] PayPal Donations (Advanced)
Reply With Quote #29

Could you contact me on steam? So we can figure this out.
__________________
If you need any help, feel free to add me on Steam.



Last edited by Triniayo; 10-25-2017 at 02:56.
Triniayo is offline
Send a message via Skype™ to Triniayo
michaelrw
Senior Member
Join Date: Jul 2017
Old 10-26-2017 , 00:04   Re: [ANY] PayPal Donations (Advanced)
Reply With Quote #30

Quote:
Originally Posted by FreakyLike View Post
Could you contact me on steam? So we can figure this out.
will do
michaelrw is offline
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 13:27.


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