PAYONE-GmbH / magento-1

PAYONE Payment Extension for Magento 1
22 stars 41 forks source link

Missing Invoice / Creditmemo Increment IDs #431

Closed sprankhub closed 1 month ago

sprankhub commented 4 years ago

One of our clients has issues with missing invoice and creditmemo increment IDs. The entity IDs are consecutive, but sometimes, there are missing increment IDs. We tracked this down to a PAYONE update including the changes from https://github.com/PAYONE-GmbH/magento-1/pull/320/. Could you shed some light on what these changes from MAGE-410 should have fixed?

The issue is that currently, during the capture, if the invoice does not have an increment ID yet, you reserve a new one via \Payone_Core_Model_Mapper_ApiRequest_Payment_Abstract::fetchNewIncrementId. TBH, I think you should never ever do this at all since Magento does that in the invoice save process anyway. This is called via the following stack:

The issue probably happens under these conditions:

Hence, there is a reserved increment ID, which is unused.

Could you please check that? IMHO, the issue cannot be solved without removing the manual retrieval of the increment ID.

@mwr @tniebergall, since you know a thing or two about this extension ;-) and you also have bigger clients, could you check if you also have missing invoice / creditmemo increment IDs?

T-Kuchel commented 4 years ago

Hi @sprankhub ,

we will check that, and hopefully come back with a satisfying solution.

Greetings from Kiel Timo

sprankhub commented 4 years ago

Thanks, @T-Kuchel! Since missing increment IDs are somewhat critical, could you please handle this with high priority? As a very first step, some background information regarding MAGE-410 would be helpful. Thanks!

T-Kuchel commented 4 years ago

Hi @sprankhub ,

i raise the priority and this is now #2 on the list.

Greetings from Kiel Timo

sprankhub commented 4 years ago

Sorry to bug you again :confused: Any update? As said, any background information regarding MAGE-410 would be helpful in any case.

fjbender commented 4 years ago

With MAGE-410 we tried to always submit the Magento invoice ID to our platform, even when basket submission is turned off. Sounded like a small and simple change at that time. It would improve merchant experience when looking for transactions in our backend, as they could search for the Magento invoice number.

sprankhub commented 4 years ago

I still consider this an important issue. However, my client unfortunately moved away from PAYONE, so that the issue is not that urgent any more for me.

fjbender commented 4 years ago

We have a conflict of interest here. Some merchants want the invoice ID submitted to our platform, and others value consecutive invoice IDs more.

The only solution I'd see here is to wrap the functionality of #320 in a feature toggle, so that merchants can decide, if they want to potentially risk un-consecutive invoice IDs.

Unfortunately, we'll have to keep this in the backlog for now.