Integration/CityStateFromPostalCodeIntegration.php
private function countryNameToISO3166($countryName)
    {
        foreach (explode(',', self::COUNTRIES) as $countryCode) {
            $generatedCountryName = \Locale::getDisplayRegion('-'.$countryCode, 'EN');
            if (0 === strcasecmp($countryName, $generatedCountryName)) {
                return $countryCode;
                break;
            }
        }

        return '';
    }
private function countryNameToISO3166($countryName)
    {
        foreach (explode(',', self::COUNTRIES) as $countryCode) {
            $generatedCountryName = \Locale::getDisplayRegion('-'.$countryCode, 'EN');
            if (0 === strcasecmp($countryName, $generatedCountryName)) {
                return $countryCode;
                break;
            }
        }

        return '';
    }
private function countryNameToISO3166 ( $ countryName ) { foreach ( explode ( ',' , self :: COUNTRIES ) as $ countryCode ) { $ generatedCountryName = \ Locale :: getDisplayRegion ( '-' . $ countryCode , 'EN' ) ; if ( 0 === strcasecmp ( $ countryName , $ generatedCountryName ) ) { return $ countryCode ; break ; } } return '' ; }
@param $countryName

@return string
@param $countryName