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 Website Payments Pro error: Duplicate Invoice ID
 
d9000
Jr. Member
 
Total Posts:  18
Joined:  2008-04-29
 

After a sudden span of no sales over several days, I began to suspect something was wrong with the checkout process.  I tried placing a test order, and after Step 5 and hitting the Place Order button, I get a popup window with the following error message:

Invalid Data: The transaction was refused as a result of a duplicate invoice ID supplied.  Attempt with a new invoice ID

Any thoughts on what would suddenly cause this?  I have not made any major config changes since the last successful order.

 
Magento Community Magento Community
Magento Community
Magento Community
 
d9000
Jr. Member
 
Total Posts:  18
Joined:  2008-04-29
 

Also - I just tried checking out with Paypal Express and I’m getting this error as soon as it jumps over to the Paypal site:

This transaction is invalid. Please return to the recipient’s website to complete your transaction using their regular checkout flow.

I’m thinking my install is somehow “stuck” on an older invoice number and it needs to be incremented to make Paypal happy.  Anyone know where in the database this is set, or the best way to go about updating it?

Thanks!

 
Magento Community Magento Community
Magento Community
Magento Community
 
d9000
Jr. Member
 
Total Posts:  18
Joined:  2008-04-29
 

Here is what I have found in the eav_entity_store table - an increment_last_id of 100000039 that corresponds with the last test order number in my admin orders screen:

entity_store_id: 8
entity_type_id: 4
store_id: 1
increment_prefix: 1
increment_last_id: 100000039

However, I put Website Payments Pro into debug mode, and the paypal_api_debug table shows that Magento is trying to pass the following value:

INVNUM=100000029

That is exactly one number greater than my last “valid” transaction.  The only test transactions that have shown up in Magento Admin since I started having these problems are Paypal Express transactions.  However, all transactions, valid or invalid seem to be incrementing the value in eav_entity_store.  I’m guessing the Invoice ID of 100000029 was used in a previous transaction, hence the Paypal errors.

Any idea how I can determine or change where INVNUM is being pulled from?

 
Magento Community Magento Community
Magento Community
Magento Community
 
d9000
Jr. Member
 
Total Posts:  18
Joined:  2008-04-29
 

Ok… I got the “duplicate order id” error to go away by deleting old test orders from the following tables:

sales_flat_quote
sales_order
sales_order_entity

I ended up orphaning some data in the sales_order_entity_* tables, but see no adverse effects from that (yet).

I’m still getting the same error on Paypal Express, but I’m going to disable that for now - could be a different issue completely.

 
Magento Community Magento Community
Magento Community
Magento Community
 
wsj3
Guru
 
Avatar
Total Posts:  521
Joined:  2008-07-13
Portland, OR
 

Did you figure out a fix for this? I rolled back my site and am getting this error.

 
Magento Community Magento Community
Magento Community
Magento Community
 
superdak
Jr. Member
 
Avatar
Total Posts:  21
Joined:  2008-10-28
 

I’m getting the error too.

 
Magento Community Magento Community
Magento Community
Magento Community
 
wsj3
Guru
 
Avatar
Total Posts:  521
Joined:  2008-07-13
Portland, OR
 

I found out the solution. In paypal there is a ‘Payment Received Preferences’. You click the selection which allows for multiple payments with a single invoice. This solved the problem.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Greg White
Jr. Member
 
Total Posts:  2
Joined:  2009-03-17
San Diego
 

We had the same problem and selected multiple payments with a single invoice within the Payment Received Preferences to correct.

Unfortunately PayPal is now double billing shipping! 

Upon completion of a transaction, on the clients visa transaction registry, we show a transaction for the full cost of the purchase, with product, taxes and shipping.  Immediately following PayPal is issuing a second invoice for duplicate shipment costs!

Any idea what is causing this and how to resolve?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Destreyf
Jr. Member
 
Total Posts:  26
Joined:  2009-01-20
 

