PayPal\Api\OpenIdSession::getBaseUrl PHP Method

getBaseUrl() private static method

Gets the base URL for the Redirect URI
private static getBaseUrl ( $config ) : null | string
$config
return null | string
    private static function getBaseUrl($config)
    {
        if (array_key_exists('openid.RedirectUri', $config)) {
            return $config['openid.RedirectUri'];
        } else {
            if (array_key_exists('mode', $config)) {
                switch (strtoupper($config['mode'])) {
                    case 'SANDBOX':
                        return PayPalConstants::OPENID_REDIRECT_SANDBOX_URL;
                    case 'LIVE':
                        return PayPalConstants::OPENID_REDIRECT_LIVE_URL;
                }
            }
        }
        return null;
    }