public function setToken($token = null)
    {
        if (isset($token)) {
            return $this->token = $token;
        }

        return $this->token = gplcart_string_encode(crypt(session_id(), $this->config->getKey()));
    }
public function setToken($token = null)
    {
        if (isset($token)) {
            return $this->token = $token;
        }

        return $this->token = gplcart_string_encode(crypt(session_id(), $this->config->getKey()));
    }
public function setToken ( $ token = null ) { if ( isset ( $ token ) ) { return $ this -> token = $ token ; } return $ this -> token = gplcart_string_encode ( crypt ( session_id ( ) , $ this -> config -> getKey ( ) ) ) ; }
Sets a token
@param string|null $token
@return string
Sets a token