• 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

Sync

Ø,ø
Joined
May 26, 2009
Messages
1,901
Reaction score
26
Location
Canada
Well this script was made by Sliver and posted in the Paypal Script thread but its at the back and not many people see it. What it does is block the people from using 1 cent donations.

ALL the credits go to Sliver for Making it not possible to make invalid payments, and Credit to Artii and or Gunz for creating the actual script.

Change the
Code:
$mc_gross == "##.##") {
To the ammount your soppose to receive

example:
Code:
$mc_gross == "5.00") {

Heres the full IPN code (Update: He made it Log the paypal Email and the Character name now aswell)
Code:
<?  
$mysql_host = 'localhost'; //Leave at localhost  
$mysql_user = 'root'; //DB User  
$mysql_pass = ''; //DB Pass  
$mysql_db = ''; //DB Name  
$file = 'paypal.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 == "[email protected]" & $mc_gross == "##.##") {  

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

$result = mysql_query($query);  

$prem = mysql_fetch_array($result);  

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

$result2 = mysql_query($qry2);  
}  
else  
 {   
 echo("Error.");  
 }  
?>
 
Last edited:
Very helpful! Looks nice.
Dare I say, thank you ;)

Although, it's a bit different from Artii's and 0.2 TFS, you may have to post a bit more information on it to be beneficial for everybody :p

Red
 
Last edited:
Thanks Chris! I've also created the ipn.php file to log all of the transactions so you can Ban the accounts that do chargebacks.

Anyone interested?
 
Thanks Chris! I've also created the ipn.php file to log all of the transactions so you can Ban the accounts that do chargebacks.

Anyone interested?

Very! Send me a PM and add my msn ^_^

Red
 
Well this script was made by Sliver and posted in the Paypal Script thread but its at the back and not many people see it. What it does is block the people from using 1 cent donations.

ALL the credits go to Sliver.

Change the
Code:
$mc_gross == "##.##") {
To the ammount your soppose to receive

example:
Code:
$mc_gross == "5.00") {

Heres the full IPN code
Code:
<? 
$mysql_host = 'localhost'; //Leave at localhost 
$mysql_user = 'root'; //DB User 
$mysql_pass = ''; //DB Pass 
$mysql_db = ''; //DB Name 

$custom = stripslashes(ucwords(strtolower(trim($_REQUEST['custom'])))); 
$receiver_email = $_REQUEST['receiver_email']; 
$payment_status = $_REQUEST['payment_status']; 
$mc_gross = $_REQUEST['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 == "[email protected]" & $mc_gross == "##.##") { 

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

$result = mysql_query($query); 

$prem = mysql_fetch_array($result); 

$points = $prem['premium_points'] + 12; 
// $points = mysql_query($prem) 
$qry2 = "UPDATE accounts SET premium_points = '$points' WHERE accounts.name = '$custom'"; 

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

Actually it was Artii and/or Gunz script. I just edited it...;)
 
Here is the updated ipn.php version that includes Logging of the account number and buyers email address:
PHP:
<? 
$mysql_host = 'localhost'; //Leave at localhost 
$mysql_user = 'root'; //DB User 
$mysql_pass = ''; //DB Pass 
$mysql_db = ''; //DB Name 
$file = 'paypal.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 == "[email protected]" & $mc_gross == "##.##") { 

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

$result = mysql_query($query); 

$prem = mysql_fetch_array($result); 

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

$result2 = mysql_query($qry2); 
} 
else 
 {  
 echo("Error."); 
 } 
?>
 
Thanks a lot sliver!
Now I can fuk those chargebackers...
 
I changed the script on the front page to your updated one sliver. gj btw :p
 
how to use this on gesior acc for tfs 0.3.4spl2? , i got the ipn.php but i dont find the other things..with the price "5.00" etc..:O

i mean, where do i find $mc_gross == "5.00") {
?!?!?!?!?!
 
If you followed the original post of the Paypal script from Arti it included and .htaccess file which is placed in the ipn directory. No one should have access to the directory except for Paypal. When someone donates, Paypal send an IPN (Instant Payment Notification) to the address you set within your paypal account. It should be sent to the ipn.php file located on your webserver.

Since Injection schemes need access to files to inject incorrect data, these types of attacks should not work if you have the .htaccess file setup correctly.
 
mc_gross == "##.##") {



this is what i dont find on the script -.-, sry double post, no edit option
 
HAHAHAHAHHA. I have nice bug. Its not fixed how it should be. All ots with paypal donations (under this script) will HACKED :D.
 
@Up
Cool :) And of course you can't write what is that bug to help everyone and something like that, you just want to be a "cool pr0" with saying that.
 
Back
Top