Problem With Incomplete Orders, My Payment Processor Cannot Accept Duplicate Order Id

i am using cs-cart 4.1.4, now i am using ccavenue payment gateway. when a user makes a new order, example order id 1010 and somehow he is not able to pay due to some error is credit card or payment gateway, he comes back to our website and now again tries to checkout, but this time he gets error from our payment processor “Order ID 1010 Duplicate”, this means the cs-cart is again sending the same order id as last time which was incomplete. but our processor cannot accept this…



now is it possible that we can disable this and ask cs-cart to send a new order id number every time a customer checkouts… because sending the old order id number is not accepted by our payment processor.

[quote name='nonu_don' timestamp='1404468853' post='186967']

i am using cs-cart 4.1.4, now i am using ccavenue payment gateway. when a user makes a new order, example order id 1010 and somehow he is not able to pay due to some error is credit card or payment gateway, he comes back to our website and now again tries to checkout, but this time he gets error from our payment processor “Order ID 1010 Duplicate”, this means the cs-cart is again sending the same order id as last time which was incomplete. but our processor cannot accept this…



now is it possible that we can disable this and ask cs-cart to send a new order id number every time a customer checkouts… because sending the old order id number is not accepted by our payment processor.

[/quote]



You can just add the suffix to the order_id parameter. For example,



$new_order_id = $order_id . "_" . TIME;




In this case the system will add timestamp suffix to the order ID for each attempt. This behavior is used in many payment processors integrated with CS-Cart

  1. yes is a good idea, but this will increase the order number size to quite big… any posibility to stop cs-cart from checking for previous orders and always make a new order…
  2. the changes u asked me to change, can u please tell me which file need to make these changes to?

can anyone really help me this problem?

[quote name='nonu_don' timestamp='1404470957' post='186972']

  1. yes is a good idea, but this will increase the order number size to quite big… any posibility to stop cs-cart from checking for previous orders and always make a new order…

    [/quote]



    Yes, it is possible. But additional change of the CS-Cart core are required.


[quote name='nonu_don' timestamp='1404470957' post='186972']

2. the changes u asked me to change, can u please tell me which file need to make these changes to?

[/quote]



Open the “app/payments” directory and find php file with the name similar to ccavenue .



Hope that helps.

[quote name='nonu_don' timestamp='1405325979' post='187482']

can anyone really help me this problem?

[/quote]



Hi,



We are solved this order ID issues from our latest CCAvenue MCPG CS-Cart add-on and we are successfully installed same on our customer website.



If you want CCavenue CS-Cart addon please contact me at abssofts@gmail.com.



Thanks you.

you mean the issue with duplicate order id? you have solved this problem?

[quote name='nonu_don' timestamp='1407363643' post='188976']

you mean the issue with duplicate order id? you have solved this problem?

[/quote]



Did you make changes according to my previous post?

[quote name='nonu_don' timestamp='1407363643' post='188976']

you mean the issue with duplicate order id? you have solved this problem?

[/quote]



Hi,



Yes, I have solved duplicate order ID issue from my payment gateway add-on and will generate new order ID.

Hi,

Has anyone figured out an easy method to make this core change?

We're getting intermittent issues with duplicate orders.

CS-CART / Simtech both tell us the store functions the way I does. (Most of the time it does)

But the issue of duplicate payments still exists.

We need that every payment attempt created a new order.

Currently we have
Order 0100 - Failed
Order 0100 - Failed
Order 0100 - Failed
Order 0100 - Failed
Order 0100 - Processed

What we need is
Order 0100 - Failed
Order 0101 - Failed
Order 0102 - Failed
Order 0103 - Failed
Order 0104 - Processed

Anyone able to do this for us?

Stephen

Try to use pre_place_order (app/functions/fn.cart.php) hook and remove order_id value from the $cart array

(!) Not tested

Fix the payment prcessor script to appropriately handle re-submission of order data. You should be able to preserve the order_id but use a different value fot the payment processor. Suggest you contact the provider of the payment script.