Magento2 an open-source e-commerce platform written in PHP.
In this extension we are going to see how can we disable payment method like Cash On Delivery(COD) based on custom product attribute value
In this extension, we have created a custom attribute named Purchase Type & set the condition that if purchase type value is purchase then disable the payment method named Cash On Delivery
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy -f
php bin/magento cache:flush
Blog - Magento2 Using product custom attribute value un-set payment method(e.g. Cash On Delivery)