| | |
| | | @Resource |
| | | private WxPayConfig wxPayConfig; |
| | | |
| | | @Resource |
| | | private CloseableHttpClient wxPayClient; |
| | | // @Resource |
| | | // private CloseableHttpClient wxPayClient; |
| | | |
| | | @Resource |
| | | private IOrderInfoService orderInfoService; |
| | |
| | | httpGet.setHeader("Accept", "application/json"); |
| | | |
| | | //完成签名并执行请求 |
| | | CloseableHttpResponse response = wxPayClient.execute(httpGet); |
| | | CloseableHttpResponse response = null;//wxPayClient.execute(httpGet); |
| | | |
| | | try { |
| | | String bodyAsString = EntityUtils.toString(response.getEntity());//响应体 |
| | |
| | | httpPost.setHeader("Accept", "application/json");//设置响应报文格式 |
| | | |
| | | //完成签名并执行请求,并完成验签 |
| | | CloseableHttpResponse response = wxPayClient.execute(httpPost); |
| | | CloseableHttpResponse response =null;// wxPayClient.execute(httpPost); |
| | | |
| | | try { |
| | | |
| | |
| | | httpGet.setHeader("Accept", "application/json"); |
| | | |
| | | //完成签名并执行请求 |
| | | CloseableHttpResponse response = wxPayClient.execute(httpGet); |
| | | CloseableHttpResponse response = null;//wxPayClient.execute(httpGet); |
| | | |
| | | try { |
| | | String bodyAsString = EntityUtils.toString(response.getEntity()); |
| | |
| | | httpPost.setHeader("Accept", "application/json"); |
| | | |
| | | //完成签名并执行请求 |
| | | CloseableHttpResponse response = wxPayClient.execute(httpPost); |
| | | CloseableHttpResponse response = null;//wxPayClient.execute(httpPost); |
| | | |
| | | try { |
| | | String bodyAsString = EntityUtils.toString(response.getEntity());//响应体 |
| | |
| | | httpPost.setHeader("Accept", "application/json"); |
| | | |
| | | //完成签名并执行请求 |
| | | CloseableHttpResponse response = wxPayClient.execute(httpPost); |
| | | CloseableHttpResponse response = null;//wxPayClient.execute(httpPost); |
| | | |
| | | try { |
| | | int statusCode = response.getStatusLine().getStatusCode();//响应状态码 |