feat(realname): 实名核验切换到数脉二要素新接口

服务商旧接口 sinocheck2 已下线,改走 eid.shumaidata.com/eid/check:

- 身份证入参 id_number 改为 idcard
- 响应改为先判业务 code、再读 result.res 的两级结构,
  code/res 兼容字符串与数字两种返回形式
- 按服务商错误码表分流:400/20010/20310 归入参错误,
  404/604 归服务未配置,其余归服务不可用
- 驳回原因优先取服务商 description
- 新接口不返回流水号,provider_order_no 对该渠道留空
- 同步更新默认 URL 与 docs/实名认证.md

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
yml2213
2026-10-02 11:53:20 +08:00
co-authored by Cursor
parent 590bf1cae3
commit 0b220829bb
6 changed files with 305 additions and 200 deletions
+1 -1
View File
@@ -127,7 +127,7 @@ func Load() Config {
},
Realname: RealnameConfig{
Provider: getEnv("REALNAME_PROVIDER", "mock"),
CloudMarketURL: getEnv("REALNAME_CLOUDMARKET_URL", "https://sinocheck2.market.alicloudapi.com/fortest/ttttt"),
CloudMarketURL: getEnv("REALNAME_CLOUDMARKET_URL", "https://eid.shumaidata.com/eid/check"),
CloudMarketAppCode: getEnv("REALNAME_CLOUDMARKET_APPCODE", ""),
},
Log: LogConfig{