src/Adyen/Client.php
public function setEnvironment($environment, $liveEndpointUrlPrefix = null)
    {
        if ($environment == \Adyen\Environment::TEST) {
            $this->config->set('environment', \Adyen\Environment::TEST);
            $this->config->set('endpoint', self::ENDPOINT_TEST);
            $this->config->set('endpointDirectorylookup', self::ENDPOINT_TEST_DIRECTORY_LOOKUP);
            $this->config->set('endpointTerminalCloud', self::ENDPOINT_TERMINAL_CLOUD_TEST);
            $this->config->set('endpointCheckout', self::ENDPOINT_CHECKOUT_TEST);
            $this->config->set('endpointNotification', self::ENDPOINT_NOTIFICATION_TEST);
            $this->config->set('endpointAccount', self::ENDPOINT_ACCOUNT_TEST);
            $this->config->set('endpointFund', self::ENDPOINT_FUND_TEST);
        } elseif ($environment == \Adyen\Environment::LIVE) {
            $this->config->set('environment', \Adyen\Environment::LIVE);
            $this->config->set('endpointDirectorylookup', self::ENDPOINT_LIVE_DIRECTORY_LOOKUP);
            $this->config->set('endpointTerminalCloud', self::ENDPOINT_TERMINAL_CLOUD_LIVE);
            $this->config->set('endpointNotification', self::ENDPOINT_NOTIFICATION_LIVE);
            $this->config->set('endpointAccount', self::ENDPOINT_ACCOUNT_LIVE);
            $this->config->set('endpointFund', self::ENDPOINT_FUND_LIVE);

            if ($liveEndpointUrlPrefix) {
                $this->config->set('endpoint',
                    self::ENDPOINT_PROTOCOL . $liveEndpointUrlPrefix . self::ENDPOINT_LIVE_SUFFIX);
                $this->config->set('endpointCheckout',
                    self::ENDPOINT_PROTOCOL . $liveEndpointUrlPrefix . self::ENDPOINT_CHECKOUT_LIVE_SUFFIX);
            } else {
                $this->config->set('endpoint', self::ENDPOINT_LIVE);
                $this->config->set('endpointCheckout', null); // not supported please specify unique identifier
            }
        } else {
            // environment does not exist
            $msg = "This environment does not exist, use " . \Adyen\Environment::TEST . ' or ' . \Adyen\Environment::LIVE;
            throw new \Adyen\AdyenException($msg);
        }
    }
public function setEnvironment($environment, $liveEndpointUrlPrefix = null)
    {
        if ($environment == \Adyen\Environment::TEST) {
            $this->config->set('environment', \Adyen\Environment::TEST);
            $this->config->set('endpoint', self::ENDPOINT_TEST);
            $this->config->set('endpointDirectorylookup', self::ENDPOINT_TEST_DIRECTORY_LOOKUP);
            $this->config->set('endpointTerminalCloud', self::ENDPOINT_TERMINAL_CLOUD_TEST);
            $this->config->set('endpointCheckout', self::ENDPOINT_CHECKOUT_TEST);
            $this->config->set('endpointNotification', self::ENDPOINT_NOTIFICATION_TEST);
            $this->config->set('endpointAccount', self::ENDPOINT_ACCOUNT_TEST);
            $this->config->set('endpointFund', self::ENDPOINT_FUND_TEST);
        } elseif ($environment == \Adyen\Environment::LIVE) {
            $this->config->set('environment', \Adyen\Environment::LIVE);
            $this->config->set('endpointDirectorylookup', self::ENDPOINT_LIVE_DIRECTORY_LOOKUP);
            $this->config->set('endpointTerminalCloud', self::ENDPOINT_TERMINAL_CLOUD_LIVE);
            $this->config->set('endpointNotification', self::ENDPOINT_NOTIFICATION_LIVE);
            $this->config->set('endpointAccount', self::ENDPOINT_ACCOUNT_LIVE);
            $this->config->set('endpointFund', self::ENDPOINT_FUND_LIVE);

            if ($liveEndpointUrlPrefix) {
                $this->config->set('endpoint',
                    self::ENDPOINT_PROTOCOL . $liveEndpointUrlPrefix . self::ENDPOINT_LIVE_SUFFIX);
                $this->config->set('endpointCheckout',
                    self::ENDPOINT_PROTOCOL . $liveEndpointUrlPrefix . self::ENDPOINT_CHECKOUT_LIVE_SUFFIX);
            } else {
                $this->config->set('endpoint', self::ENDPOINT_LIVE);
                $this->config->set('endpointCheckout', null); // not supported please specify unique identifier
            }
        } else {
            // environment does not exist
            $msg = "This environment does not exist, use " . \Adyen\Environment::TEST . ' or ' . \Adyen\Environment::LIVE;
            throw new \Adyen\AdyenException($msg);
        }
    }
