src/ShopBundle/objects/db/TShopPaymentMethod.class.php
public function IsValidForCurrentUser()
    {
        $bIsValidForUser = false;
        $bIsValidShippingCountry = false;
        $bIsValidBillingCountry = false;

        $oUser = TdbDataExtranetUser::GetInstance();
        $bIsValidGroup = $this->checkUserGroup($oUser);
        if ($bIsValidGroup) {
            $bIsValidForUser = $this->checkUser($oUser);
        }
        if ($bIsValidForUser && $bIsValidGroup) {
            $bIsValidShippingCountry = $this->checkUserShippingCountry($oUser);
        }
        if ($bIsValidForUser && $bIsValidGroup && $bIsValidShippingCountry) {
            $bIsValidBillingCountry = $this->checkUserBillingCountry($oUser);
        }

        return $bIsValidForUser && $bIsValidGroup && $bIsValidShippingCountry && $bIsValidBillingCountry;
    }
public function IsValidForCurrentUser()
    {
        $bIsValidForUser = false;
        $bIsValidShippingCountry = false;
        $bIsValidBillingCountry = false;

        $oUser = TdbDataExtranetUser::GetInstance();
        $bIsValidGroup = $this->checkUserGroup($oUser);
        if ($bIsValidGroup) {
            $bIsValidForUser = $this->checkUser($oUser);
        }
        if ($bIsValidForUser && $bIsValidGroup) {
            $bIsValidShippingCountry = $this->checkUserShippingCountry($oUser);
        }
        if ($bIsValidForUser && $bIsValidGroup && $bIsValidShippingCountry) {
            $bIsValidBillingCountry = $this->checkUserBillingCountry($oUser);
        }

        return $bIsValidForUser && $bIsValidGroup && $bIsValidShippingCountry && $bIsValidBillingCountry;
    }
public function IsValidForCurrentUser ( ) { $ bIsValidForUser = false ; $ bIsValidShippingCountry = false ; $ bIsValidBillingCountry = false ; $ oUser = TdbDataExtranetUser :: GetInstance ( ) ; $ bIsValidGroup = $ this -> checkUserGroup ( $ oUser ) ; if ( $ bIsValidGroup ) { $ bIsValidForUser = $ this -> checkUser ( $ oUser ) ; } if ( $ bIsValidForUser && $ bIsValidGroup ) { $ bIsValidShippingCountry = $ this -> checkUserShippingCountry ( $ oUser ) ; } if ( $ bIsValidForUser && $ bIsValidGroup && $ bIsValidShippingCountry ) { $ bIsValidBillingCountry = $ this -> checkUserBillingCountry ( $ oUser ) ; } return $ bIsValidForUser && $ bIsValidGroup && $ bIsValidShippingCountry && $ bIsValidBillingCountry ; }
return true if the payment method is allowed for the current user.

@return bool
return true if the payment method is allowed for the current user .