• 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 isnt working.

vingo

Active Member
Joined
Oct 27, 2012
Messages
464
Reaction score
43
My paypal script is not working I have activated IPN(I think) and everything but it doesnt give the points out.


PHP:
<?php
if ($_REQUEST['debug']) {
ini_set("display_errors", True);
error_reporting(E_ALL);
}
$mysql_host = ''; //Leave at localhost  
$mysql_user = ''; //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 

// Anti-Scam  
$payer_email = $_REQUEST['payer_email']; 
$ip = $_SERVER['REMOTE_ADDR'];
if($ip != "66.211.170.66" && $ip != "216.113.188.202" && $ip != "216.113.188.203" && $ip != "173.0.81.1" && $ip != "173.0.81.33" && $ip != "216.113.188.202") {
	print "Scammer...";
$hak = fopen("scammer.log", "a");
fwrite($hak, "$ip \r\n");
fclose($hak);
die(0);
}
$time = date("F j, Y, g:i a"); 
$paylist = array("3.00" => 100, "5.00" => 180, "10.00" => 380);

// connect db  

$db = mysql_connect($mysql_host, $mysql_user, $mysql_pass);

$custom = stripslashes(ucwords(strtolower(trim($_REQUEST['custom']))));  
$receiver_email = $_REQUEST['receiver_email'];  
$payment_status = $_REQUEST['payment_status'];  
$mc_gross = $_REQUEST['mc_gross']; 
mysql_select_db($mysql_db, $db);  
if ($_REQUEST['debug']){
print $payment_status . '\n';
print (isset($paylist[$mc_gross])) ? 1 : 0 . '\n';
print $receiver_email . '\n';
print $custom . '\n';
}
if ($payment_status == "Completed" && $receiver_email == "EMAIL HERE" && isset($paylist[$mc_gross])) {  
$query = "SELECT premium_points FROM accounts WHERE accounts.name = '$custom'";  
$result = mysql_query($query);  

$prem = mysql_fetch_array($result);  
$somecode = "'$time' '$custom' '$payer_email' '$mc_gross' '$ip'\r\n";

// figure out how much to give
$give = $paylist[$mc_gross];
$points = $prem['premium_points'] + $give;  
// $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); 

//Everything looks fine, add points and log them. 
$result2 = mysql_query($qry2);  
$log_data = mysql_query($executepaypallog);
}  
else  
 {   
 echo("Error.");  
 }  
?>
 
It seems like some information is missing, such as mysql_host, _user, _pass, and _db.
Though, I am not an expert in PHP.
 
Its that the script you are using? I mean the exact variables? cause I see..

PHP:
$mysql_host = ''; //Leave at localhost   
$mysql_user = ''; //DB User   
$mysql_pass = ''; //DB Pass   
$mysql_db = ''; //DB Name
$receiver_email == "EMAIL HERE"

Shouldnt be empty, also (you think) all its well configurated? ._:
 
Well, Ofc i wont type my account password etc to the public but that is all configured, thought that was kinda basic ^^ sorry bout that..


Well uhm yeah, I have all the files, I changed everything I was going to change but it still doesnt give automatic points
 
post other paypal script probly ur ipn is wrong

- - - Updated - - -

use this for ipn:

Code:
<?php
if ($_REQUEST['debug']) {
ini_set("display_errors", True);
error_reporting(E_ALL);
}
$mysql_host = 'localhost'; //Leave at localhost  
$mysql_user = 'root'; //DB User  
$mysql_pass = 'xxx'; //DB Pass  
$mysql_db = 'xxx'; //DB Name  
$file = '../paypal.log'; //Paypal Log Name will be placed in the same location as your ipn.php file 

// Anti-Scam  
$payer_email = $_REQUEST['payer_email']; 
$ip = $_SERVER['REMOTE_ADDR'];
if($ip != "66.211.170.66" && $ip != "216.113.188.202" && $ip != "216.113.188.203" && $ip != "173.0.81.1") {
	print "Scammer...";
$hak = fopen("scammer.log", "a");
fwrite($hak, "$ip \r\n");
fclose($hak);
die(0);
}
$time = date("F j, Y, g:i a"); 
$paylist = array("0.01" => 20, "5.00" => 35, "10.00" => 80, "15.00" => 140, "20.00" => 200);

// connect db  

$db = mysql_connect($mysql_host, $mysql_user, $mysql_pass);

$custom = stripslashes(ucwords(strtolower(trim($_REQUEST['custom']))));  
$receiver_email = $_REQUEST['receiver_email'];  
$payment_status = $_REQUEST['payment_status'];  
$mc_gross = $_REQUEST['mc_gross']; 
mysql_select_db($mysql_db, $db);  
if ($_REQUEST['debug']){
print $payment_status . '\n';
print (isset($paylist[$mc_gross])) ? 1 : 0 . '\n';
print $receiver_email . '\n';
print $custom . '\n';
}
if ($payment_status == "Completed" && $receiver_email == "[email protected]" && isset($paylist[$mc_gross])) {  
$query = "SELECT premium_points FROM accounts WHERE accounts.name = '$custom'";  
$result = mysql_query($query);  

$prem = mysql_fetch_array($result);  
$somecode = "'$time' '$custom' '$payer_email' '$mc_gross' '$ip'\r\n";

// figure out how much to give
$give = $paylist[$mc_gross];
$points = $prem['premium_points'] + $give;  
// $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); 

//Everything looks fine, add points and log them. 
$result2 = mysql_query($qry2);  
$log_data = mysql_query($executepaypallog);
}  
else  
 {   
 echo("Error.");  
 }  
