2024年3月26日发(作者:)
public String orderQueryRequest(String transactionID, String outTradeNo
)
{
// 构造HTTP请求
HttpClient httpclient = new HttpClient();
PostMethod postMethod = new PostMethod(_QUERY_API);
PayQueryReqData wxdata = new PayQueryReqData(transactionID,outTradeNo);
String requestStr="";
requestStr=tObj2Xml(wxdata);
// 发送请求
String strResponse = null;
try {
RequestEntity entity = new StringRequestEntity(
ng(), "text/xml", "UTF-8");
uestEntity(entity);
eMethod(postMethod);
strResponse = new String(ponseBody(), "utf-8");
} catch (HttpException e) {
ger(getClass()).error("orderQueryRequest", e);
} catch (IOException e) {
ger(getClass()).error("orderQueryRequest", e);
} finally {
eConnection();
}
return strResponse;
}
}


发布评论