src/Services/BusinessAccount.php
public function signUrl($url)
    {
        $url .= sprintf('&client=gme-%s', $this->clientId);

        if ($this->hasChannel()) {
            $url .= sprintf('&channel=%s', $this->channel);
        }

        $urlParts = parse_url($url);
        $data = sprintf('%s?%s', $urlParts['path'], $urlParts['query']);
        $key = base64_decode(str_replace(array('-', '_'), array('+', '/'), $this->secret));
        $signature = base64_encode(hash_hmac('sha1', $data, $key, true));

        $url .= sprintf('&signature=%s', str_replace(array('+', '/'), array('-', '_'), $signature));

        return $url;
    }
public function signUrl($url)
    {
        $url .= sprintf('&client=gme-%s', $this->clientId);

        if ($this->hasChannel()) {
            $url .= sprintf('&channel=%s', $this->channel);
        }

        $urlParts = parse_url($url);
        $data = sprintf('%s?%s', $urlParts['path'], $urlParts['query']);
        $key = base64_decode(str_replace(array('-', '_'), array('+', '/'), $this->secret));
        $signature = base64_encode(hash_hmac('sha1', $data, $key, true));

        $url .= sprintf('&signature=%s', str_replace(array('+', '/'), array('-', '_'), $signature));

        return $url;
    }
Sign an url for business purpose.

@param string $url The url.

@return string The signed url.