|
|
@@ -192,11 +192,12 @@ public class WxPayController extends BaseController { |
|
|
logger.info("[" +getIpAddr() + "]微信退款回调"); |
|
|
logger.info("[" +getIpAddr() + "]微信退款回调"); |
|
|
Map<String, String> paramMap = null; |
|
|
Map<String, String> paramMap = null; |
|
|
String response = ""; |
|
|
String response = ""; |
|
|
String xml = ""; |
|
|
|
|
|
|
|
|
String json = ""; |
|
|
try { |
|
|
try { |
|
|
xml = IOUtils.toString(request.getInputStream(), Charset.forName("UTF-8")); |
|
|
|
|
|
logger.info(xml); |
|
|
|
|
|
paramMap = WxPayment.xmlToMap(xml); |
|
|
|
|
|
|
|
|
json = IOUtils.toString(request.getInputStream(), Charset.forName("UTF-8")); |
|
|
|
|
|
logger.info(json); |
|
|
|
|
|
paramMap = JSON.parseObject(json,Map.class); |
|
|
|
|
|
// paramMap = WxPayment.xmlToMap(xml); |
|
|
paramMap.put("tenantId", tenantId); |
|
|
paramMap.put("tenantId", tenantId); |
|
|
String jsonMsg = JSON.toJSONString(paramMap); |
|
|
String jsonMsg = JSON.toJSONString(paramMap); |
|
|
|
|
|
|
|
|
@@ -210,22 +211,22 @@ public class WxPayController extends BaseController { |
|
|
// response = wxRefundOrderService.notify(paramMap, EnumPayWay.PAY_WAY_WEAPP); |
|
|
// response = wxRefundOrderService.notify(paramMap, EnumPayWay.PAY_WAY_WEAPP); |
|
|
mqBaseProducer.sendMessage(refundSuccessMsg, EnumMsgMqTopic.DEFAULT.getCode(), EnumMsgMqTag.DEFAULT.getCode(), EnumMsgMqKey.DEFAULT.getCode()); |
|
|
mqBaseProducer.sendMessage(refundSuccessMsg, EnumMsgMqTopic.DEFAULT.getCode(), EnumMsgMqTag.DEFAULT.getCode(), EnumMsgMqKey.DEFAULT.getCode()); |
|
|
|
|
|
|
|
|
logger.info("refund wxpay, notify success, req : " + xml + ", resp: " + response.toString()); |
|
|
|
|
|
|
|
|
logger.info("refund wxpay, notify success, req : " + json + ", resp: " + response.toString()); |
|
|
return response; |
|
|
return response; |
|
|
} catch (BizMessageException e) { |
|
|
} catch (BizMessageException e) { |
|
|
logger.error("refund wxpay, notify error, req: " + xml + ", e:" + e.getLocalizedMessage()); |
|
|
|
|
|
|
|
|
logger.error("refund wxpay, notify error, req: " + json + ", e:" + e.getLocalizedMessage()); |
|
|
SortedMap resultMap = new TreeMap(); |
|
|
SortedMap resultMap = new TreeMap(); |
|
|
resultMap.put("code", "FAIL"); |
|
|
resultMap.put("code", "FAIL"); |
|
|
resultMap.put("message", e.getMessage()); |
|
|
resultMap.put("message", e.getMessage()); |
|
|
return JSON.toJSONString(resultMap); |
|
|
return JSON.toJSONString(resultMap); |
|
|
} catch (MallinkException e) { |
|
|
} catch (MallinkException e) { |
|
|
logger.error("refund wxpay, notify error, req: " + xml + ", e:" +e.getLocalizedMessage()); |
|
|
|
|
|
|
|
|
logger.error("refund wxpay, notify error, req: " + json + ", e:" +e.getLocalizedMessage()); |
|
|
SortedMap resultMap = new TreeMap(); |
|
|
SortedMap resultMap = new TreeMap(); |
|
|
resultMap.put("code", "FAIL"); |
|
|
resultMap.put("code", "FAIL"); |
|
|
resultMap.put("message", e.getMessage()); |
|
|
resultMap.put("message", e.getMessage()); |
|
|
return JSON.toJSONString(resultMap); |
|
|
return JSON.toJSONString(resultMap); |
|
|
} catch (Exception e) { |
|
|
} catch (Exception e) { |
|
|
logger.error("refund wxpay, order create error, req: " + xml + ", e: " + e.getMessage()); |
|
|
|
|
|
|
|
|
logger.error("refund wxpay, order create error, req: " + json + ", e: " + e.getMessage()); |
|
|
SortedMap resultMap = new TreeMap(); |
|
|
SortedMap resultMap = new TreeMap(); |
|
|
resultMap.put("code", "FAIL"); |
|
|
resultMap.put("code", "FAIL"); |
|
|
resultMap.put("message", e.getMessage()); |
|
|
resultMap.put("message", e.getMessage()); |
|
|
|