public String sendTicter(String openId,String succOrderId){
String access_token = "48_YEgUmcn0VMFERY76oIoTpO_nPz4WiVPV71YRvDX-TJRHT0yOzOHosrdFnhWPJZj081wklyRxiEMoTESNSUUHNewsdhMtGYhBNbKbY9PvNSQ4jBR3HEGPArgWiReWufW0XvGq4RevyPIytWCDWXChAHAIJO";
String url = "https://api.weixin.qq.com/card/invoice/makeoutinvoice?access_token="+access_token;
HttpHeaders httpHeaders = new HttpHeaders();
HashMap<String, Object> invoicedetail_list = new HashMap<>();
invoicedetail_list.put("fphxz","0");
invoicedetail_list.put("spbm","1090418010000000000");
invoicedetail_list.put("xmmc","洗衣机");
invoicedetail_list.put("xmsl","1");
invoicedetail_list.put("xmdj","135.9");
invoicedetail_list.put("xmje","135.9");
invoicedetail_list.put("sl","0.17");
invoicedetail_list.put("se","23.1");
ArrayList<Object> list = new ArrayList<>();
list.add(invoicedetail_list);
HashMap<String, Object> invoiceinfo = new HashMap<>();
invoiceinfo.put("wxopenid",openId);
invoiceinfo.put("ddh",succOrderId);
invoiceinfo.put("fpqqlsh","testdfsaf454543");
invoiceinfo.put("nsrsbh","1101095003216541");
invoiceinfo.put("nsrmc","百旺电子测试2");
invoiceinfo.put("nsrdz","深圳市");
invoiceinfo.put("nsrdh","0755228899988");
invoiceinfo.put("nsrbank","中国银行广州支行");
invoiceinfo.put("nsrbankid","12345678");
invoiceinfo.put("ghfmc","天使蕴含有限公司");
invoiceinfo.put("kpr","小明");
invoiceinfo.put("jshj","159");
invoiceinfo.put("hjje","135.9");
invoiceinfo.put("hjse","23.1");
invoiceinfo.put("bz","备注");
invoiceinfo.put("hylx","0");
invoiceinfo.put("invoicedetail_list",list);
HashMap<String, Object> hashMap = new HashMap<>();
hashMap.put("invoiceinfo",invoiceinfo);
HttpEntity<String> request = new HttpEntity<String>(JSON.toJSONString(hashMap), httpHeaders);
Map map = restTemplate.postForObject(url, request, Map.class);
return map.toString();
}
{errcode=1, errmsg= hint: [haHkHA08021512]}