vietguys/verify_otp.go

12 lines
248 B
Go
Raw Permalink Normal View History

2021-08-09 04:41:57 +00:00
package vietguys
import "strings"
// VerifyOTP verify otp code is right or not
func (s Service) VerifyOTP(phone, otpCode string) bool {
// Just remove char "+" if existed
strings.Replace(phone, "+", "", 1)
return s.checkOTP(phone, otpCode)
}