API: Factor/card_three_auth 銀行卡三要素標準版
概覽
Factor/card_three_auth
是submail的銀行卡三要素標準版認證API,驗證姓名、身份證號碼(限單個)、銀行卡號(限單個) 是否一致。
URL
<主> http://tpa.mysubmail.com/factor/card_three_auth
<備> https://tpa.mysubmail.com/factor/card_three_auth
http 請求方式
請求方式 | content-type 設置 |
---|---|
http post | multipart/form-data 、x-www-form-urlencoded 、application/json |
signature創(chuàng)建規(guī)則
1. 請將以下參數(shù)按照字段升序(A-Z)排列 appkey、timestamp、idNo、name、cardNumber
2. 創(chuàng)建簽名字符串 :以"key=value" + "&"(連接符)+ "key=value" 的方式連接所有參數(shù)
3. 創(chuàng)建簽名:拼接簽名字符串示例string = "appkey=xxxx&idNo=xxxx&name=xxxx×tamp=xxxxxxxxxx",然后使用sha256(string)創(chuàng)建簽名
注:中文需要使用urlencode處理后再參與創(chuàng)建簽名
請求參數(shù)
參數(shù) | 類型 | 是否必需 | 默認 | 描述 |
---|---|---|---|---|
appid | string | 必需 | 無 | 在 SUBMAIL 身份認證服務中創(chuàng)建并且認證通過的應用 ID |
timestamp | string | 必需 | 無 | UNIX 時間戳 |
signature | string | 必需 | 無 | 簽名,詳細規(guī)則看下方介紹 |
name | string | 必需 | 無 | 用戶姓名 |
idNo | string | 必需 | 無 | 身份證號碼,限單個 |
cardNumber | string | 必需 | 無 | 銀行卡號,限單個 |
返回參數(shù)格式
jsonString
代碼示例
詳情請查詢demo示例文檔
響應消息
API請求失敗
{
'status' : 'error' , // 狀態(tài)描述
'send_id' : 'ee05d1635db847a2bf3c8317434539d6', // API流水號
'code' : 1201 , // API返回的狀態(tài)碼 詳情查看 API錯誤代碼與描述 文檔
'msg' : 'Incorrect APP ID.' , // API返回的描述、
}
API請求成功
{
'status' : 'success' , // 狀態(tài)描述
'send_id' : 'ee05d1635db847a2bf3c8317434539d6', // API流水號
'result' : {
'identical' => true, //true 認證一致 false 認證不一致
'status' => '01', //01 認證一致 02 認證不一致
'bankName' => '招商銀行', //銀行名稱
'cardType' => '金卡', //銀行卡類型
'cardCategory' => '借記卡', //銀行卡類別
'remark' => '認證一致' //備注
};
}