諾諾網電子發票企業端同步發票通用版
請求示例
String SendUrl="https://nnfpbox.nuonuocs.cn/shop/buyer/allow/cxfKp/cxfServerKpOrderSync.action"; String order=" {\"identity\":\"2329CC5F90EDAA8208F1F3C72A0CE72A713A9D425CD50CDE\",\"order\":{\"buye rname\":\"浙江愛信諾\",\"taxnum\":\"124511234993295177\",\"phone\":\"0\",\"address\":\" 浙江省杭州市萬塘路 \",\"account\":\"\",\"telephone\":\"0\",\"orderno\":\"nuonuo12345\",\"invoicedate\":\"2018-10 -31 19:16:51\",\"clerk\":\"黃芝\",\"saleaccount\":\"宇宙行 442612010103507108\",\"salephone\":\"0774-7893911\",\"saleaddress\":\"富川瑤族自治縣新 永路 138 號 \",\"saletaxnum\":\"339901999999142\",\"kptype\":\"1\",\"message\":\"\",\"payee\":\"林莉蘇 \",\"checker\":\"林莉蘇 \",\"tsfs\":\"-1\",\"email\":\"502192347@qq.com\",\"qdbz\":\"0\",\"qdxmmc\":\"\",\"dkbz\":\" 0\",\"deptid\":\"\",\"clerkid\":\"\",\"invoiceLine\":\"p\",\"cpybz\":\"\",\"detail\":[{\"goodsname \":\"蘋果 \",\"num\":\"1\",\"price\":\"1\",\"hsbz\":\"1\",\"taxrate\":\"0.13\",\"spec\":\"\",\"unit\":\"噸 \",\"spbm\":\"10101150101\",\"zsbm\":\"\",\"fphxz\":\"0\",\"yhzcbs\":\"0\",\"zzstsgl\":\"\",\"lsl bs\":\"\",\"kce\":\"\"}]}}"; order=DESDZFP.encrypt(order); HttpClient httpclient=null; PostMethod post=null; try{ httpclient = new HttpClient(); post = new PostMethod(SendUrl); //設置編碼方式 post.getParams().setParameter(HttpMethodParams.HTTP_CONTENT_CHARSET,"UTF-8"); //添加參數 post.addParameter("order",order); //執行 httpclient.executeMethod(post); //接口返回信息 String info = new String(post.getResponseBody(),"UTF-8"); System.out.println(info); }catch (Exception e) { e.printStackTrace(); }finally { //關閉連接, 釋放資源 post.releaseConnection(); ((SimpleHttpConnectionManager)httpclient.getHttpConnectionManager()).shutdown(); }
響應示例
{"status": "0000","message": "同步成功","fpqqlsh": "20160913122204858003"}
異常示例
{"status": "9999","message": "企業信息沒有備案"}