/**
- 微信供应商充值的异步回调通知
*/
@RequestMapping(value = “/notify/pay/supplier/wechat/rechargePayNotifyRes.htm”)
@ResponseBody
@ApiIgnore
public void supplierRechargeWXPayNotify(HttpServletRequest request,HttpServletResponse response) throws Exception {
log.info(“====== 开始接收微信支付回调(供应商充值)通知 ======”);
InputStream inputStream = request.getInputStream();
//BufferedReader是包装设计模式,性能更搞
BufferedReader in = new BufferedReader(new InputStreamReader(inputStream, “UTF-8”));
StringBuffer sb = new StringBuffer();
//1、将微信回调信息转为字符串
String line;
while ((line = in.readLine()) != null) {
sb.append(line);
}
in.close();
inputStream.close();
//2、将xml格式字符串格式转为map集合
Map<String, String> callbackMap = WXPayUtil.xmlToMap(sb