I've made my admin configuration for cash on delivery payment as applicable only to specific country i.e, USA

Below my cases in checkout page,

Billing Country => USA, Shipping Country => USA | COD Available
Billing Country => USA, Shipping Country => OTHER | COD Available
Billing Country => OTHER, Shipping Country => USA | COD Not Available
Billing Country => OTHER, Shipping Country => OTHER | COD Not Available

So this clearly shows that COD configuration of applicable country is pointing only to billing address.

Any way to make this condition to check shipping country instead of billing country ?

2 Answers 2


You would have to make a extension that observes payment_method_is_active event and decide if your method is active or not

  • I did it and it worked partially. Anyhow thanks for the hint. Commented Feb 9, 2016 at 16:11

I've figured it out,

Event in config.xml,


My Observer.php

public function disableCOD($observer){
        if($quote && $quote->getId()):
            $country_id = $ShippingAddress->getCountryId();
                if($country_id == 'US'){                
                    $result->isAvailable = true;
                } else {
                    $result->isAvailable = false;

Above code makes cash on delivery payment visible only if shipping country is set to United States.

Note: This will set cash on delivery payment available even it's disabled from magento admin.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.