1. Home
  2. Prices
  3. Guided Tour
  4. New Shop
  5. Shop Review
  6. Ecommerce Marketing
  7. Ecommerce TV
  8. Magento Developers
  9. Portfolio
  10. Blog
  11. Contact

Posts Tagged ‘duplicate invoice id’

Increment Invoice ID

Posted on: 8th Feb 2010 By: Adam Moss No Comments

In a Magento store it is possible to increase the current invoice ID to anything you like through phpMyAdmin. This is often something that needs doing when receieving the dreaded Paypal duplicate invoice ID error, which looks like this:

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

A common cause of this error is having multiple Magento stores sharing the same Paypal account – as soon as Paypal recognises the same Invoice ID coming through, it sees this transaction as having been already processed and simply blocks it from happening at all. There are two solutions to this problem:

  1. Use separate Paypal Accounts
  2. Create a distance between the duplicate invoice IDs that means the current working one will never catch up to the other. (This way isn’t exactly the cleanest solution, and can only really work with small stores that won’t be making millions of orders in its lifetime).

First log in to phpMyAdmin and select the eav_entity_store table.

eav-entity-store

Check  and click ‘edit’ for the row that contains the field entity_type_id 18, which refers to invoice IDs. Here’s a key to each row:

entity_type_id 4 = order
entity_type_id 18 = invoice
entity_type_id 24 = shipment
entity_type_id 28 = credit memo

When opened, change the increment_last_id value to a number higher than the one currently set. In my example I have increased it to 100500531. See below:

eav-entity

Click on Go, and this will save the table with its new values.

Before this works however, you need to create a dummy order to get things going, Paypal still receives the old invoice ID as it stands. Simply process an order, perhaps using ‘Cheque / Money Order’, just to get it out the way quickly, then you can test a new Paypal payment which will now be using Invoice IDs starting from where you changed it.

This resolves the Paypal duplicate Invoice ID error.