| @@ -1325,7 +1325,6 @@ public class WxPayOrderServiceImpl implements WxPayOrderService { | |||||
| // 前端支付取消, | // 前端支付取消, | ||||
| // 回调未返回,主动检查支付订单状态 | // 回调未返回,主动检查支付订单状态 | ||||
| try { | try { | ||||
| record.setPayOrderNo(String.valueOf(record.getId())); | |||||
| WxPayAccount payAccount = wxPayAccountMapper.selectById(appInfo.getPayId()); | WxPayAccount payAccount = wxPayAccountMapper.selectById(appInfo.getPayId()); | ||||
| int payStatus = payServiceFactory.getPayAdapterService(record.getPayVendor()).queryPayStatusCode(record, order, appInfo, payAccount); | int payStatus = payServiceFactory.getPayAdapterService(record.getPayVendor()).queryPayStatusCode(record, order, appInfo, payAccount); | ||||
| if (payStatus!=EnumPayStatus.PAY_STATUS_SUCCESS.getCode().intValue() && payStatus!=EnumPayStatus.PAY_STATUS_WAIT.getCode().intValue()) { | if (payStatus!=EnumPayStatus.PAY_STATUS_SUCCESS.getCode().intValue() && payStatus!=EnumPayStatus.PAY_STATUS_WAIT.getCode().intValue()) { | ||||
| @@ -1339,35 +1338,6 @@ public class WxPayOrderServiceImpl implements WxPayOrderService { | |||||
| throw new MallinkException(ErrorCode.PAY_ORDER_ERROR.getCode(), "支付订单未成功"); | throw new MallinkException(ErrorCode.PAY_ORDER_ERROR.getCode(), "支付订单未成功"); | ||||
| } | } | ||||
| // String response = WxPayOrderServiceHelper.wechatPayOrderQuery(appInfo, record,payAccount); | |||||
| // logger.info("pay order query, " + record.toString() + ", response: " + response); | |||||
| // Map<String, String> returnMap = WxPayment.xmlToMap(response); | |||||
| // String result_code = returnMap.get("result_code"); | |||||
| // if ("SUCCESS".equals(result_code)) { | |||||
| // String trade_state = returnMap.get("trade_state"); | |||||
| // //SUCCESS—支付成功 | |||||
| // //REFUND—转入退款 | |||||
| // //NOTPAY—未支付 | |||||
| // //CLOSED—已关闭 | |||||
| // //REVOKED—已撤销(刷卡支付) | |||||
| // //USERPAYING--用户支付中 | |||||
| // //PAYERROR--支付失败(其他原因,如银行返回失败) | |||||
| // if ("SUCCESS".equals(trade_state)) { | |||||
| // // 查询支付订单 -- 已支付 | |||||
| // // 继续更改状态 | |||||
| // } else if ("USERPAYING".equals(trade_state)) { | |||||
| // // 继续检查状态 | |||||
| // } else { | |||||
| // // 支付订单未成功,返回异常 | |||||
| // record.setPayOrderStatus(EnumPayStatus.PAY_STATUS_FAIL.getCode()); | |||||
| // try { | |||||
| // wxPayOrderMapper.updateById(record); | |||||
| // } catch (Exception e) { | |||||
| // logger.error("支付订单失败状态更新异常: " + e.getMessage()); | |||||
| // } | |||||
| // throw new MallinkException(ErrorCode.PAY_ORDER_ERROR.getCode(), "支付订单未成功"); | |||||
| // } | |||||
| // } | |||||
| } catch (MallinkException e) { | } catch (MallinkException e) { | ||||
| throw new MallinkException(ErrorCode.PAY_ORDER_ERROR.getCode(), e.getMessage()); | throw new MallinkException(ErrorCode.PAY_ORDER_ERROR.getCode(), e.getMessage()); | ||||
| } catch (RuntimeException e) { | } catch (RuntimeException e) { | ||||