Compare commits

...

3 Commits

Author SHA1 Message Date
21ecde024e Merge branch 'dev' 2025-04-03 16:03:55 +08:00
e59343e579 扩大了签名超市时间1 2025-04-03 16:03:45 +08:00
556ad55fc2 扩大了签名超市时间 2025-04-03 16:03:36 +08:00

View File

@ -34,14 +34,12 @@ func VerifySignature(paramsMap map[string]interface{}, receivedTimestamp, receiv
currentTime := time.Now().Unix() * 1000 currentTime := time.Now().Unix() * 1000
timestamp, err := strconv.ParseInt(receivedTimestamp, 10, 64) timestamp, err := strconv.ParseInt(receivedTimestamp, 10, 64)
fmt.Println(currentTime)
fmt.Println(timestamp)
if err != nil { if err != nil {
return errors.New("签名错误") return errors.New("签名错误")
} }
if currentTime-timestamp > 1500 { if currentTime-timestamp > 5000 {
return errors.New("签名超时") return errors.New("签名超时")
} }
} }