f
This commit is contained in:
@@ -2,8 +2,6 @@ package jrzq
|
||||
|
||||
import (
|
||||
"context"
|
||||
"crypto/md5"
|
||||
"encoding/hex"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
|
||||
@@ -23,18 +21,16 @@ func ProcessJRZQV3HMRequest(ctx context.Context, params []byte, deps *processors
|
||||
return nil, errors.Join(processors.ErrInvalidParam, err)
|
||||
}
|
||||
|
||||
idCardHash := md5.Sum([]byte(paramsDto.IDCard))
|
||||
mobileHash := md5.Sum([]byte(paramsDto.MobileNo))
|
||||
|
||||
body := map[string]string{
|
||||
"idCard": hex.EncodeToString(idCardHash[:]),
|
||||
"mobile": hex.EncodeToString(mobileHash[:]),
|
||||
"idCard": paramsDto.IDCard,
|
||||
"mobile": paramsDto.MobileNo,
|
||||
}
|
||||
|
||||
nuoerDoCheckAPIKey := "blackListV121_3_1"
|
||||
ApiPath := "/v1/doCheck"
|
||||
|
||||
resp, err := deps.NuoerService.CallAPI(ctx, nuoerDoCheckAPIKey, ApiPath, body)
|
||||
// 该产品仅支持 MD5 入参(encryptionType=2)
|
||||
resp, err := deps.NuoerService.CallAPI(ctx, nuoerDoCheckAPIKey, ApiPath, body, 2)
|
||||
if err != nil {
|
||||
if errors.Is(err, nuoer.ErrDatasource) {
|
||||
return nil, errors.Join(processors.ErrDatasource, err)
|
||||
|
||||
Reference in New Issue
Block a user