code: func CheckPayloadSignature(payload []byte, secret string, signature string) (string, error) {
  	signature = strings.TrimPrefix(signature, "sha1=")
  
  	mac := hmac.New(sha1.New, []byte(secret))
  	_, err := mac.Write(payload)
  	if err != nil {
  		return "", err
  	}
  	expectedMAC := hex.EncodeToString(mac.Sum(nil))
  
  	if !hmac.Equal([]byte(signature), []byte(expectedMAC)) {
  		return expectedMAC, &SignatureError{signature}
  	}
  	return expectedMAC, err
  }
docs: // CheckPayloadSignature calculates and verifies SHA1 signature of the given payload