If the frontend calls the backend payment API to return a timeout, what if the actual payment API succeeds in subsequent processing?

in the system, the foreground POS machine needs to call the back-end payment API. After the POS machine requests the payment interface for the first time, it has not received a return for a long time, and the timeout is treated as a failure, but the actual backend is already in processing and the final payment is successful. However, the POS machine does not know that the processing is finally successful, but it initiates a second payment request again. At this time, there will be two successful payment requests at the backend. How to optimize this situation?

Mar.26,2021

1. Extend the timeout time
2. Request to query the payment result instead of waiting for


1. Determine whether the backend return has not been received for a long time because the backend has not returned or timed out or is disconnected
2. The backend processes the payment and should process it after it returns successfully

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b30df7-2bd50.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b30df7-2bd50.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?