-
-
Notifications
You must be signed in to change notification settings - Fork 57
Description
Feature Request
Related problem
In our project, we offer special benefits that are only available for a first order. However, we have noticed that users can start an order, abandon the payment process, and leave the order in an unfinished state. This makes it difficult to reliably identify completed orders and ensure that the first-order benefits are only granted once.
Potential solution
To solve this issue, it would be helpful if unfinished orders (e.g. orders with a canceled or abandoned payment) could be automatically removed from the system after a certain period. A possible implementation could be a Symfony command that runs via a cron job and removes such orders based on specific criteria (e.g., order status, payment status, and creation date).
Alternatively, instead of creating a new order when a user attempts another purchase, it might be worth considering finalizing an existing open order. This could help keep the system cleaner and prevent unnecessary abandoned orders from accumulating.
Current workaround
As a workaround, we currently check for a successfully completed payment instead of a valid order. While this helps to correctly identify a first order, it does not remove unfinished orders from the system. This can lead to issues, for example, when displaying orders in the user account, where unfinished orders would still appear.