| | |
| | | obj.set("is_hyaline", false); |
| | | try { |
| | | HttpResponse execute = HttpRequest.post(url).body(obj.toString(), "application/json").execute(); |
| | | log.error("微信返回值:{}", execute.body()); |
| | | InputStream inputStream = execute.bodyStream(); |
| | | File file = new File(imgPath); |
| | | FileUtil.writeFromStream(inputStream, file); |
| | |
| | | @Test |
| | | public void aliPay(){ |
| | | |
| | | String appId = "wxfb1acf504eb9d058"; |
| | | String appSecret = "7ee226a964b1be7cfb96f5e0dc739c44"; |
| | | String appId = "wx16d0b75302b360d4"; |
| | | String appSecret = "a2887cd622ed981d2e04d724d29d7454"; |
| | | String url = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=" + appId + "&secret=" + appSecret; |
| | | String jsonStr = restTemplate.getForObject(url, String.class); |
| | | |