How to avoid create a new order when a payment is refused

How to configure and adapt Aimeos based shops as developer
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
sixbynine
Posts: 93
Joined: 10 Jan 2018, 11:22

How to avoid create a new order when a payment is refused

Post by sixbynine » 04 Nov 2018, 10:07

Hello,

I wonder if it would be possible, when the payment for an order is first refused, instead of creating a new order ID to use the same order ID again when the customer is trying to pay it again (with the button TRY AGAIN).

I ask that because it is complicated to manage the stock levels with this default behaviour. In my country, credit card transactions are protected with a 3D secure code that is often mis-typed by the customers leading easily to a few "refused" orders before having one accepted.

Thank you very much,

sbn

User avatar
aimeos
Administrator
Posts: 7865
Joined: 01 Jan 1970, 00:00

Re: How to avoid create a new order when a payment is refuse

Post by aimeos » 05 Nov 2018, 21:47

It might be possible if you add this but there may be side effects:
https://github.com/aimeos/ai-controller ... b34e8f525c

Can you please test yourself, escpecially what happens if the basket is changed after clicking on "change payment"?

Nevertheless, it won't solve your problem because product stock is blocked by the order item, not the order base item. You have to execute the "order/cleanup/unpaid" and "order/cleanup/unfinished" job controllers regularly to release the stock and used coupons.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply