|
|
@@ -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());
|