Open dmitrii-fediuk opened 6 years ago
It would be nice to implement mage2pro/core#62 first (Improve Magento\Payment\Model\Checks\CanUseForCountry\CountryProvider::getCountry()
: it should give priority to the shipping country over the billing country for my modules).
Implemented in 0.7.4.
Currently, it does not work correctly if a shipping address is changed without the browser's page reload, because the following code is not executed in this case: https://github.com/mage2pro/alphacommercehub/blob/0.7.5/view/frontend/web/loader.js#L11-L12
As I understand, I can just pass the country restriction rules from the server side to the customer's browser, and adjust the payment options visibility dynamically in JavaScript.
Similar to #84 (Provide an ability to the Magento backend users (merchants) to set up the «Require the billing address?» option separately for each AlphaCommerceHub's payment option (bank cards, PayPal, POLi Payments, etc.))