コード例 #1
0
ファイル: CertClient.cs プロジェクト: aiosign/sign-sdk-net
        /// <summary>
        /// 证书续期
        /// </summary>
        /// <param name="certRenewalRequest"></param>
        /// <returns></returns>
        public CertRenewalResponse certRenewal(CertRenewalRequest certRenewalRequest)
        {
            SignRequest signRequest = new SignRequest(certRenewalRequest);

            signRequest.apiUrl = ApiUrlConstant.Cert.Renewal;
            CertRenewalResponse response = base.Send <CertRenewalResponse>(signRequest);

            return(response);
        }
コード例 #2
0
 /// <summary>
 /// 证书续期
 /// </summary>
 public void certRenewal()
 {
     try
     {
         CertRenewalResponse response = client.Cert.certRenewal(new CertRenewalRequest("00765245060136194048"));
         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);
     }
 }