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