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

Windows Paypal Script Problem

theroyal

Wassup :)
Joined
Oct 22, 2009
Messages
372
Reaction score
6
i got a a problem with my paypal script i'm using gesioracc when a player donates he doesn't recive is points i checked the script all the connection information to my database is right i don't know what the problem is also i don't have any paypal table in my database maybe it's connected to this problem somehow REP++ for all helpers.
 
Can you please provide the script to look at or what you are asking is useless.
ok here is the script:
<?
$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.");
}
?>
this is the script ipn in the folder ipn there is also a file called .htaccess
and in the paypal folder there is php file.
 
PHP:
<?PHP
//// Config ////
$mysql_host = 'localhost'; //Leave at localhost
$mysql_user = 'root'; //DB User
$mysql_pass = ''; //DB Pass
$mysql_db = ''; //DB Name

$payment_amount = "10.00"
$email = "[email protected]"
$points = 12

$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'];

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

if ($payment_status == "Completed" & $receiver_email == $email & $mc_gross == $payment_amount) 
{
	// connect db
	$db = mysql_connect($mysql_host, $mysql_user, $mysql_pass);
	mysql_select_db($mysql_db, $db);
	
	// get premium points
	$query = "SELECT `premium_points` FROM `accounts` WHERE `name` = '$custom'";
	$result = mysql_query($query);
	$prem = mysql_fetch_array($result);

	// update premium points
	$points = $prem['premium_points'] + $points;
	$query2 = "UPDATE `accounts` SET `premium_points` = '$points' WHERE `name` = '$custom'";
	
	$result2 = mysql_query($query2);
	
	// Log Paypal Transaction
	$hak = fopen($file, "a");
	fwrite($hak, $logging);
}
else
{
	echo("Error.");
}
fclose($hak);
?>

I edited it a bit, see if that works for you.
 
PHP:
<?PHP
//// Config ////
$mysql_host = 'localhost'; //Leave at localhost
$mysql_user = 'root'; //DB User
$mysql_pass = ''; //DB Pass
$mysql_db = ''; //DB Name

$payment_amount = "10.00"
$email = "[email protected]"
$points = 12

$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'];

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

if ($payment_status == "Completed" & $receiver_email == $email & $mc_gross == $payment_amount) 
{
	// connect db
	$db = mysql_connect($mysql_host, $mysql_user, $mysql_pass);
	mysql_select_db($mysql_db, $db);
	
	// get premium points
	$query = "SELECT `premium_points` FROM `accounts` WHERE `name` = '$custom'";
	$result = mysql_query($query);
	$prem = mysql_fetch_array($result);

	// update premium points
	$points = $prem['premium_points'] + $points;
	$query2 = "UPDATE `accounts` SET `premium_points` = '$points' WHERE `name` = '$custom'";
	
	$result2 = mysql_query($query2);
	
	// Log Paypal Transaction
	$hak = fopen($file, "a");
	fwrite($hak, $logging);
}
else
{
	echo("Error.");
}
fclose($hak);
?>

I edited it a bit, see if that works for you.

between i don't know if it works untill someone donates again so it might take some time maybe tomorow. any ideas how to test it?
 
between i don't know if it works untill someone donates again so it might take some time maybe tomorow. any ideas how to test it?

Test the script with the paypal sandbox. Also it's not supposed to be $_REQUEST it's supposed to be $_POST

PHP:
<?PHP
//// Config ////
$mysql_host = 'localhost'; //Leave at localhost
$mysql_user = 'root'; //DB User
$mysql_pass = ''; //DB Pass
$mysql_db = ''; //DB Name

$payment_amount = "10.00"
$email = "[email protected]"
$points = 12

$file = 'paypal.log'; //Paypal Log Name will be placed in the same location as your ipn.php file
///////////////

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

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

if ($payment_status == "Completed" & $receiver_email == $email & $mc_gross == $payment_amount) 
{
    // connect db
    $db = mysql_connect($mysql_host, $mysql_user, $mysql_pass);
    mysql_select_db($mysql_db, $db);
    
    // get premium points
    $query = "SELECT `premium_points` FROM `accounts` WHERE `name` = '$custom'";
    $result = mysql_query($query);
    $prem = mysql_fetch_array($result);

    // update premium points
    $points = $prem['premium_points'] + $points;
    $query2 = "UPDATE `accounts` SET `premium_points` = '$points' WHERE `name` = '$custom'";
    
    $result2 = mysql_query($query2);
    
    // Log Paypal Transaction
    $hak = fopen($file, "a");
    fwrite($hak, $logging);
}
else
{
    echo("Error.");
}
fclose($hak);
?>
 
how do i test with the sand box between the problem is not with the payment players can donate and i recive the money the problem is they don't get points after they pay.
 
Last edited:
how do i test with the sand box between the problem is not with the payment players can donate and i recive the money the problem is they don't get points after they pay.

Send a payment with the sandbox and if it works it should add points to the account.
Enable IPN by the way.
 
can you explain a little bit more what should i do? pay with a sandbox accout? i don't know how lol all i see is jibrish ipn yeah nothing i need to know exactly how lol ^^ btw if it's fake payment other ppl can buy like that ?lol
 
Last edited:
Back
Top