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 2 of 2
Wrong order ID: XXX Exception In PayPal Module
 
BigDune
Jr. Member
 
Total Posts:  22
Joined:  2010-04-21
 

I had this same exception in Magento 1.6.1 showing up in exception.log. The problem for us was that the Order Number and Invoice Numbers were out of sync.

For some reason, when using PayPal Express, it causes the order to not be fully processed and logs the exception: “Wrong Order ID”. The worst part was that it was erratic… sometimes it would fail, other times it was fine.

THE SOLUTION:

http://www.magentocommerce.com/magento-connect/fooman-sameorderinvoicenumber.html

Thanks for a great extension from Fooman! Just install their “SameOrderInvoiceNumber” extension, remember to enable it in “Configuration | Sales | Order Numbers” and you’re all set!

Solved the problem for us on Magento 1.6.1… don’t mess with core code!

 
Magento Community Magento Community
Magento Community
Magento Community
 
BigDune
Jr. Member
 
Total Posts:  22
Joined:  2010-04-21
 

OK… so I have to take back that it’s all solved after the solution posted above. It definitely helped to reduce the errors, but didn’t solve it.

EDIT: For those of you who have been following this thread, we’ve posted a variety of solutions for this problem, but have yet to find one that completely solves the “Wrong Order ID” error in the Paypal IPN.

With a lot of input from the community on our blog, we’ve concluded for now that the primary cause of this error is related to lack of server performance. There’s definitely some big quirks to Magento’s Paypal IPN module, but with each update they continue to make improvements.

For a full breakdown of our analysis on this error, see this blog post:

geek-blog/magento/60-magento-paypal-ipn-wrong-order-id.html

Please continue to post back your results and observations.

 
Magento Community Magento Community
Magento Community
Magento Community
 
CoastAMS
Member
 
Avatar
Total Posts:  57
Joined:  2011-03-24
Bath
 

BIGDUNE - Did this throw up any orders failed but their payment went through? (before the fix)

 
Magento Community Magento Community
Magento Community
Magento Community
 
BigDune
Jr. Member
 
Total Posts:  22
Joined:  2010-04-21
 

CoastEMS,

Yes… that is exactly what alerted us to the problem in the first place, then we traced it in the exception log and went from there.

 
Magento Community Magento Community
Magento Community
Magento Community
 
kaylamatthews
Jr. Member
 
Total Posts:  8
Joined:  2012-02-02
 
BigDune - 08 December 2011 10:59 AM

OK… so I have to take back that it’s all solved after the solution posted above. It definitely helped to reduce the errors, but didn’t solve it.

We finally DID get this exception solved in 1.6.1 using the solution described here:

geek-blog/3-magento/6-magento-paypal-ipn-wrong-order-id

Hope that helps! Been running for a day on one of our client’s sites with a high transaction turnover and not a single error so far.

Hi there, I apologize if I seem a bit thick, but I’ve read over almost all the posts I could find on you discussing this topic and I have read your website’s article extensively, but I still fail to see the solution...unless it’s just to improve the server’s hardware and resources? Is that the only way to fix this issue?

 
Magento Community Magento Community
Magento Community
Magento Community
 
BigDune
Jr. Member
 
Total Posts:  22
Joined:  2010-04-21
 

I apologize if I seem a bit thick, but I’ve read over almost all the posts I could find on you discussing this topic and I have read your website’s article extensively, but I still fail to see the solution...unless it’s just to improve the server’s hardware and resources? Is that the only way to fix this issue?

After a few weeks of running a “code fix” we had posted on our site previously it ended up not truly solving the source of the error. For now, our conclusion is that there is a definite close relationship with server load and this error showing up. On our higher performance dedicated servers we have never had this error show up.

Sorry there’s no quick “code-fix” for this… not from what we’ve found so far.

 
Magento Community Magento Community
Magento Community
Magento Community
 
BigDune
Jr. Member
 
Total Posts:  22
Joined:  2010-04-21
 

Got it! We’ve eventually found a solid solution to this error and it’s just a few lines of code.

Magento has fixed it in version 1.7. However, we would recommend a slightly different approach.

Read full blog post here: Magento Paypal IPN Wrong Order ID – SOLVED

 
Magento Community Magento Community
Magento Community
Magento Community
 
ede1
Jr. Member
 
Total Posts:  4
Joined:  2013-01-04
 

Doesn’t seem to fix the actual error:
“...Paypal uses a request variable called [invoice] which contains the order number from Magento and that get’s looped back to the Magento store via IPN...”
app/code/core/Mage/PayPal/Model/Api/Standard.php, line 45:
„’invoice’ => ‘order_id’,“
I don’t know php but I imagine that the “loop” back to Magento via IPN means that Magento gets the order id reported as invoice id which causes some problems.
Has anyone an idea how to fix this problem? Using Foomans extension may cause gaps in the shops invoice numbers which won’t be accepted by the tax office report, at least in Germany.

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