‘linchangsheng’ 6 bulan lalu
induk
melakukan
976c95d995

+ 5 - 2
mall-server-api/src/main/java/com/gree/mall/manager/logic/common/WechatLogic.java

@@ -1276,12 +1276,15 @@ public class WechatLogic {
         } catch (WxPayException e) {
             log.error("商户扫码支付失败: {}", payResult);
             log.error("商户扫码支付失败: {}", e.toString());
+
+            if (e.getErrCode().equals("USERPAYING"))
+                throw new RemoteServiceException(ResponseHelper.ResponseCode_USER_WAIT,"USERPAYING|"+id);
+
+
             throw new RemoteServiceException("扫码支付失败,请刷新二维码,再次尝试扫码" + e.getErrCodeDes());
         }
         if (payResult == null || WxPayConstants.ResultCode.FAIL.equals(payResult.getReturnCode())) {
 
-            if (payResult.getErrCode().equals("USERPAYING"))
-                throw new RemoteServiceException(ResponseHelper.ResponseCode_USER_WAIT,"USERPAYING|"+id);
 
             throw new RemoteServiceException("扫码支付失败,请检查二维码是否正确");
         }