Closed OleksiyOleksiyovych closed 8 years ago
Hi @OleksiyOleksiyovych Not all payment methods have a billing address to be asked from a customer - we control only shipping address to allow or disallow orders to be placed for a certain regions with a certain payment method, this is the most common scenario, especially when it comes to international shipping.
Pardon, but I cannot understand this logic. As I understand, this bug is similar with bug https://github.com/magento/magento2/issues/3272
Situation: I live in Ukraine and I have a friend in USA. I want to buy t-shirt in Ukraine's M2 store for my friend. I want to select payment method "Check / Money Order". I go to checkout, enter USA as a country for shipping. But "Check / Money Order" payment allows for Ukraine only. So I can not see "Check / Money Order" in payment methods list. In frontend checkout I can not change payment address for "Check / Money Order" to Ukraine, because I can change payment address only under payment method (but this payment method is not allowed). In backend checkout I can change billing address, but it will not affect to payments, because M2 check shipping address.
Please agree, it's a normal and real scenario. Can you clarify me why it does not work? I should to explain this logic for my clients. Thank you and hove a good day!
Payment method based on the shipping address or payment method? Any clarification on this?
It's only working with billing address when (Stores -> Configuration -> Sales -> Checkout -> Checkout Options) is selected to Payment Page. If Payment Method option is set then it's not working.
Magento ver. 2.4.1
Steps to reproduce
develop
or2.0
branch.Expected result
Actual result
Reason
The reason of this issue is method is
getCountry
in classCountryProvider
[app/code/Magento/Payment/Model/Checks/CanUseForCountry/CountryProvider.php] If quote is not virtual you are using shipping address for detect country. Why?