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

GesiorACC - IPN not being recieved

likas152

civera
Joined
Jul 30, 2009
Messages
290
Reaction score
34
Location
Sweden
Today when I tried to enable my IPN on my paypal account I recieved an email, following:
When I enter my ipn.php this text came up.

Forbidden
You don't have permission to access /ipn/ipn.php on this server.




Hello OTserver,

Please check your server that handles PayPal Instant Payment Notification (IPN) messages. Messages sent to the following URL(s) are not being received:

http://test.mine.nu/ipn/ipn.php

If you do not recognize this URL, you may be using a service provider that is using IPN on your behalf. Please contact your service provider with the above information.

Once you or your service provider fix this problem, you or your service provider can resend the failed messages from the IPN History page. If this problem continues, PayPal may disable the IPN feature for your account.

Thank you for your prompt attention to this issue.

Kind regards,

PayPal Sweden

And this is my IPN file:

ipn.php

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

// Anti-Scam
$payer_email = $_GET['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("5.00" => 60, "10.00" => 120, "20.00" => 240, "40.00" => 480);

// connect db

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

$custom = stripslashes(ucwords(strtolower(trim($_GET['custom']))));
$receiver_email = $_GET['receiver_email'];
$payment_status = $_GET['payment_status'];
$mc_gross = $_GET['mc_gross'];
mysql_select_db($mysql_db, $db);
if ($_GET['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.");
}
?>

My HTACCESS file:
Code:
<files "*.*">
Allow from 84.47.125.0/19 66.211.160.0/19 216.113.160.0/19 173.0.84.35/19
Deny from All
</files>

What can it be? Im I missing any ips that may I have to add or?

Please help me out !

Kind Regards,
Sven
 
You must add notify.paypal.com to your list at allow from, both in the htaccess file, and in the script where the others ip's are.
Btw do you know what these ip's are? If you don't know them remove them! They have access to the file!
 
Thats right, you cannot access the file but paypal will!
If you want access to this file yourself (via webbrowser ofcourse) you have to add your own ip to the list too.
If your server is in your own network, you will have to add something like 192.168.0.1.
You can lookup what IP this should be by going to command promt (start, type 'cmd'). You should see a black screen here, and type 'ipconfig'. This should give a list of all network adapters in your system, but at one is a standardgateway. The IP there is the address you need to add.
Below is an image of an example how this should look like.
rwfv.png


And if you have a deticated server you will have to find your ip via http://www.whatismyip.com
 
Back
Top