Commit 880cdd0c authored by Junling Bu's avatar Junling Bu
Browse files

fix[litemall-wx-api]: 微信支付回调校验失败通知信息

parent 8da0b5ec
......@@ -5,6 +5,7 @@ import com.github.binarywang.wxpay.bean.notify.WxPayOrderNotifyResult;
import com.github.binarywang.wxpay.bean.order.WxPayMpOrderResult;
import com.github.binarywang.wxpay.bean.request.WxPayUnifiedOrderRequest;
import com.github.binarywang.wxpay.bean.result.BaseWxPayResult;
import com.github.binarywang.wxpay.constant.WxPayConstants;
import com.github.binarywang.wxpay.exception.WxPayException;
import com.github.binarywang.wxpay.service.WxPayService;
import com.github.pagehelper.PageInfo;
......@@ -601,6 +602,15 @@ public class WxOrderService {
WxPayOrderNotifyResult result = null;
try {
result = wxPayService.parseOrderNotifyResult(xmlResult);
if(!WxPayConstants.ResultCode.SUCCESS.equals(result.getResultCode())){
logger.error(xmlResult);
throw new WxPayException("微信通知支付失败!");
}
if(!WxPayConstants.ResultCode.SUCCESS.equals(result.getReturnCode())){
logger.error(xmlResult);
throw new WxPayException("微信通知支付失败!");
}
} catch (WxPayException e) {
e.printStackTrace();
return WxPayNotifyResponse.fail(e.getMessage());
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment