public\u0020Map\u003CString,Object\u003Esend(BindCardRequestbindCardReguest){\n/对云闪付绑卡接口的相关参数进行加密并转为json\nString\u0020params\u0020=\u0020prepare(bindCardRequest);\nLog.info("请求云闪付快捷绑卡接口的请求参数params:"+params):\nString\u0020result\u0020=\u0020"";\ntry\u0020{\nHttpPost\u0020httpPost\u0020=\u0020new\u0020HttpPost(bindCardRequest.getRequestUrl());\nhttpPost.setHeader(\u0020name:\u0020"Content-type"value:\u0020"application/json; charset=UTF-8");\nhttpPost.setEntity(new\u0020StringEntity(params));\nhttoost.setConfig(RequestConfig,custom\u0020),setProxyiney\u0020HttoHostproxyHostInteger,voluedf/proxvPort))).buid());\nHttpClient\u0020httpclient\u0020=\u0020Httpclients.createDefault();\nHttpResponse\u0020response\u0020=\u0020httpclient.execute(httpPost);\nHttpEntity\u0020entity\u0020=\u0020responsegetEntity();\nresult\u0020=\u0020EntityUtis.toString(entity);\n}catch\u0020(ParseException\u0020e)\u0020{\nlog.error(ExceptionUtils.printStackTrace(e));\nthrow\u0020new\u0020AthenaRuntimeException(Msg.ATE.ATE_RPC_CALL_ERROR);\n}catch\u0020(IOException\u0020e)\u0020{\nlog.error(ExceptionUtis.printStackTrace(e));\nthrow\u0020new\u0020AthenaRuntimeException(Msg.ATE.ATE_RPC_CALL_ERROR);}\nif(null\u0020==\u0020result\u0020l\u0020result.length()\u0020==\u00200){\nLog.error("请求云闪付快捷绑卡接口返回结果为空!\u0020参数为"+params);\nthrow\u0020new\u0020AthenaRuntimeException(Msg.ATE.ATE_RPC_CALL_ERROR);}\nMap\u003CString,0bject\u003E\u0020map\u0020=\u0020getJsonMapFromResult(result);\nif(null!=map&&map.get("params")!=null){\nMap\u0020m\u0020=\u0020(Map)map.get("params");\nmap.put("sn",m.get("sn"))\u0020;}\nString\u0020businessId\u0020=\u0020idGenerator.generate();\nmap.put("businessId”,\u0020businessId);\nreturn\u0020map;}


原文地址: https://www.cveoy.top/t/topic/py2h 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录