private static function getEndpoint($config)
    {
        if (isset($config['mode'])) {
            switch (strtoupper($config['mode'])) {
                case 'SANDBOX':
                    $baseEndpoint = Constants::STAGING_WSDL_ENDPOINT;
                    break;
                case 'LIVE':
                    $baseEndpoint = Constants::PROD_WSDL_ENDPOINT;
                    break;
                default:
                    throw new ConfigurationException('The mode config parameter must be set to either sandbox/live');
            }
        } else {
            // Defaulting to Sandbox
            $baseEndpoint = Constants::STAGING_WSDL_ENDPOINT;
        }

        $baseEndpoint = rtrim(trim($baseEndpoint), '/');

        return $baseEndpoint;
    }
private static function getEndpoint($config)
    {
        if (isset($config['mode'])) {
            switch (strtoupper($config['mode'])) {
                case 'SANDBOX':
                    $baseEndpoint = Constants::STAGING_WSDL_ENDPOINT;
                    break;
                case 'LIVE':
                    $baseEndpoint = Constants::PROD_WSDL_ENDPOINT;
                    break;
                default:
                    throw new ConfigurationException('The mode config parameter must be set to either sandbox/live');
            }
        } else {
            // Defaulting to Sandbox
            $baseEndpoint = Constants::STAGING_WSDL_ENDPOINT;
        }

        $baseEndpoint = rtrim(trim($baseEndpoint), '/');

        return $baseEndpoint;
    }
private static function getEndpoint ( $ config ) { if ( isset ( $ config [ 'mode' ] ) ) { switch ( strtoupper ( $ config [ 'mode' ] ) ) { case 'SANDBOX' : $ baseEndpoint = Constants :: STAGING_WSDL_ENDPOINT ; break ; case 'LIVE' : $ baseEndpoint = Constants :: PROD_WSDL_ENDPOINT ; break ; default : throw new ConfigurationException ( 'The mode config parameter must be set to either sandbox/live' ) ; } } else { // Defaulting to Sandbox $ baseEndpoint = Constants :: STAGING_WSDL_ENDPOINT ; } $ baseEndpoint = rtrim ( trim ( $ baseEndpoint ) , '/' ) ; return $ baseEndpoint ; }
Get base endpoint for SOAP WSDL service

@param array $config

@return string $baseEndpoint the WSDL endpoint
@throws \PayU\Exception\ConfigurationException
Get base endpoint for SOAP WSDL service