Model
CountryProvider
Magento\Payment\Model\Checks\CanUseForCountry\CountryProvider
What it does
This class determines which country to use when validating payment method availability during checkout.
It retrieves the country from the billing address, falling back to the shipping address, or the store's default country if neither exists.
Developers use this when implementing custom payment method country restrictions or extending payment validation logic.
Public Methods
- getCountry()