RE Ronald: I suppose it doesn't really matter what my first error was, POS declined it. When we reentered the card information and Mercury responded with a Duplicate indicator, POS should assume the card was accepted because that is what Mercury did. The two must be in sync with this outcome. I think fixing ezPower to accept the duplicate indication and maybe display a warning or informational message to that effect, that would fix this problem.
RE Vishal: I do not think that the price factors in. If we complete a transaction and then want to change it, we typically void the first one and reenter it as a new transaction/invoice. I think this error situation described above is rare enough that adding new variables to it is not worthwhile.
The one piece that I am worried about is the case when there are two invoices, for the same card, and same amount. In the old days PCCharge would flag this as a duplicate, POS would ask if you really want to do this, and you could proceed or cancel the transaction. That behavior was fine in that the retailer was in control of the outcome.
What does Mercury respond with if the invoice is DIFFERENT, but the card and amount are the same. If it just ignores this case then that is ok. We'll take our lumps if we entered the second transaction incorrectly. If it proceeded to void the first like it does when the invoice is the same, that would be a problem.