Forums / Built-in Shipping and Payment Modules / Problems with Paypal IPN

Problems with Paypal IPN

Locked
Results 1 to 10 of 10
This thread is locked. New replies are disabled.
01 Dec 2010, 19:44
#1
duskwood avatar

duskwood

New Zenner

Join Date:
Apr 2010
Posts:
9
Plugin Contributions:
0

Problems with Paypal IPN

Hello,

I was using Zen Cart 1.3.9f, everything worked great until a week ago someone bought something from my store and paid with an eCheck. I received an email from Paypal letting me know that someone paid, but there was no order in my admin and no email notification about the new order. I had to contact the customer to ask what they bought.

The eCheck cleared a few days ago together with a message from Paypal saying that IPNs sent to https://mysite.com/ipn_main_handler.php are failing, and if the problem continues IPNs may be disabled for my account. Still no order in my admin, and in Paypal's IPN history the status is set to "retrying".

I thought it was just a one-time eCheck issue and ignored it, but then came another purchase (no eCheck this time) and the same problem occurred - a notification from Paypal that someone bought something, but no actual order in my admin.

I upgraded to the latest version of Zen Cart and re-installed the Paypal module just in case. Did a test order and everything worked like a charm, but, when I checked Paypal's IPN history that test order has a "retrying" status, just like the last two.

Is there a way to fix this issue?

Thanks in advance!
01 Dec 2010, 20:40
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,506
Plugin Contributions:
173

Re: Problems with Paypal IPN

There were a number of fixes in the various 1.3.9 updates that improve handling of IPNs.
You said you're running v1.3.9f. You'll want to upgrade to v1.3.9g and then v1.3.9h.
Then, after PayPal's status changes from "Retrying" to "Failed" (might take a couple hours to change), tell it to Retry again.
01 Dec 2010, 20:51
#3
duskwood avatar

duskwood

New Zenner

Join Date:
Apr 2010
Posts:
9
Plugin Contributions:
0

Re: Problems with Paypal IPN

Thanks for the fast reply, however, I said I was running v1.3.9f and after the last order upgraded to v1.3.9h, re-installed Paypal's module and did a test order which came through fine, however that test order has a "retrying" status in Paypal's IPN history instead of the usual "sent".
01 Dec 2010, 21:03
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,506
Plugin Contributions:
173

Re: Problems with Paypal IPN

Okay, so something's blocking PayPal's ability to talk to your server. Evidently PayPal cannot access your ipn_main_handler.php file to tell your store about the order.

Or you've got something busted which is preventing the ipn_main_handler.php file from doing its job properly.

http://www.zen-cart.com/wiki/index.php/PayPal
01 Dec 2010, 21:12
#5
duskwood avatar

duskwood

New Zenner

Join Date:
Apr 2010
Posts:
9
Plugin Contributions:
0

Re: Problems with Paypal IPN

I tried everything on that page already, still, thanks for the advice!
I was thinking about installing the Express Checkout module instead of the standard IPN one, but then anyone will be able to purchase something, even people from countries I've deleted right?
01 Dec 2010, 21:41
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,506
Plugin Contributions:
173

Re: Problems with Paypal IPN

If you leave the Express Checkout Shortcut button enabled, then people can begin checkout without creating an account on your site. However, if they choose a country with an address not accepted by your store, they won't be able to complete checkout without selecting an address allowed by your store.

But that won't solve your IPN problem with eChecks. PayPal still must send a notification to your store if an eCheck is used. They use IPNs to do that even with Express Checkout (even though you don't have the "Website Payments Standard / IPN" module enabled).

So, you'll still need to sort out your IPN problems, either way.

If you're having IPN problems, then all your orders from PayPal will be failing, not just eChecks.

Maybe you should be reviewing and posting your IPN debug logs for further help.
01 Dec 2010, 22:34
#7
duskwood avatar

duskwood

New Zenner

Join Date:
Apr 2010
Posts:
9
Plugin Contributions:
0

Re: Problems with Paypal IPN

I see. Thanks for the explanation.

I checked my website's access logs, when notify.paypal.com tries to connect to /ipn_main_handler.php it gets a 500 error.

And here's what the IPN log says: (I removed the actual IP's)

Dec 01 2010 12:57 -- IPN PROCESSING INITIATED.
*** Originating IP: XXX
*** Browser/User Agent: XXX

Dec 01 2010 12:57 -- IPN FATAL ERROR :: No POST data available -- Most likely initiated by browser and not PayPal.

*** The rest of this log report can most likely be ignored !! ***

Dec 01 2010 12:57 -- IPN ERROR :: Could not find stored session {} in DB; thus cannot validate or re-create session as a transaction awaiting PayPal Website Payments Standard confirmation initiated by this store. Might be an Express Checkout or eBay transaction or some other action that triggers PayPal IPN notifications.

Dec 01 2010 12:57 -- IPN ERROR :: No saved Website Payments Standard session data available. Must be an Express Checkout or Direct Pay transaction.
Could be a test notification, or the incoming IPN notification is not actually a bonafide PayPal transaction.
NOTE: It is likely that all the following log content is meaningless or irrelevant.

Dec 01 2010 12:57 -- Breakpoint: 0 - Initializing debugging.

Dec 01 2010 12:57 -- Breakpoint: Flag Status:
isECtransaction = 0
isDPtransaction = 0

Dec 01 2010 12:57 -- IPN INFO - POST VARS received (sorted):
Array
(
)
01 Dec 2010, 22:44
#8
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,506
Plugin Contributions:
173

Re: Problems with Paypal IPN

duskwood:

I checked my website's access logs, when notify.paypal.com tries to connect to /ipn_main_handler.php it gets a 500 error.
You'll need to fix whatever's causing the 500 error

duskwood:


And here's what the IPN log says: (I removed the actual IP's)

The actual IPs are harmless to post.

Nothing useful in that log, since it's showing that nothing was passed in to it.
02 Dec 2010, 07:10
#9
duskwood avatar

duskwood

New Zenner

Join Date:
Apr 2010
Posts:
9
Plugin Contributions:
0

Re: Problems with Paypal IPN

You'll need to fix whatever's causing the 500 error


I have no idea what's causing the errors.
I checked with my host to make sure that ports 80 and 443 were open, and that their firewall wasn't blocking any of Paypal's IP's. I checked my .htaccess files to make sure I wasn't blocking any of those IP's. Everything seems to be working.
Even my test order worked fine, got an email notification and a new order in my admin, however in Paypal's IPN history it's still "retrying".
Still, thanks for the help.
02 Dec 2010, 17:49
#10
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,506
Plugin Contributions:
173

Re: Problems with Paypal IPN

Your server's apache errorlog will detail the cause of "500" errors. If you can't view that log yourself via your hosting control panel, then you'll have to get your hosting company to retrieve those details for you.
ref https://www.zen-cart.com/tutorials/index.php?article=63