S
S
seagull2016-02-29 18:19:28
Classmates
seagull, 2016-02-29 18:19:28

FAPI.UI.showPayment no callback on close?

When the user closes the FAPI.UI.showPayment window and does not execute a transaction, the callback does not work.
Also, the callback does not work if the transaction is successful, but the user closed the window with a cross.
In the question , the purchase handler is not called after calling FAPI.UI.showPayment. What to do? it is written that it is possible to take the information from the server. But if the user did not make a transaction and closed the window, then nothing will come to the server either.
How to distinguish two situations on the client:
1. The user completed the transaction but closed the window with a cross.
2. The user closed the window with a cross and did not complete the transaction.
WebSockets and server pulling won't help as there will never be a response in the second situation. Timeout is also not suitable, since in the first situation the user can enter credit card data for a long time.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vjacheslav Kanivetc, 2016-03-01
@seagull

That's right, in the case of a committed transaction, the guaranteed method is only a server callback, and in the case of an imperfect and closed with a cross, there is no way to determine, except for unreliable timeouts.

D
DeXVinogradov, 2016-03-16
@DeXVinogradov

At the first touch (if the callback did not come) I send a request to the game server to check the in-game balance. If it has changed, then I consider that the payment has passed and display a message about successful payment.
A crutch, of course, but I couldn’t come up with an easier one.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question