Author |
Message |
meawww
New Member


Joined: Feb 09, 2007
Posts: 13
|
Posted:
Sun May 13, 2007 8:20 am |
|
why sentinel blocking the IPN from paypal.com do you have any solution for this? everytime i deactivate paypal IPN works fine then when i activate it IPN not recording anymore  |
|
|
|
 |
Gremmie
Former Moderator in Good Standing

Joined: Apr 06, 2006
Posts: 2415
Location: Iowa, USA
|
Posted:
Sun May 13, 2007 10:02 am |
|
What script are you using? NukeTreasury or what? |
_________________ Only registered users can see links on this board! Get registered or login! - An Event Calendar for PHP-Nuke
Only registered users can see links on this board! Get registered or login! - A Google Maps Nuke Module |
|
|
 |
meawww

|
Posted:
Sun May 13, 2007 10:21 am |
|
|
|
 |
Gremmie

|
Posted:
Sun May 13, 2007 10:56 am |
|
Hmmm....I am running this script and IPN works for me with Sentinel running. What version of Sentinel do you have?
As far as I know, Paypal calls directly into the IPN script, it does not go through the "usual Nuke channels", so Sentinel should not be getting involved.
What is your IPN link for PayPal in NukeTreasury config? |
|
|
|
 |
meawww

|
Posted:
Sun May 13, 2007 10:57 am |
|
well im on nukesentinel 2.5.08 the latest and nuketreasury works fine when sentinel is not active |
|
|
|
 |
Gremmie

|
Posted:
Sun May 13, 2007 12:37 pm |
|
Again, what is your IPN link for PayPal in NukeTreasury config? And what version of NukeTreasury is this?
I just looked at my NukeTreasury 1.0 and Paypal will call that ipn script directly, and it does not include any normal Nuke files, so I can't see how Sentinel even gets invoked on the IPN callback. |
|
|
|
 |
meawww

|
Posted:
Sun May 13, 2007 12:39 pm |
|
i have nuketreasury1.1 ported to nuke8 from dadanuke.org |
|
|
|
 |
Gremmie

|
Posted:
Sun May 13, 2007 12:39 pm |
|
Also set your logging level option to "Log Everything" in the Treasury config, then check your Treasury table for errors. |
|
|
|
 |
meawww

|
Posted:
Sun May 13, 2007 12:41 pm |
|
yup all logged and not even recording transaction when sentinel is enable |
|
|
|
 |
Gremmie

|
Posted:
Sun May 13, 2007 8:02 pm |
|
Okay, I am not familiar with the dadanuke version...did they modify it? Raven has taken over the development of NukeTreasury, and you could try version 1.1 from this site. I am still running 1.0, I'm not real sure what the difference is, but I can receive donations with Sentinel active. Maybe we don't have the same Sentinel settings. But like I said, when Paypal calls your IPN script back, it is calling it directly and it is bypassing Nuke altogether. So Sentinel should not even be involved. |
|
|
|
 |
Gremmie

|
Posted:
Sun May 13, 2007 8:04 pm |
|
I see there is a 1.1.1 version in the downloads here. |
|
|
|
 |
gotcha
Regular


Joined: Mar 14, 2005
Posts: 91
|
Posted:
Sun May 13, 2007 8:11 pm |
|
If that version of NukeTreasury includes mainfile.php then its the user agent check in sentinel that is blocking the IPN because paypal sends no user agent. I ran into this before and the way I solved it was by putting an if statement around that user agent check to make sure it was bypassed only for 1 certain file. |
|
|
|
 |
Gremmie

|
Posted:
Sun May 13, 2007 8:46 pm |
|
I guess check the ipnppd.php file to see what other PHP files it is including (or requiring). In 1.0 it only includes "../config.php", and this file includes no other Nuke files.
If your version is including mainfile.php or something like that, then yes, Sentinel will get involved and gotcha is probably right, the invalid user agent check could be nailing you. |
|
|
|
 |
Gremmie

|
Posted:
Sun May 13, 2007 8:50 pm |
|
I just checked NukeTreasury 1.1.1 as found in the downloads section here and the ipnppd.php file is not including any Nuke files. So you might want to either switch to that, modify the dadanuke version, or modify Sentinel as gotcha apparently did. |
|
|
|
 |
meawww

|
Posted:
Fri May 25, 2007 10:41 am |
|
no its not requiring nothing  |
|
|
|
 |
meawww

|
Posted:
Fri May 25, 2007 10:44 am |
|
gotcha wrote: | If that version of NukeTreasury includes mainfile.php then its the user agent check in sentinel that is blocking the IPN because paypal sends no user agent. I ran into this before and the way I solved it was by putting an if statement around that user agent check to make sure it was bypassed only for 1 certain file. |
can you share to me the statement you made to bypass the sentinel from IPN? |
|
|
|
 |
gotcha

|
Posted:
Sat May 26, 2007 9:43 am |
|
Sure, but my modification was for something totally different so it may or may not work for you.
First you will want to put a line like this at the top of your ipn script.
Code:define('IPN_CALLED', true);
|
Then open up includes/nukesentinel.php and find
Code:// Invalid user agent
if($nsnst_const['user_agent']=="none" AND !stristr($_SERVER['PHP_SELF'], "backend.php") AND ($nsnst_const['remote_ip'] != $nsnst_const['server_ip'])) {
echo abget_template("abuse_invalid2.tpl");
die();
}
|
and change it to
Code:if (!defined('IPN_CALLED')){
// Invalid user agent
if($nsnst_const['user_agent']=="none" AND !stristr($_SERVER['PHP_SELF'], "backend.php") AND ($nsnst_const['remote_ip'] != $nsnst_const['server_ip'])) {
echo abget_template("abuse_invalid2.tpl");
die();
}
}
|
and thats it! Good Luck |
|
|
|
 |
|