Jump to content

Payment module exclusion by zone?


Mandala

Recommended Posts

Yes it can be done, but requires some changes.

Edit /modules/bankwire/bankwire.php and change

   public function hookPayment($params)
   {
       if (!$this->active)
           return ;


To

   public function hookPayment($params)
   {
       if (!$this->active)
           return ;
       $address = new Address(intval($params['cart']->id_address_invoice));
       $country = new Country(intval($address->id_country));
       if ($country->iso_code != 'UK')
           return;



This will check that the customer is from the UK, and if not, it will not show this payment method.
It can be used for any payment method.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...