Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Page 1 of 2
PayPal IPN broken since 1.8.1 upgrade
 
philmck
Jr. Member
 
Total Posts:  6
Joined:  2010-06-05
London
 

Has anyone else noticed that PayPal IPN responses to the local /magento/paypal/ipn/ address are now failing? I’ve had a notification from PayPal that IPN is not working, and in my Apache access logs I can see the server is returning 500 errors like the following:

“POST /paypal/ipn/ HTTP/1.0” 500 425 “-” “PayPal IPN ( https://www.paypal.com/ipn )”

This is confirmed by the status logs at PayPal.

It was all working before the upgrade, so something has changed - quite possibly in the .htaccess files. But at the moment I can’t find the problem and experimenting with different settings hasn’t helped.

I tried disabling instant payment notifications in my PayPal account, but I still see these messages in the logs. This would make sense if the return address for an IPN response is actually encoded in the preceding outgoing message from Magento to PayPal, which I believe to be the case (even though the wiki here and lots of postings turned up by google say it needs to be set in PayPal).

The other strange thing I don’t understand is that the payment seems to be processed fine despite this problem - the confirmation emails are sent and the Payment Information screen in View/Order shows all the right information.

I’m worried though that the message from PayPal says “If this problem continues, IPNs may be disabled for your account” which would presumably break order processing. If that happens, I think my only option will be to downgrade to an earlier version of Magento, which would be a pain to put it mildly.

 
Magento Community Magento Community
Magento Community
Magento Community
 
dastoke
Jr. Member
 
Total Posts:  21
Joined:  2012-03-14
 

Yes we have a similar problem......We upgraded to paypal pro and then we start receiving IPN problems.
We are receiving IPN warning emails from paypal and we continue to get problems where: paypal receives the order information but nothing is confirmed back to our Magento database.
The IPN history report from my paypal shows IPN retrying and failiure. On all the retry/failiure status we have no order recorded in Magento but we do have the paypal payment. It seems that Magento says processing payment and then returns to the shopping cart and does not show the Magento completed transaction page.
Therefore the information goes out but the IPN does deliver back from paypal in our Magento.

Here is what our server side have commented; We can see the following messages when the IPN requests are being served:

[22/Jan/2014:09:39:10 -0600] “POST /paypal/ipn/ HTTP/1.0” 503 - “-” “PayPal IPN ( [link removed] )” [22/Jan/2014:09:44:31 -0600] “POST /paypal/ipn/ HTTP/1.0” 503 - “-” “PayPal IPN ( [link removed] )” [22/Jan/2014:09:55:12 -0600] “POST /paypal/ipn/ HTTP/1.0” 503 - “-” “PayPal IPN ( [link removed] )” [22/Jan/2014:10:16:33 -0600] “POST /paypal/ipn/ HTTP/1.0” 503 - “-” “PayPal IPN ( [link removed] )” [22/Jan/2014:09:31:16 -0600] “POST /paypal/ipn/ HTTP/1.0” 503 - “-” “PayPal IPN ( [link removed] )”

As per the logs of the suexec log on our servers (the service that executes your PHP scripts):

Code:

[2014-01-22 10:16:28]: info: [usr/grp]: cucumber/cucumber cmd: /home/cucumber/public_html/index.php php: /usr/local/php53/bin/php
[2014-01-22 10:16:28]: info: [usr/grp]: cucumber/cucumber cmd: /home/cucumber/public_html/index.php php: /usr/local/php53/bin/php
[2014-01-22 10:16:30]: info: [usr/grp]: cucumber/cucumber cmd: /home/cucumber/public_html/index.php php: /usr/local/php53/bin/php
[2014-01-22 10:16:33]: info: [usr/grp]: cucumber/cucumber cmd: /home/cucumber/public_html/index.php php: /usr/local/php53/bin/php
I can also see that in some cases the requests are processed properly, which is quite strange:

Code:

[22/Jan/2014:08:12:05 -0600] “POST /paypal/ipn/ HTTP/1.0” 200 - “-” “PayPal IPN ( [link removed] )”
The requests have been served properly by our server, since it executes the index.php file and it seems that the 503 error message is being returned by the Magento application itself, but not by our server.

If the message was being returned by our server, the index.php script would not be executed at all.

I am stuck with the next action in resolving this, any comments would be appreciated.

 
Magento Community Magento Community
Magento Community
Magento Community
 
dastoke
Jr. Member
 
Total Posts:  21
Joined:  2012-03-14
 

Here is the exception report that is repeated everytime the IPN does not return and Magento fails to record any order, details or order confirmation;

2014-01-23T17:43:07+00:00 ERR (3):
exception ‘PDOException’ with message ‘SQLSTATE[HY000]: General error: 2006 MySQL server has gone away’ in /home/cucumber/public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php:305
Stack trace:
#0 /home/cucumber/public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php(305): PDO->beginTransaction()
#1 /home/cucumber/public_html/lib/Zend/Db/Adapter/Abstract.php(495): Zend_Db_Adapter_Pdo_Abstract->_beginTransaction()
#2 /home/cucumber/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(226): Zend_Db_Adapter_Abstract->beginTransaction()
#3 /home/cucumber/public_html/app/code/core/Mage/CatalogInventory/Model/Resource/Stock.php(170): Varien_Db_Adapter_Pdo_Mysql->beginTransaction()
#4 /home/cucumber/public_html/app/code/core/Mage/CatalogInventory/Model/Stock.php(163): Mage_CatalogInventory_Model_Resource_Stock->correctItemsQty(Object(Mage_CatalogInventory_Model_Stock), Array, ‘+’)
#5 /home/cucumber/public_html/app/code/core/Mage/CatalogInventory/Model/Observer.php(649): Mage_CatalogInventory_Model_Stock->revertProductsSale(Array)
#6 /home/cucumber/public_html/app/code/core/Mage/Core/Model/App.php(1338): Mage_CatalogInventory_Model_Observer->revertQuoteInventory(Object(Varien_Event_Observer))
#7 /home/cucumber/public_html/app/code/core/Mage/Core/Model/App.php(1317): Mage_Core_Model_App->_callObserverMethod(Object(Mage_CatalogInventory_Model_Observer), ‘revertQuoteInve...’, Object(Varien_Event_Observer))
#8 /home/cucumber/public_html/app/Mage.php(448): Mage_Core_Model_App->dispatchEvent(’sales_model_ser...’, Array)
#9 /home/cucumber/public_html/app/code/core/Mage/Sales/Model/Service/Quote.php(207): Mage::dispatchEvent(’sales_model_ser...’, Array)
#10 /home/cucumber/public_html/app/code/core/Mage/Sales/Model/Service/Quote.php(249): Mage_Sales_Model_Service_Quote->submitOrder()
#11 /home/cucumber/public_html/app/code/core/Mage/Checkout/Model/Type/Onepage.php(785): Mage_Sales_Model_Service_Quote->submitAll()
#12 /home/cucumber/public_html/app/code/core/Mage/Checkout/controllers/OnepageController.php(579): Mage_Checkout_Model_Type_Onepage->saveOrder()
#13 /home/cucumber/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Checkout_OnepageController->saveOrderAction()
#14 /home/cucumber/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch(’saveOrder’)
#15 /home/cucumber/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#16 /home/cucumber/public_html/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#17 /home/cucumber/public_html/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#18 /home/cucumber/public_html/index.php(87): Mage::run(’’, ‘store’)
#19 {main}

 
Magento Community Magento Community
Magento Community
Magento Community
 
digidestination
Jr. Member
 
Avatar
Total Posts:  12
Joined:  2011-08-13
Cyprus
 

Hi, did you find a solution to your problem?
I have similar problem and I’m trying to find a solution to it.

 
Magento Community Magento Community
Magento Community
Magento Community
 
philmck
Jr. Member
 
Total Posts:  6
Joined:  2010-06-05
London
 

No - I’ve completely disabled IPN at the PayPal end and payments are still getting through and being confirmed (presumably because IPN is being invoked by the outgoing message from Magento). However, I’ve since had another email from PayPal threatening to “disable IPN” if the problem continues.

If that happens, we’re in big trouble. I’m guessing orders and payments will still be processed by PayPal but Magento will stick in the “pending” state if that happens. It’s going to be difficult to roll Magento back to an earlier version without losing orders now.

 
Magento Community Magento Community
Magento Community
Magento Community
 
dcm75
Jr. Member
 
Total Posts:  1
Joined:  2014-02-14
 

Hello, I’ve the same problem.

The order status is not updated.
I’ve set PayPal to debug modus, but it doesn’t show anythink.

This fix http://stackoverflow.com/questions/11151270/paypal-ipn-postback-failure doesn’t solve the problem.

Has anyone an idea?

 
Magento Community Magento Community
Magento Community
Magento Community
 
AbenF
Jr. Member
 
Total Posts:  4
Joined:  2011-08-31
 

I’m on 7.1, and have had the same problem, since around 2/10/14 or so, on an occasional basis (but enough to lose sales). It seems that if it happens to a particular customer, no amount of re-trying will get through, but that a couple of minutes later another customer will have no trouble at all. The wait time before a confirmation seems a little long too, at about 12 seconds for a successful order, and a failure will time out at about 20 seconds.

My exception log is the same as dastoke.

I put a ticket in with PayPal, and they said they’re getting 503s from the site, and told me how to manually pick up the IPNs (gee, thanks).  They also suggested using UTF-8 encoding. I set that but with no improvement, obviously.

I’m hosted on SiteGround, and their reply was:

==========================================================================================
The “MySQL server has gone away” message means that your application is establishing a connection to the MySQL service, after which it processes other scripts or other data and last it tries to execute a query to the MySQL database, however this connection has already timed out, since the MySQL wait timeout has been reached.

Unfortunately it is not possible to increase that timeout on your current server. One option is to optimize your Magento in order to prevent this error from occuring:

http://kb.siteground.com/magento_optimization/
==========================================================================================

That optimization involves (1) enabling compilation, which I did with no effect, and installing Fooman Speedster which might be nice, but not needed, and I don’t want to muddy the water while troubleshooting this.

So, I’ve thrown it back to Paypal, updating their ticket with a link to this thread, since the person I spoke with on the phone said she hadn’t heard of any slowness in the past few weeks.

 
Magento Community Magento Community
Magento Community
Magento Community
 
aliwatkiss
Jr. Member
 
Total Posts:  1
Joined:  2013-09-10
 

We are seeing the same problem with our Magento site.

Running 1.8.1, been having the same issue with a 503 service unavailable. Also hosted on Siteground. Siteground traced it to a MySQL error 2006 “server has gone away”.

Did you find a solution or work around?

Thanks,
Ali

 
Magento Community Magento Community
Magento Community
Magento Community
 
dastoke
Jr. Member
 
Total Posts:  21
Joined:  2012-03-14
 

Hi Ali,

Yes we did solve the problem by upgrading the server from shared to dedicated cloud and increasing;
max_allowed_packet = 16M (from 8mb)
wait_timeout = 1800
connect_timeout = 120 (from 10 secs)

You cannot change the above settings with Siteground unless you have a decdicated sever, since these changes we have no IPN failiures!

The following thread futher supports this solution: http://www.magentocommerce.com/boards/viewthread/273862/P15/

 
Magento Community Magento Community
Magento Community
Magento Community
 
jm0452
Jr. Member
 
Total Posts:  2
Joined:  2011-11-24
 

I have a similar problem The customer clicks once and the authorisation is captured, but no order is produced in the back end.
The customer is directed back to the previous page bcause no order is produced in the back end. So they do it again, an order is produced this time but also a duplicate pay pal payment is taken, which I then have to void.
I have also had to turn off IPN notifications
Anyone have this problem?

 
Magento Community Magento Community
Magento Community
Magento Community
 
giorgione
Jr. Member
 
Total Posts:  1
Joined:  2013-10-21
 

Hi,
I’ve a similar situation with Magento 1.8.0 and PayPal express checkout when used with recurring profiles.
I got some PayPal IPN warnings email but the payment were captured correctly and somehow magento generated the orders properly after the payment was taken.
Now PayPal disabled my IPN and there is no way to reactivate it from my side; obviously no orders are generated from magento and my customer get confused about the order being placed or not.

I contacted PayPal support but I got no answer yet.
I’ll post if I get some useful technical information.

 
Magento Community Magento Community
Magento Community
Magento Community
 
simonhar
Jr. Member
 
Total Posts:  1
Joined:  2012-01-28
 

Having a similar issue, using 1.8.1 im also using the eBay - M2Epro official Magento extension and it also stop the ordering from eBay - so double loss!!! - But my PayPal Express button direct on the site works just fine - This needs sorting ASAP!

 
Magento Community Magento Community
Magento Community
Magento Community
 
erikm
Jr. Member
 
Total Posts:  10
Joined:  2011-02-02
 

Hi @all

We had a similar issue.

If you happen to have the following module installed:
Trusted Shops trustmark with buyer protection (Symmetrics_Buyerprotect)

Upgrade it to the latest version (0.5.2) because it is buggy and in combination with magento 1.8.1. it is interrupting the paypal/ipn process somehow.

Solved the issue for us.

Best regards from Berlin

 
Magento Community Magento Community
Magento Community
Magento Community
 
sannisinas
Member
 
Total Posts:  67
Joined:  2011-01-27
 

Did anybody find a solution? We have the same problem with magento 1.8

 
Magento Community Magento Community
Magento Community
Magento Community
 
dyoung
Jr. Member
 
Total Posts:  2
Joined:  2011-07-12
 

Hi,

I’m having the same issue, magento sends customer to paypal, paypal payment is accepted, IPN not working so store order stops at ‘Pending_Payment’
This is driving me nuts!  I’ve tried changing IPN address and playing with all settings but nothing seems to be working!  Is anyone looking at this issue?
Thanks in advance!

D

 
Magento Community Magento Community
Magento Community
Magento Community
 
perfectshape
Jr. Member
 
Total Posts:  13
Joined:  2010-02-25
 

We’re getting the same thing, but it appears to be ebay site sales being sent back to our magento server. I would have thought ebay would send the correct return url rather than relying on the default one setup on our paypal account.

My understanding from reading the magento documentation is that magento sends a return url that overrides the default.

Our magento side is working correctly on 1.8.1.0.

We used the IPN history screen in Paypal to find this out.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 1 of 2