身份证姓名与身份证号校验


{
  "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