Magento 1.7 – PayPal IPN Failure Due to Undefined Index: Invoice

magento-1.7paypal

I've tested a PayPal order (using standard One Page Checkout and core Paypal Payments Standard) when IPN is enabled and the statuses update fine so IPN seems to function.

However, PayPal sends through this email periodically:

Dear xxxx,

Please check your server that handles PayPal Instant Payment
Notifications (IPN). Instant Payment Notifications sent to the
following URL(s) are failing:

http:// xxxx /paypal/ipn/

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. If this problem continues, IPNs may be
disabled for your account.

Thank you for your prompt attention to this issue.

Yours sincerely, PayPal

and then after about a week automatically disables IPN which stops PayPal orders from updating properly.

Checking system.log shows a bunch of notices

2014-02-12T20:29:54+00:00 ERR (3): Notice: Undefined index: invoice  in /var/www/windswept/app/code/core/Mage/Paypal/Model/Ipn.php on line 171

There are about 50 of these errors ( one every 15/20 min) while we had a small amount of Paypal orders recently.

Does anybody have any insight into this issue?

Best Answer

If your URL is correct then it's what Keyur Shah already commented, but probably wasn't clear enough. If you have IPN enabled and receive payments from different sources (ebay, Magento and others) to the same PayPal account, PayPal unfortunately continues to try sending notifications related to these order to the Magento store, where these orders don't exist.

A possible solution is creating a centralized IPN reciever, see this URL for a very useful script to get you started. http://codeseekah.com/2012/02/11/how-to-setup-multiple-ipn-receivers-in-paypal/

Related Topic