• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Fixed Paypal Script

This script works, I can assure you that.
I had problems in the beginning until I realized how stupid I was

My solution for the auto point adding problem was that I forgot to change
account.name to account.id because of my usage of TFS 0.2.5
 
Code:
<?
$mysql_host = 'localhost'; //Leave at localhost
$mysql_user = 'root'; //DB User
$mysql_pass = '#####'; //DB Pass
$mysql_db = '########'; //DB Name 
$file = 'paypal1.log'; //Paypal Log Name will be placed in the same location as your ipn.php file 

$custom = stripslashes(ucwords(strtolower(trim($_REQUEST['custom']))));  
$receiver_email = $_REQUEST['receiver_email'];  
$payment_status = $_REQUEST['payment_status'];  
$mc_gross = $_REQUEST['mc_gross'];  
$payer_email = $_REQUEST['payer_email']; 

$somecode = "'$custom' '$payer_email' '$mc_gross'"; 

// connect db  

$db = mysql_connect($mysql_host, $mysql_user, $mysql_pass);  
mysql_select_db($mysql_db, $db);  
if ($payment_status == "Completed" & $receiver_email == "#############" & $mc_gross == "10.00") {  

$query = "SELECT premium_points FROM accounts WHERE accounts.id = '$custom'";  

$result = mysql_query($query);

$prem = mysql_fetch_array($result);  

$points = $prem['premium_points'] + 220;
[COLOR="Red"][B]// $points = mysql_query($prem)[/B][/COLOR]  
$qry2 = "UPDATE accounts SET premium_points = '$points' WHERE accounts.id = '$custom'";  
// Log Paypal Transaction 
$hak = fopen($file, "a"); 
fwrite($hak, $somecode); 
fclose($hak);

$result2 = mysql_query($qry2);  
}  
else  
 {   
 echo("Error.");  
 }  
?>

Should the part ive highlighted be commented out like that?
 
Look, this helps but still if you have it at 5.00 then you can donate in any currency so how secure is this?.. i mean you could have puted mc_currency or w/e it is to so they put

$mc_currency = $_REQUEST['mc_currency'];

if($mc_currency = "EUR")
{
And the stuff here =P
}

Rep++ if this helped (A) lol xD
 
It doesn't works for me. I configured my paypal account to enable IPN messages, I setup the paypal file and ipn one. When I view the IPN history it does say that message has failed connection with the server. So I guess that in htaccess there is something wrong with the ip's. Anyone know how to fix it?
 
tech1.org/paypal2.tar.gz

It's "100%" secure, using mc_currency and all.
 
Back
Top