• 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!

PayPal Script [RELEASE]

I have a question :) Why this is a donation, not a payment ?

for the payment officialy you need a legal company to receive payments from people...if you are accepting donation you can say that you are non-profit oganization and donations are helping the project...in my country the law say that i can receive 1500EUR from donations...If I'm receving more I must register it in the sales-registry as a non-profit organization...
 
Artii why is evryone using Manual transfering with premium points.

Like they click on a donation button and choose how much you want to donate then you email them your transaction code and they will transfer the p points manually for ya. xD whats the benefit with that? when you can use this script and have an automatic transfering system?
 
Artii why is evryone using Manual transfering with premium points.

Like they click on a donation button and choose how much you want to donate then you email them your transaction code and they will transfer the p points manually for ya. xD whats the benefit with that? when you can use this script and have an automatic transfering system?

Probably because this isn't working. At least not for most of us anyways.
 
You put this in your htdocs folder and then it works? It's giving items to players?
 
You should make it check to make sure the ammount stated was actually received. Due to a program that can change the data of the payment so u can send for example 1 cent for a 15$ value item.
 
OK, so ppl will stop trying to get items from my site for .01 I'm going to post how to stop this.

Add this line to the ipn.php file:
Code:
$mc_gross = $_REQUEST['mc_gross'];

Now, modify the "if" statement to include the mc_gross variable and edit the number signs to make the dollar amount you are expecting, like this:
Code:
if ($payment_status == "Completed" & $receiver_email == "[email protected]" & $mc_gross == "##.##") {
And that will do it. The return call now from paypal will include the amount and the query will verify that they actually paid the correct amount before it adds points to their account. If they only donate a penny and they were suppose to donate 5.00 then you get their penny and they get no points. ^_^ Here is the fully ipn.php file
PHP:
<?
$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.");
 }
?>

Now maybe these ppl will realize this isn't an issue anymore and leave me alone. :thumbup:
 
Hey how can i change
Code:
https://www.paypal.com/[u]uk[u/]/
to
Code:
https://www.paypal.com/[u]cl[u/]/
 
ok, so ppl will stop trying to get items from my site for .01 i'm going to post how to stop this.

Add this line to the ipn.php file:
Code:
$mc_gross = $_request['mc_gross'];

now, modify the "if" statement to include the mc_gross variable and edit the number signs to make the dollar amount you are expecting, like this:
Code:
if ($payment_status == "completed" & $receiver_email == "[email protected]" & $mc_gross == "##.##") {
and that will do it. The return call now from paypal will include the amount and the query will verify that they actually paid the correct amount before it adds points to their account. If they only donate a penny and they were suppose to donate 5.00 then you get their penny and they get no points. ^_^ here is the fully ipn.php file
PHP:
<?
$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.");
 }
?>

now maybe these ppl will realize this isn't an issue anymore and leave me alone. :thumbup:


thank- you
 
OK, so ppl will stop trying to get items from my site for .01 I'm going to post how to stop this.

Add this line to the ipn.php file:
Code:
$mc_gross = $_REQUEST['mc_gross'];

Now, modify the "if" statement to include the mc_gross variable and edit the number signs to make the dollar amount you are expecting, like this:
Code:
if ($payment_status == "Completed" & $receiver_email == "[email protected]" & $mc_gross == "##.##") {
And that will do it. The return call now from paypal will include the amount and the query will verify that they actually paid the correct amount before it adds points to their account. If they only donate a penny and they were suppose to donate 5.00 then you get their penny and they get no points. ^_^ Here is the fully ipn.php file
PHP:
<?
$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.");
 }
?>

Now maybe these ppl will realize this isn't an issue anymore and leave me alone. :thumbup:

I don't think it works for 0.2 TFS.
I changed the database login/pass and the database, also changed accounts.name to accounts.id

The script still isn't working quite right :blink:
 
I don't think it works for 0.2 TFS.
I changed the database login/pass and the database, also changed accounts.name to accounts.id

The script still isn't working quite right :blink:

I'm using TFS 2.3 with this exact ipn.php file and it works great. 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."); 
 } 
?>
 
great script.. i got mine to give them 15 points per dollar donated.. pretty nice script.. worked perfect first try
 
Back
Top Bottom