PayPal\Handler\PPOpenIdHandler::_getEndpoint PHP Method

_getEndpoint() private method

private _getEndpoint ( $config )
    private function _getEndpoint($config)
    {
        if (isset($config['openid.EndPoint'])) {
            return $config['openid.EndPoint'];
        } else {
            if (isset($config['service.EndPoint'])) {
                return $config['service.EndPoint'];
            } else {
                if (isset($config['mode'])) {
                    switch (strtoupper($config['mode'])) {
                        case 'SANDBOX':
                            return PPConstants::REST_SANDBOX_ENDPOINT;
                        case 'LIVE':
                            return PPConstants::REST_LIVE_ENDPOINT;
                        case 'TLS':
                            return PPConstants::REST_TLS_ENDPOINT;
                        default:
                            throw new PPConfigurationException('The mode config parameter must be set to either sandbox/live/tls');
                    }
                } else {
                    throw new PPConfigurationException('You must set one of service.endpoint or mode parameters in your configuration');
                }
            }
        }
    }
PPOpenIdHandler