private function setAppToken($app_token)
    {
        if (!preg_match(self::APP_TOKEN_VALIDATION_REGEX, $app_token)) {
            throw new MonetivoException('App token format is invalid');
        }
        $this->app_token = $app_token;

        // determine proper environment
        $this->setEnvironment($app_token);
    }