first thing to try is disable any user input button as soon as they click it.
Or did I misunderstand the question?
Next step would be to make sure you are updating the status of the order in an atomic fashion
Hello!
When our e-commerce customers arrive to our order confirmation page (upon we create customer object, order rows etc) from our payment provider, sometimes (perhaps 1 every 250 orders) it happens twice at the exact time.
The implication is that we will create two orders, register two payments, sometimes create two users.
When browsing through the Laravel app logs, we see that the two requests happen at the exact same time.
How can this be solved?
Can we use Redis cache to have a list (basically an array) with the latest "payment provider order ids" and do a lookup early on the confirmation page controller:
if payment provider order id is in list, abort else create order etc
How would you solve this?
Please or to participate in this conversation.