Compare commits

..

No commits in common. "21ecde024ea6840b38e179a8b7ee2218c3331824" and "43a81dd6eaa0c85f7818167c7e4edcf381ed16e2" have entirely different histories.

View File

@ -34,12 +34,14 @@ 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 > 5000 { if currentTime-timestamp > 1500 {
return errors.New("签名超时") return errors.New("签名超时")
} }
} }