src/ShopBundle/objects/db/TShopPaymentHandler/TShopPaymentHandlerDataTrans_SwissPostFinance.class.php
public function AllowUse(TdbShopPaymentMethod &$oPaymentMethod)
    {
        $bAllowUse = parent::AllowUse($oPaymentMethod);
        if ($bAllowUse) {
            if (preg_match('/Chrome/i', $_SERVER['HTTP_USER_AGENT']) || preg_match('/Opera/i', $_SERVER['HTTP_USER_AGENT'])) {
                $bAllowUse = false;
            }
        }

        return $bAllowUse;
    }
public function AllowUse(TdbShopPaymentMethod &$oPaymentMethod)
    {
        $bAllowUse = parent::AllowUse($oPaymentMethod);
        if ($bAllowUse) {
            if (preg_match('/Chrome/i', $_SERVER['HTTP_USER_AGENT']) || preg_match('/Opera/i', $_SERVER['HTTP_USER_AGENT'])) {
                $bAllowUse = false;
            }
        }

        return $bAllowUse;
    }
public function AllowUse ( TdbShopPaymentMethod & $ oPaymentMethod ) { $ bAllowUse = parent :: AllowUse ( $ oPaymentMethod ) ; if ( $ bAllowUse ) { if ( preg_match ( '/Chrome/i' , $ _SERVER [ 'HTTP_USER_AGENT' ] ) || preg_match ( '/Opera/i' , $ _SERVER [ 'HTTP_USER_AGENT' ] ) ) { $ bAllowUse = false ; } } return $ bAllowUse ; }
return true if the the payment handler may be used by the payment method passed.
you can use this hook to disable payment methods based on basket contents, payment method, user data, ...

Don't show payment PostFinance if user browser is Chrome or Opera. because PostFinance wont work with them.

@param TdbShopPaymentMethod $oPaymentMethod

@return bool
return true if the the payment handler may be used by the payment method passed . you can use this hook to disable payment methods based on basket contents payment method user data ...