public function setEnvironment ( $ environment , $ liveEndpointUrlPrefix = null ) { if ( $ environment == \ Adyen \ Environment :: TEST ) { $ this -> config -> set ( 'environment' , \ Adyen \ Environment :: TEST ) ; $ this -> config -> set ( 'endpoint' , self :: ENDPOINT_TEST ) ; $ this -> config -> set ( 'endpointDirectorylookup' , self :: ENDPOINT_TEST_DIRECTORY_LOOKUP ) ; $ this -> config -> set ( 'endpointTerminalCloud' , self :: ENDPOINT_TERMINAL_CLOUD_TEST ) ; $ this -> config -> set ( 'endpointCheckout' , self :: ENDPOINT_CHECKOUT_TEST ) ; $ this -> config -> set ( 'endpointNotification' , self :: ENDPOINT_NOTIFICATION_TEST ) ; $ this -> config -> set ( 'endpointAccount' , self :: ENDPOINT_ACCOUNT_TEST ) ; $ this -> config -> set ( 'endpointFund' , self :: ENDPOINT_FUND_TEST ) ; } elseif ( $ environment == \ Adyen \ Environment :: LIVE ) { $ this -> config -> set ( 'environment' , \ Adyen \ Environment :: LIVE ) ; $ this -> config -> set ( 'endpointDirectorylookup' , self :: ENDPOINT_LIVE_DIRECTORY_LOOKUP ) ; $ this -> config -> set ( 'endpointTerminalCloud' , self :: ENDPOINT_TERMINAL_CLOUD_LIVE ) ; $ this -> config -> set ( 'endpointNotification' , self :: ENDPOINT_NOTIFICATION_LIVE ) ; $ this -> config -> set ( 'endpointAccount' , self :: ENDPOINT_ACCOUNT_LIVE ) ; $ this -> config -> set ( 'endpointFund' , self :: ENDPOINT_FUND_LIVE ) ; if ( $ liveEndpointUrlPrefix ) { $ this -> config -> set ( 'endpoint' , self :: ENDPOINT_PROTOCOL . $ liveEndpointUrlPrefix . self :: ENDPOINT_LIVE_SUFFIX ) ; $ this -> config -> set ( 'endpointCheckout' , self :: ENDPOINT_PROTOCOL . $ liveEndpointUrlPrefix . self :: ENDPOINT_CHECKOUT_LIVE_SUFFIX ) ; } else { $ this -> config -> set ( 'endpoint' , self :: ENDPOINT_LIVE ) ; $ this -> config -> set ( 'endpointCheckout' , null ) ; // not supported please specify unique identifier } } else { // environment does not exist $ msg = "This environment does not exist, use " . \ Adyen \ Environment :: TEST . ' or ' . \ Adyen \ Environment :: LIVE ; throw new \ Adyen \ AdyenException ( $ msg ) ; } }
Set environment to connect to test or live platform of Adyen
For live please specify the unique identifier.

@param string $environment
@param null $liveEndpointUrlPrefix Provide the unique live url prefix from the "API URLs and Response" menu in the Adyen Customer Area
@throws AdyenException
Set environment to connect to test or live platform of Adyen For live please specify the unique identifier .