This commit is contained in:
Mrx
2026-03-21 15:19:24 +08:00
parent 15c6257762
commit 39db1e9c1d
7 changed files with 83 additions and 207 deletions

View File

@@ -40,11 +40,11 @@ func ProcessIVYZ2A8BRequest(ctx context.Context, params []byte, deps *processors
// 以表单方式调用数脉 API参数在 CallAPIForm 内转为 application/x-www-form-urlencoded
apiPath := "/v4/id_card/check" // 接口路径,根据数脉文档填写(如 v4/xxx
// 先尝试使用政务接口app_id2 和 app_secret2
respBytes, err := deps.ShumaiService.CallAPIForm(ctx, apiPath, reqFormData, true)
if err != nil {
// 使用实时接口app_id 和 app_secret重试
// 使用实时接口app_id 和 app_secret重试
respBytes, err = deps.ShumaiService.CallAPIForm(ctx, apiPath, reqFormData, false)
// 如果重试后仍然失败,或者原本就是查无记录错误,返回错误
if err != nil {