Open bjarnef opened 3 years ago
@mattbrailsford furhermore it could be useful with international country calling code (maybe as property on country or available in a collection) as some payment gateways deal with these: https://docs.checkout.com/resources/codes/country-codes
I found this nice overview: https://countrycode.org/
Is your feature request related to a problem? Please describe. Currently we have access to two-letter ISO 3166 country codes, when fetching country via
CountryService
, e.g.This is useful in some payment providers like Stripe: https://github.com/vendrhub/vendr-payment-provider-stripe/blob/dev/src/Vendr.PaymentProviders.Stripe/StripeCheckoutPaymentProvider.cs#L76
However some payment provider or maybe if working with integration with other third party system, there are use-cases where a three-letter ISO 3166 country code should be used, e.g. in DIBS Easy for consumer country (DNK instead of DK).
https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes
Describe the solution you'd like It would be great if we have access to three-letter ISO 3166 country codes on
CountryReadOnly
. Maybe also a dictionary likeIso4217.CurrencyCodes
, e.g.Iso3166Country.CountryCodes
or Iso3166.CountryCodes` which could be useful to work with when not directly dealing with CountryService.For example just to verify a string is a valid ISO 3166 country code similar to this check we have in most payment providers:
Currently I can use this workaround though: