native压哨支付(订单到期前)咋办?

微信支付 文章 2022-03-02 14:20 253 0 全屏看文

AI助手支持GPT4.0

native压哨支付(订单到期前)咋办?What about native whistleblower payment (before the order expires)?

native压哨支付(订单到期前)咋办?

比如,网页显示二维码后,每3秒往后端查询一次,设定该订单1分钟失效,第20次轮询(1分钟)时会发送命令关闭订单。


假设,第60秒用户支付成功,由于回调地址notify_url接收数据时已经是61秒,该笔订单已经被我关闭了,请问这事咋整?大家有什么思路?

For example, after the web page displays the QR code, query the back end every 3 seconds, set the order to be invalid for 1 minute, and send a command to close the order at the 20th polling (1 minute). Suppose that the user pays successfully in the 60th second due to the callback address notify_ When the URL received the data, it was 61 seconds. The order has been closed by me. What's the whole matter? What ideas do you have?

回答:

Memory:

支付成功的订单不会被关闭

北望沣渭:

谢邀,一般俺的做法是,把哨子再往前推个10多秒,让前端只看到50秒的倒计时,给后端腾出些时间去关单。

VBit:

关闭订单前用接口检查订单状态

-EOF-

AI助手支持GPT4.0