How to hide and show the payment method based on shipping address country to sort the payment method
This code has worked to hide and show the payment method based on the shipping address country. public function execute(MagentoFrameworkEventObserver $observer) { //shipping company field $shippingCompanyField = $this->cart->getQuote()->getShippingAddress()->getCountryId(); $paymentMethod = $observer->getEvent()->getMethodInstance()->getCode(); if ($shippingCompanyField == ‘IN’) { if ($paymentMethod == “multisafepay_giropay”)… Read More »How to hide and show the payment method based on shipping address country to sort the payment method