How to give customer 'x' amount of tries to retry the transaction

Hi there,

I'm using Hosted Tokenization on my front end, and PHP Payment Vault API on for my backend. The issue I'm encountering is with duplicate order IDs. For instance, if a user accidentally enters invalid credit card details, their order ID will still be stored in Moneris, and they will not be able to try their credit card details again due to 'duplicate order ID' error. How can I prompt the user to retry their credit card details and not receive the duplicate order ID error?


  • There is no way around changing the order id. You would have to make it so it increments, or maybe add a date/timestamp. The order_id is a key field in our database so it needs to be updated.