kobe6258 7 сар өмнө
parent
commit
422cede388

+ 4 - 0
api/ht_account_api.go

@@ -79,6 +79,10 @@ func (f *HTAccountApi) EnCodeData(req CustomerRiskReq) (token string, err error)
 		return
 		return
 	}
 	}
 	token = base64.StdEncoding.EncodeToString(rsa)
 	token = base64.StdEncoding.EncodeToString(rsa)
+	logger.Info("加密后数据:%v", token)
+	private, _ := auth.ParsePrivateKey(f.htConfig.GetWebhookPrivateKey())
+	aa, _ := auth.DecryptWithRSA(private, token)
+	fmt.Println(string(aa))
 	return
 	return
 }
 }
 
 

+ 1 - 0
service/facade/ht_account_service.go

@@ -130,6 +130,7 @@ func compareRisk(cusPdRisk string, pdRisk string) (code int, err error) {
 func GetRiskTestToken(mobile string) (token string, err error) {
 func GetRiskTestToken(mobile string) (token string, err error) {
 	token, err = htApi.EnCodeData(api.CustomerRiskReq{
 	token, err = htApi.EnCodeData(api.CustomerRiskReq{
 		MobileTel: mobile,
 		MobileTel: mobile,
+		LoginType: "1",
 	})
 	})
 	if err != nil {
 	if err != nil {
 		err = exception.NewWithException(exception.GenerateRiskTestTokenFailed, err.Error())
 		err = exception.NewWithException(exception.GenerateRiskTestTokenFailed, err.Error())