|
@@ -211,6 +211,7 @@ public class WxPayServiceImpl implements IWxPayService {
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
public String paymentCallBack(String notifyData) {
|
|
public String paymentCallBack(String notifyData) {
|
|
|
|
|
+ String xmlBack = "<xml><return_code><![CDATA[FAIL]]></return_code><return_msg><![CDATA[报文为空]]></return_msg></xml> ";
|
|
|
WxSmallConfig config = new WxSmallConfig(appid,mchid,key);
|
|
WxSmallConfig config = new WxSmallConfig(appid,mchid,key);
|
|
|
try {
|
|
try {
|
|
|
WXPay wxpay = new WXPay(config);
|
|
WXPay wxpay = new WXPay(config);
|
|
@@ -223,11 +224,8 @@ public class WxPayServiceImpl implements IWxPayService {
|
|
|
String out_trade_no = notifyMap.get("out_trade_no");
|
|
String out_trade_no = notifyMap.get("out_trade_no");
|
|
|
String transaction_id = notifyMap.get("transaction_id");
|
|
String transaction_id = notifyMap.get("transaction_id");
|
|
|
if(dealOrder(out_trade_no,transaction_id)){
|
|
if(dealOrder(out_trade_no,transaction_id)){
|
|
|
- Map<String,String> result = new HashMap<>();
|
|
|
|
|
- result.put("return_code","<![CDATA[SUCCESS]]>");
|
|
|
|
|
- result.put("return_msg","<![CDATA[OK]]>");
|
|
|
|
|
- String resultXml = WXPayUtil.mapToXml(result);
|
|
|
|
|
- return resultXml;
|
|
|
|
|
|
|
+ xmlBack = "<xml><return_code><![CDATA[SUCCESS]]></return_code><return_msg><![CDATA[OK]]></return_msg></xml>";
|
|
|
|
|
+ return xmlBack;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -237,7 +235,7 @@ public class WxPayServiceImpl implements IWxPayService {
|
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
|
}
|
|
}
|
|
|
- return null;
|
|
|
|
|
|
|
+ return xmlBack;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|