API: Factor/card_auth 銀行卡四要素標(biāo)準(zhǔn)版
概覽
Factor/card_auth
是submail的銀行卡四要素標(biāo)準(zhǔn)版認(rèn)證API,驗證姓名、身份證號碼(限單個)、銀行卡號(限單個)、銀行預(yù)留手機(jī)號(僅支持國內(nèi)11位號碼)是否一致。
URL
<主> http://tpa.mysubmail.com/factor/card_auth
<備> https://tpa.mysubmail.com/factor/card_auth
http 請求方式
請求方式 | content-type 設(shè)置 |
---|---|
http post | multipart/form-data 、x-www-form-urlencoded 、application/json |
signature創(chuàng)建規(guī)則
1. 請將以下參數(shù)按照字段升序(A-Z)排列 appkey、timestamp、idNo、name、cardNumber、mobile
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ù) | 類型 | 是否必需 | 默認(rèn) | 描述 |
---|---|---|---|---|
appid | string | 必需 | 無 | 在 SUBMAIL 身份認(rèn)證服務(wù)中創(chuàng)建并且認(rèn)證通過的應(yīng)用 ID |
timestamp | string | 必需 | 無 | UNIX 時間戳 |
signature | string | 必需 | 無 | 簽名,詳細(xì)規(guī)則看下方介紹 |
name | string | 必需 | 無 | 用戶姓名 |
idNo | string | 必需 | 無 | 身份證號碼,限單個 |
cardNumber | string | 必需 | 無 | 銀行卡號,限單個 |
mobile | string | 必需 | 無 | 銀行預(yù)留手機(jī)號,僅支持國內(nèi)11位號碼 |
返回參數(shù)格式
jsonString
代碼示例
詳情請查詢demo示例文檔
響應(yīng)消息
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 認(rèn)證一致 false 認(rèn)證不一致
'status' => '01', //01 認(rèn)證一致 02 認(rèn)證不一致
'bankName' => '招商銀行', //銀行名稱
'cardType' => '金卡', //銀行卡類型
'cardCategory' => '借記卡', //銀行卡類別
'remark' => '認(rèn)證一致' //備注
};
}