//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.toString());
//{transaction_id=4200000406201910302624423717, nonce_str=2I7gxX84Xs7i7Wg1qFdBuSLKYiAaPzq4, bank_type=CFT,
// openid=oAmW11HX2ghkmdIVol2l6NEHhRHY, sign=8BA2949611A06D0F4C58992A2F357DAB, fee_type=CNY, mch_id=1557130741,
// cash_fee=1, out_trade_no=P2019103031189489360957272065, appid=wx551f77763ebda8a2, total_fee=1, trade_type=NATIVE,
// result_code=SUCCESS, time_end=20191030183017, is_subscribe=N, return_c