支付成功后,回调参数为空
1、回调接口解析代码如下: private Map<String, String> getRequestParam(HttpServletRequest request) {
InputStream inputStream = null;
InputStreamReader inputStreamReader = null;
BufferedReader reader = null;
try {
inputStream = request.getInputStream();
inputStreamReader = new InputStreamReader(inputStream);
reader = new BufferedReader(inputStreamReader);
String line = null;
StringBuilder strXML = new StringBuilder();
while ((line = reader.readLine()) != null) {
strXML.append(line);
}
// 问题:这里的strXML.toString() 的结果是空串
Map<String, String> paramMap = WXPayUtil.xmlToMap(strXML.toString());
return paramMap;
} catch (Exception e) {
throw new PayException(-1, "wxPayCallBackFail", e);
} finally {
try {
if (reader != null) {
reader.close();
}
if (inputStreamReader != null) {
inputStreamReader.close();
}
if (inputStream != null) {
inputStream.close();
}
} catch (IOException e) {
logger.error("wxPayCallBackFail", e);
}
}
}
2、每天凌晨03:12 、04:26 、05:39 左右会发生上述情况至少三次; 期望能给与答复,谢谢。