Return the country specific card type config.

@return array
186325
public function getCountrySpecificCardTypeConfig() {
        $countriesCardTypes = unserialize($this->getValue(
            self::KEY_COUNTRY_CREDIT_CARD,
            $this->storeManager->getStore()
        ));

        return is_array($countriesCardTypes) ? $countriesCardTypes : [];
    }
224598
public function getCountryList()
    {
        if ($this->_oCountryList === null) {
            // passing country list
            $this->_oCountryList = oxNew(\OxidEsales\Eshop\Application\Model\CountryList::class);
            $this->_oCountryList->loadActiveCountries();
        }

        return $this->_oCountryList;
    }
1283787
public function currencies()
    {
        $currencies = $this->helper->loadJsonFiles($this->helper->dataDir('currencies/default'))->mapWithKeys(function ($country, $code) {
            return [upper($code) => $country];
        });

        $overload = $this->helper->loadJsonFiles($this->helper->dataDir('currencies/overload'))->mapWithKeys(function ($country, $code) {
            return [upper($code) => $country];
        });

        return $currencies->overwrite($overload);
    }
1221677
public function getCountryAvailableCardTypes($country) {
        $types = $this->getCountrySpecificCardTypeConfig();
        return (!empty($types[$country])) ? $types[$country] : [];
    }
710381
public function twitterCardType()
    {
        $context = $this->contextObject();

        $type = null;

        if ($context instanceof HasTwitterCardInterface) {
            $type = $context['twitter_card_type'];
        }

        if (!$type) {
            $type = HasTwitterCardInterface::DEFAULT_TWITTER_CARD_TYPE;
        }

        return $type;
    }
129889
public function toOptionArray() {
        return [
            [
                'value' => self::CARD_VISA,
                'label' => __('Visa')
            ],
            [
                'value' => self::CARD_MASTERCARD,
                'label' => __('Mastercard')
            ],
            [
                'value' => self::CARD_AMEX,
                'label' => __('American Express')
            ],
            [
                'value' => self::CARD_JCB,
                'label' => __('JCB')
            ],
            [
                'value' => self::CARD_DISCOVER,
                'label' => __('Discover')
            ],
        ];
    }
1112362
public function getCountries()
    {
        // Cache by locale
        $locale = i18n::get_locale();
        if (!empty(static::$cache_countries[$locale])) {
            return static::$cache_countries[$locale];
        }

        // Localise all countries
        $countries = $this->config()->get('countries');
        $localised = [];
        foreach ($countries as $code => $default) {
            $localised[$code] = $this->countryName($code);
        }

        // Always sort by localised name, not key
        $collator = new Collator(i18n::get_locale());
        $collator->asort($localised);
        static::$cache_countries[$locale] = $localised;
        return $localised;
    }
1171261
private function getAllowedShippingCountriesRaw()
    {
        $allowedCountries = array_fill_keys($this->mainShipHelper->getMageShippingCountries(), []);
        $carriers         = $this->mainShipHelper->getActiveCarriers();
        $countries        = [];

        /**
         * @var AbstractCarrier $carrier
         */
        foreach ($carriers as $carrier) {
            /* skip shopgate cause its a container carrier */
            if ($carrier->getCarrierCode() === Shipping\Carrier\Shopgate::CODE) {
                continue;
            }

            /* if any carrier is using the allowed_countries collection, merge this into the result */
            if ($carrier->getConfigData('sallowspecific') === '0') {
                $countries = array_merge_recursive($countries, $allowedCountries);
                continue;
            }

            /* fetching active shipping targets from rates direct from the database */
            if ($carrier->getCarrierCode() === Shipping\Carrier\TableRate::CODE) {
                $collection    = $this->tableRate->getTableRateCollection();
                $countryHolder = [];

                /** @var Tablerate $rate */
                foreach ($collection as $rate) {
                    $countryHolder[$rate->getData('dest_country_id')][$rate->getData('dest_region') ? : 'All'] = true;
                }
                $countries = array_merge_recursive($countryHolder, $countries);
                continue;
            }

            $specificCountries = $carrier->getConfigData('specificcountry');
            $countries         = array_merge_recursive(
                $countries,
                array_fill_keys(explode(",", $specificCountries), [])
            );
        }

        foreach ($countries as $countryCode => $item) {
            if (!isset($allowedCountries[$countryCode])) {
                unset($countries[$countryCode]);
            }
        }

        return $countries;
    }
