protected function getOAuthUrl($state)
    {
        $queries = [
            'appid' => $this->clientId,
            'redirect_uri' => $this->redirectUrl,
            'response_type' => 'code',
            'scope' => $this->formatScopes($this->scopes, $this->scopeSeparator),
            'agentid' => $this->agentId,
            'state' => $state,
        ];

        return sprintf('https://open.weixin.qq.com/connect/oauth2/authorize?%s#wechat_redirect', http_build_query($queries));
    }
protected function getOAuthUrl($state)
    {
        $queries = [
            'appid' => $this->clientId,
            'redirect_uri' => $this->redirectUrl,
            'response_type' => 'code',
            'scope' => $this->formatScopes($this->scopes, $this->scopeSeparator),
            'agentid' => $this->agentId,
            'state' => $state,
        ];

        return sprintf('https://open.weixin.qq.com/connect/oauth2/authorize?%s#wechat_redirect', http_build_query($queries));
    }
protected function getOAuthUrl ( $ state ) { $ queries = [ 'appid' => $ this -> clientId , 'redirect_uri' => $ this -> redirectUrl , 'response_type' => 'code' , 'scope' => $ this -> formatScopes ( $ this -> scopes , $ this -> scopeSeparator ) , 'agentid' => $ this -> agentId , 'state' => $ state , ] ; return sprintf ( 'https://open.weixin.qq.com/connect/oauth2/authorize?%s#wechat_redirect' , http_build_query ( $ queries ) ) ; }
OAuth url.

@param string $state

@return string
OAuth url .