I use Robokassa, all the logic according to the documentation.
I found a flaw in either Robokassa, or I use logic incorrectly, namely:
- The buyer chooses a table in the restaurant.
- My script puts the status in the database for this table - a reserve , while the table is in reserve, no one can put it in the reserve and therefore buy it.
- The buyer goes to the payment page Robokassa and pays.
- My script receives a confirmation via Result URL and changes its status - paid.
How can I withdraw from the reserve if the client does not pay? There are two scenarios:
- when the client refused in the interface of Robokassa and Robokassa sends it to the Fail page - in this case I get an answer from this page and change the status in the database to free
- The client stupidly closed the payment page, accordingly Robokassa does not send anything to the Fail page and the table hangs in reserve.
For some reason, Robokassa does not voice this moment at all, that is, get a Fail-answer on the Fail page and period. Temporarily, I am clearing orders through crown. who hang in the reserve for more than 5 minutes, that is, definitely the client should have time to pay, but not beautiful? And the client can keep the form of payment open for some time (10-minute beacon gives the payment) and still pay, some kind of duality arises.
Who as solved similar, share !!)))