Issue new order no. if payment error

intandemintandem Member
in Help edited July 2010
I am about to go live with my first store for a client. However, we noticed a problem with our payment gateway - Realex - if a customer enters a wrong/rejected credit card number. In that case, an error response code is returned. If the customer now simply corrects the credit card number with the right details and tries to pay again they receive an error code that the transaction has already been processed.

Realex tell me this is because each transaction at their end needs a unique order number. So even if the payment is rejected, that's a transaction on their system and if the order comes in again with the same number it rejects it as a duplicate.

Right now, the customer needs to start from scratch with a clean shopping basket in order to get a new order number. That is not really a long-term option. Is there any better way around this?

Realex say that the format of the order number is irrelevant and could be a completely new number or the previous number with another character attached.

I'm lost. All help appreciated.
Comments
  • lukeluke FoxyCart Team
    Hello intandem. Sorry for the frustration. At the request of our users we removed a timestamp we used to append to the end of the order id back in March. They were having trouble sorting and organizing their transactions so they asked us to remove it. We have a plan to add a counter to the end of the transaction in the case of an error, but that wasn't going to be done until the next release. We'll look into this further and see if something can be done sooner without breaking anything.
  • lukeluke FoxyCart Team
    We just rolled out a fix for 060 which should address this issue. We're now keeping a counter for errors in the session and incrementing it every time so the order number will now be XXXXX_1 where XXXXX is the normal order number and "_1" would mean there was one error prior to the successful checkout.

    While we were in there we also fixed a bug we found for returning customers trying to use a saved payment card. It was complaining about the CVV2 not being present but we just had to send a different indicator value for when that isn't available.

    Please let us know if you run into any other troubles.
  • Thanks, Luke, that sounds like the perfect solution. Also similar to an accounting system I used in a previous job whereby it also kept invoices and credit notes associated in a similar manner.

    Just tested it out and working fine now. Thanks for yet another quick response! We're ready to go live now :-)

    All the best, Carolin
Sign In or Register to comment.