public static function validateSignature($signature, $payload)
    {
        $parts = explode(',', $signature);
        $parameters = [];
        $t = 0;
        // Find the timestamp
        foreach ($parts as $part) {
            parse_str($part, $parsed);
            if (key($parsed) === 't') {
                $t = $parsed['t'];
                break;
            }
        }

        if ($t === 0) {
            return false;
        }

        $wanted = hash_hmac('sha256', $t . '.' . $payload, self::$secret);

        // Find v1 hashes
        foreach ($parts as $part) {
            parse_str($part, $parsed);
            if (key($parsed) === 'v1') {
                if ($wanted === $parsed['v1']) {
                    return true;
                }
            }
        }

        return false;
    }