| | |
| | | try { |
| | | defaultHttpClient = new DefaultHttpClient(); |
| | | HttpPost httpPost = new HttpPost(url); |
| | | httpPost.setHeader("Content-Type", "application/json;charset=ut-8"); |
| | | httpPost.setHeader("Content-Type", "application/json;charset=utf-8"); |
| | | if (StringUtils.isNotBlank(param)) { |
| | | log.info("参数值:{}", param); |
| | | HttpEntity httpEntity = new StringEntity(param, "utf-8"); |
| | |
| | | public static String doRefund(String url, String data,String mchId,Boolean isTest) throws Exception{ |
| | | KeyStore keyStore = KeyStore.getInstance("PKCS12"); |
| | | //P12文件目录 证书路径,这里需要你自己修改,linux下还是windows下的根路径 |
| | | String filepath = ""; |
| | | if(isTest){ |
| | | filepath = "D:\\wx\\WXCertUtil\\cert\\"; |
| | | }else{ |
| | | filepath = "/mnt/data/refund/huacheng/"; |
| | | } |
| | | String filepath = "/mnt/data/refund/huacheng/"; |
| | | |
| | | System.out.println("filepath->"+filepath); |
| | | FileInputStream instream = new FileInputStream(filepath+"apiclient_cert.p12"); |
| | | try { |