微信支付,我程序生成的xml,放入签名检查工具中就是成功,然后http发出去就是签名错误?
这个XML是我debug复制出来的,复制出来放入签名工具就是成功,然后debug走下去就是签名错误?? 什么鬼微信?? public String requestWithoutCert(String strUrl, Map<String, String> reqData, int timeoutMs) throws Exception {
//发送给微信的XML
String reqBody = this.makeRequestBody(reqData);
// 发送XML
HttpRequest request = HttpRequest.post(strUrl)
.connectTimeout(timeoutMs)
.readTimeout(timeoutMs)
.header("Content-Type","application/xml")
.send(reqBody);
if (request.code() != 200) {
throw new Exception("HTTP response code is not 200");
}
//响应结果
return request.body();
}