Hey Greg White, i have a solution for you click on this link, i figured out how to fix it.

http://www.magentocommerce.com/boards/viewthread/36685/#t119097

 
Magento Community Magento Community
Magento Community
Magento Community
 
Thejosh13
Sr. Member
 
Total Posts:  252
Joined:  2008-06-23
 

I am also getting this error, could it be from starting multiple stores on seperate installs to the same paypal account?

I have tried changing the Invoice number in eav_table_store but that does not work.

“Invalid Data: The transaction was refused as a result of a duplicate invoice ID supplied.  Attempt with a new invoice ID”

How do I possibly solve this?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Thejosh13
Sr. Member
 
Total Posts:  252
Joined:  2008-06-23
 

I have not found any solutions in the forums, can someone or a magento team member post one.

 
Magento Community Magento Community
Magento Community
Magento Community
 
jballotti
Guru
 
Avatar
Total Posts:  339
Joined:  2008-04-20
Chicago area
 
Thejosh13 - 19 April 2009 02:34 PM

I am also getting this error, could it be from starting multiple stores on seperate installs to the same paypal account?

I have tried changing the Invoice number in eav_table_store but that does not work.

“Invalid Data: The transaction was refused as a result of a duplicate invoice ID supplied.  Attempt with a new invoice ID”

How do I possibly solve this?

I haven’t run into this myself, however, if you are running two separate Magento installations and using the same PayPal account for both of them then it is certainly possible that you could be creating and sending duplicate order/invoice ID’s.
Having read some of the other posts regarding this issue I have to agree that there should be some mechanism to ensure the possibility of generating a more unique order/invoice number. My recommendation would be to use a combination of store ID/Abbreviation, Product ID/SKU, and date as the prefix for the order/invoice ID. But that’s just an opinion/suggestion.

I did find the following that might help:
http://eliasinteractive.com/blog/magento-ecommerce-how-to-reset-all-test-order-information-and-set-unique-prefix-for-orders-invoices-shipments-and-credit-memos/

Good Luck.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Thejosh13
Sr. Member
 
Total Posts:  252
Joined:  2008-06-23
 

Ah I followed those directions and they did not work right away, the next day it worked. Thanks for all the help!

 
Magento Community Magento Community
Magento Community
Magento Community
 
pollyplummer
Member
 
Avatar
Total Posts:  71
Joined:  2009-01-19
Tulsa, OK
 

Sorry I know this is an old thread, but I am wondering if anyone knows how to use that script linked about and add some letters into the prefixes. I have two magento stores operating from two separate installations on separate domains. They share a paypal account and I keep getting Invoice ID errors.  Is there a way to insert a 3 letter prefix to keep these Invoice ID’s unique?  Where would I insert them into this query?  Thank you anyone for any help you can provide!

http://eliasinteractive.com/blog/magento-ecommerce-how-to-reset-all-test-order-information-and-set-unique-prefix-for-orders-invoices-shipments-and-credit-memos/

 
Magento Community Magento Community
Magento Community
Magento Community
 
jimball
Member
 
Total Posts:  63
Joined:  2009-06-03
 
pollyplummer - 20 July 2009 11:21 AM

Sorry I know this is an old thread, but I am wondering if anyone knows how to use that script linked about and add some letters into the prefixes. I have two magento stores operating from two separate installations on separate domains. They share a paypal account and I keep getting Invoice ID errors.  Is there a way to insert a 3 letter prefix to keep these Invoice ID’s unique?  Where would I insert them into this query?  Thank you anyone for any help you can provide!

http://eliasinteractive.com/blog/magento-ecommerce-how-to-reset-all-test-order-information-and-set-unique-prefix-for-orders-invoices-shipments-and-credit-memos/

I think there might be a community extension available that accomplishes this for you.

cool smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
pollyplummer
Member
 
Avatar
Total Posts:  71
Joined:  2009-01-19
Tulsa, OK
 

Any idea of what it might be called? or a link? smile

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