/// <summary> /// 一步签署接口 /// </summary> /// <param name="directSignRequest"></param> /// <returns></returns> public DirectSignResponse directSign(DirectSignRequest directSignRequest) { SignRequest signRequest = new SignRequest(directSignRequest); signRequest.apiUrl = ApiUrlConstant.Sign.DirectSign; DirectSignResponse response = this.Send <DirectSignResponse>(signRequest); return(response); }
/// <summary> /// 一步签署 /// </summary> public void directSign() { DirectSignRequest directSignRequest = new DirectSignRequest(); directSignRequest.contract_file_content = "Base64"; directSignRequest.id_number = "370011123456712121"; directSignRequest.user_name = "测试"; directSignRequest.user_type = "1"; DirectSignRequest.SignDetail signDetail = new DirectSignRequest.SignDetail(); signDetail.page_num = 1; signDetail.seal_width = 50; signDetail.seal_height = 50; signDetail.seal_file_content = "Base64";//Base64文件 signDetail.vertical = 40; signDetail.horizontal = 40; directSignRequest.addSignField(signDetail); try { DirectSignResponse response = client.SignOperate.directSign(directSignRequest); 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); } }