身份證姓名與身份證號校驗


{
  "IdentityAuthConfig": {
    "url": "http://api.chinadatapay.com/communication/personal/1882",
    "key": ""
  }  
}
          
          

           var ApiResponse = new IdentityAuthReply();


          var Content = new FormUrlEncodedContent(new[] { new KeyValuePair<string,string>("key",identityauthconfig.Key), new KeyValuePair<string,string>("name",body.idCardName), new KeyValuePair<string,string>("idcard",body.idCardCode) }); var response = await HttpService.PostAsync<dynamic, IdentityAuthResponse>(identityauthconfig.Url, null, Content); if (response != null) { if (response.Data != null) { ApiResponse.Result = response.Data.Result; } }
   public class IdentityAuthReply
    {
        /// <summary>
        /// 1:一致 2:不一致(身份證號存在,姓名不符) 3:異常情況(身份證號不存在)
        /// </summary>
        public string Result { get; set; }
    }

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM