微信支付,拉起支付后,订单已失效,怎么拦截本次支付

微信支付 文章 2022-01-04 16:00 1150 0 全屏看文

AI助手支持GPT4.0

微信支付,拉起支付后,订单已失效,怎么拦截本次支付WeChat Pay, after the payment is initiated, the order has expired, how to intercept this payment

微信支付,拉起支付后,订单已失效,怎么拦截本次支付

各位大神,欢迎帮帮小弟:

背景及实现业务:小程序内,我们的逻辑是用户提交生成订单后需在2分钟完成支付,若超过2分钟未支付,则该订单自动失效;但是呢,加入用提交订单到支付唤起支付界面(输入支付密码,下图1)停留太久,到至订单已超时,用户输入完密码时,有没有办法判断拦截掉本次支付。我之前在【同城旅行】小程序里面买机票时好像是可以实现的,在输入完密码后给了一个“交易有效截止时间非法”的提示,忘了录屏了(见下图2) 因为机票退票太坑爹不敢再去下单,在【同城旅行】小程序上订火车票同样的应用场景是可以支付成功,但是立马就自动退款了



Dear gods, welcome to help younger brother: background and implementation business: in the applet, our logic is that the user needs to complete the payment within 2 minutes after submitting the generated order. If the payment is not made within 2 minutes, the order will automatically become invalid; However, if you stay too long when submitting an order to the payment interface (enter the payment password, as shown in Figure 1 below), until the order has timed out and the user has entered the password, is there any way to judge whether to intercept this payment. When I bought a ticket in the [intra city travel] applet before, it seemed that it could be realized. After entering the password, I gave a prompt of "illegal transaction effective deadline", and forgot to record the screen (see Figure 2 below). Because the ticket refund was too pit, dad didn't dare to place an order again. The same application scenario can be paid successfully in the [intra city travel] applet, But it's an automatic refund right away

回答:

老张:

1、交易失败,重新统一下单呢?

宝宝贝贝:?我牛仔99
Memory:

周宏伟:你好,你说的这个两小时的有效期具体是指什么到什么的有效期;我们的需求是:用户提交生成订单开始,2分钟内要支付,未支付的话订单就自动失效(难题在于用户在唤起支付-输入密码过程中才失效,怎么样拦截下本次支付)     感谢你,望你多多指教
Memory:这字段是你自定义的,你要2分钟后失效就传2分钟后的时间,超过你设置的时间,支付就报错你提问的那个截图

-EOF-

AI助手支持GPT4.0