mage2pro / alphacommercehub

AlphaCommerceHub integration with Magento 2
https://upwork.com/fl/mage2pro
MIT License
0 stars 2 forks source link

Provide an ability to the Magento backend users (merchants) to set up country restrictions separately for each AlphaCommerceHub's payment option (bank cards, PayPal, POLi Payments, etc.) #85

Open dmitrii-fediuk opened 6 years ago

dmitrii-fediuk commented 6 years ago

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.))

dmitrii-fediuk commented 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).

dmitrii-fediuk commented 6 years ago

Implemented in 0.7.4.

dmitrii-fediuk commented 6 years ago

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

dmitrii-fediuk commented 6 years ago

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.