/// <summary> /// 企业四要素认证 /// </summary> public void entFour() { SJBEntFourRequest request = new SJBEntFourRequest(); request.entname = "某科技有限公司"; //企业名称 request.entmark = "92370785MA3NTXJD9J"; //企业标识(企业社会信用代码 request.name = "李牟"; //法人姓名 request.idcard = "370782199511234771"; //法人身份证号码 try { SJBEntFourResponse response = client.Auth.entFour(request); Console.WriteLine("企业四要素认证-认证查询-响应数据:" + JSONUtil.getJsonStringFromObject(response)); } catch (SignApplicationException sae) { // 捕获网关校验数据 Console.WriteLine("企业四要素认证-认证查询-网关异常状态码为:" + sae.return_code); Console.WriteLine("企业四要素认证-认证查询-网关异常信息为:" + sae.return_message); } catch (SignServerException sse) { // 捕获网关校验数据 Console.WriteLine("企业四要素认证-认证查询-业务异常状态码为:" + sse.result_code); Console.WriteLine("企业四要素认证-认证查询-业务异常信息为:" + sse.result_message); } }
/// <summary> /// 企业四要素认证 /// </summary> /// <param name="request"></param> /// <returns></returns> public SJBEntFourResponse entFour(SJBEntFourRequest request) { SignRequest signRequest = new SignRequest(request); signRequest.apiUrl = ApiUrlConstant.Auth.entFour; SJBEntFourResponse response = this.Send <SJBEntFourResponse>(signRequest); return(response); }