?>

- - - Updated - - -

and this for payment:
Code:
        <div class='message'>
        <div class='title'>Paypal Donation</div>
        <div class='content'>
        <?PHP
require("config.php");
$ots = POT::getInstance();
$ots->connect(POT::DB_MYSQL, connection());
$SQL = $ots->getDBHandle();
{
ECHO '
<h1>Donation Packages (incl. VAT).</h1>
- <b>20 Premium Points</b><br />
[Price: 3 EUR]<br />
- <b>35 Premium Points</b><br />
[Price: 5 EUR]<br />
- <b>80 Premium Points</b><br />
[Price: 10 EUR]<br />
- <b>95 Premium Points</b> <b><font color="green">+50% More Promotion (140 PP)</font></b><br />
[Price: 15 EUR]<br />
- <b>135 Premium Points</b> <b><font color="green">+50% More Promotion (200 PP)</font></b><br />
[Price: 20 EUR]<br />

<div align="center">
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_donations">
<input type="hidden" name="business" value="email">
<input type="hidden" name="lc" value="GB">
<input type="hidden" name="item_name" value="Donation">
<input type="hidden" name="item_number" value="1">
<br>
<font color="red"><i>*Put your account number here! or you won\'t get your points</i></font><br>
<b>Account number:</b> 
<input type="text"  name="custom" value="">

<select name="amount">
  <option value="0.01">0.01 EUR</option>
  <option value="5.00">5 EUR</option>
  <option value="10.00">10 EUR</option>
  <option value="15.00">15 EUR</option>
  <option value="20.00">20 EUR</option>
</select>
<input type="hidden" name="currency_code" value="EUR">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="no_shipping" value="1">
<input type="hidden" name="currency_code" value="EUR">
<input type="hidden" name="notify_url" value="http://ip/ipn.php">
<input type="hidden" name="return" value="http://ip/">
<input type="hidden" name="rm" value="2">
<input type="hidden" name="bn" value="PP-BuyNowBF">
<input type="hidden" name="cancel_return" value="http://ip/">
<br />
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online.">
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>
<br>
</div>
';
}
?>
</div></div>

- - - Updated - - -

100% it works on modern acc
 
Last edited by a moderator:
else post ur paypal script to coz its not sure ur ipn is wrong i gues ur paypal script
who sends ipn
do u get the scam.txt
the log if no
post paypal script
probly it is wrong
u must set ur ip http://111.111.111.111/ipn.php
in paypal script and but it in root directory of ur website folder
if using xamp htdocs in root
on windows server 2008 r2 in wwwroot
 
PHP:
php
if ($_REQUEST['debug']) {
ini_set("display_errors", True);
error_reporting(E_ALL);
}
$mysql_host = '******'; //Leave at localhost  
$mysql_user = '*******'; //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 

// Anti-Scam  
$payer_email = $_REQUEST['payer_email']; 
$ip = $_SERVER['REMOTE_ADDR'];
if($ip != "66.211.170.66" && $ip != "216.113.188.202" && $ip != "216.113.188.203" && $ip != "216.113.188.202") {
	print "Scammer...";
$hak = fopen("scammer.log", "a");
fwrite($hak, "$ip \r\n");
fclose($hak);
die(0);
}
$time = date("F j, Y, g:i a"); 
$paylist = array("10.00" => 380);

// connect db  

$db = mysql_connect($mysql_host, $mysql_user, $mysql_pass);

$custom = stripslashes(ucwords(strtolower(trim($_REQUEST['custom']))));  
$receiver_email = $_REQUEST['receiver_email'];  
$payment_status = $_REQUEST['payment_status'];  
$mc_gross = $_REQUEST['mc_gross']; 
mysql_select_db($mysql_db, $db);  
if ($_REQUEST['debug']){
print $payment_status . '\n';
print (isset($paylist[$mc_gross])) ? 1 : 0 . '\n';
print $receiver_email . '\n';
print $custom . '\n';
}
if ($payment_status == "Completed" && $receiver_email == "EMAIL HERE" && isset($paylist[$mc_gross])) {  
$query = "SELECT premium_points FROM accounts WHERE accounts.name = '$custom'";  
$result = mysql_query($query);  

$prem = mysql_fetch_array($result);  
$somecode = "'$time' '$custom' '$payer_email' '$mc_gross' '$ip'\r\n";

// figure out how much to give
$give = $paylist[$mc_gross];
$points = $prem['premium_points'] + $give;  
// $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); 

//Everything looks fine, add points and log them. 
$result2 = mysql_query($qry2);  
$log_data = mysql_query($executepaypallog);
}  
else  
 {   
 echo("Error.");  
 }  
?>

- - - Updated - - -

this ?
 
Back
Top