Failed orders on duplicate invoice numbers

I have customers that get a declined order and try to repay. They seem to be going back to the payment info. page and resubmitting. This generates a duplicate invoice number and so authorize.net rejects it with an error of a duplicate invoice number. 1.3.5 used to create a _1 after the number. It seems that my 2.1.2 cart only does this when you use the actual repay function in the review orders page but does not if someone simply goes back to step 3 (which the cart allows).



Anyone have a suggestion for this issue? I am losing business quick with this upgrade!

I also have this problem and I’m running 2.0.6 version, so this “problem” goes back, but it’s not exclusive of authorize.net, it happens in other payment gateways to, if the client goes back and than forward, the payment error is garanteed

ok, I think I found a temporary solution, though not ideal.



for now



go to

payments/authorizenet_aim.php



and add



$pp_data[] = "x_duplicate_window=10";




the number 10 can be changed to how many seconds you want your minimal time allowed to be between duplicate transactions.





just under



// CC information
$pp_data[] = "x_card_num=" . $order_info['payment_info']['card_number'];
$pp_data[] = "x_exp_date=" . $order_info['payment_info']['expiry_month'] . '/' . $order_info['payment_info']['expiry_year'];
$pp_data[] = "x_card_code=" . $order_info['payment_info']['cvv2'];

[quote name=‘moka’]ok, I think I found a temporary solution, though not ideal.



for now



go to

payments/authorizenet_aim.php



and add



$pp_data[] = "x_duplicate_window=10";




the number 10 can be changed to how many seconds you want your minimal time allowed to be between duplicate transactions.





just under



// CC information
$pp_data[] = "x_card_num=" . $order_info['payment_info']['card_number'];
$pp_data[] = "x_exp_date=" . $order_info['payment_info']['expiry_month'] . '/' . $order_info['payment_info']['expiry_year'];
$pp_data[] = "x_card_code=" . $order_info['payment_info']['cvv2'];
[/QUOTE]



Thanks for that solution. But, I don’t understand how that solves the problem of orders not being authorized due to duplicate order numbers. Please explain.

If the same failed order_id is sent within 10 seconds, it will fail as a dup. If it’s after 10 seconds it will be accepted. Read the AIM docs for a description of the AIM parameters.



That’s my interpertation anyway.

It didn’t work for me. In fact, I actually closed the window, and came back to the site later. The item was still in the cart, and I again tried placing the order. It was rejected as a duplicate order number.

What is the status of the original order_id in Anet? I.e. was it Declined? And for what reason?

Here’s the Anet FAQ on this issue: [url]404 | Authorize.net



So setting the x_duplicate_window to 10 or so should do the trick (but note that if a customer clicks repay for a successful order they will be double charged). So Anet is actually trying to prevent duplicates and subsequent refunds…