627598
public function getCountries(): array
    {

        $loadCountries = $this->countryHelper->toOptionArray();
        $countries = [];
        $i = 0;
        foreach ($loadCountries as $country ) {
            $i++;
            if ($i == 1) { //remove first element that is a select
                continue;
            }
            $countries[$country["value"]] = $country["label"];
        }
        return $countries;
    }
1251080
public function getCountry()
    {
        if (! $this->country) {
            $this->country = $this->filterValidCountry($this->countries);
        }

        return $this->country;
    }
646711
public function getAllowedCountries()
    {
        // Get allowed_countries from extending object. (ie. Page, DataObject)
        $allowedCountries = $this->owner->config()->allowed_countries;
        if (is_array($allowedCountries) &&
            $allowedCountries) {
            return $allowedCountries;
        }

        // Get allowed countries global. If there are no specific rules on a Page/DataObject
        // fallback to what is configured on this extension
        $allowedCountries = Config::inst()->get(__CLASS__, 'allowed_countries');
        if (is_array($allowedCountries) &&
            $allowedCountries) {
            return $allowedCountries;
        }

        // Finally, fallback to a full list of countries
        return IntlLocales::singleton()->config()->get('countries');
    }
1125807
protected function getConfigTypes()
    {
        foreach ($this->entityTypeManager->getDefinitions() as $entity_type => $definition) {
            if ($definition->isSubclassOf('Drupal\Core\Config\Entity\ConfigEntityInterface')) {
                $this->definitions[$entity_type] = $definition;
            }
        }
        $entity_types = array_map(
            function ($definition) {
                return $definition->getLabel();
            }, $this->definitions
        );

        uasort($entity_types, 'strnatcasecmp');
        $config_types = [
                'system.simple' => $this->trans('commands.config.export.single.options.simple-configuration'),
            ] + $entity_types;

        return $config_types;
    }
327787
private function getCountryCode()
    {
        $posted = $this->appRequest->getPostValue();
        if (isset($posted['customer'][ABlock::TMPL_FLDGRP][ABlock::TMPL_FIELD_COUNTRY_CODE])) {
            $result = $posted['customer'][ABlock::TMPL_FLDGRP][ABlock::TMPL_FIELD_COUNTRY_CODE];
        } else {
            $result = $this->hlpRegistry->getCustomerCountry();
        }
        return $result;
    }
38431
protected function getListCountryState()
    {
        $conditions = $this->query_filter;
        $conditions['limit'] = $this->data_limit;
        $conditions['country'] = $this->data_country['code'];

        return (array) $this->state->getList($conditions);
    }
1101027
protected function getCardData()
    {
        $card = $this->getCard();
        $data = array();

        $card->validate();
        $data['object'] = 'card';
        $data['card_number'] = $card->getNumber();
        $data['card_expiration_date'] = sprintf('%02d',$card->getExpiryMonth()).(string)$card->getExpiryYear();
        if ( $card->getCvv() ) {
            $data['card_cvv'] = $card->getCvv();
        }
        $data['card_holder_name'] = $card->getName();

        return $data;
    }
561479
public function getCardReference()
    {
        if (isset($this->data['object']) && 'customer' === $this->data['object']) {
            if (isset($this->data['default_source']) && !empty($this->data['default_source'])) {
                return $this->data['default_source'];
            }

            if (isset($this->data['default_card']) && !empty($this->data['default_card'])) {
                return $this->data['default_card'];
            }
            
            if (!empty($this->data['id'])) {
                return $this->data['id'];
            }
        }
        if (isset($this->data['object']) && 'card' === $this->data['object']) {
            if (!empty($this->data['id'])) {
                return $this->data['id'];
            }
        }
        if (isset($this->data['object']) && 'charge' === $this->data['object']) {
            if (! empty($this->data['source'])) {
                if (! empty($this->data['source']['id'])) {
                    return $this->data['source']['id'];
                }
            }
        }

        return null;
    }
1225536
public function getTypes()
    {
        $types = $this->config()->get('types');

        if ($this->allowed_types) {
            // Prioritise local field over global settings
            $allowed_types = $this->allowed_types;
        }
        if ($allowed_types = $this->config()->get('allowed_types')) {
           foreach ($allowed_types as $type) {
                if (!array_key_exists($type, $types)) {
                    user_error("{$type} is not a valid link type");
                }
            }

            foreach (array_diff_key($types, array_flip($allowed_types)) as $key => $value) {
                unset($types[$key]);
            }
        }
        $this->extend('updateTypes', $types);
        return $types;
    }