Get a list of supported credit-card brands.

@return array
548400
public function getCardTypes()
    {
        $card = new CreditCard();
        $brands = $card->getSupportedBrands();

        foreach ($brands as $brand => $x) {
            $brands[$brand] = _t('CreditCard.'.strtoupper($brand), $brand);
        }

        return $brands;
    }
761305
public function GetDependsObjects()
    {
        return array(
            'PaymentType' => array(
                '_property_name' => 'PaymentDetails',
                PayInPaymentType::Card => '\MangoPay\PayInPaymentDetailsCard',
                PayInPaymentType::Preauthorized => '\MangoPay\PayInPaymentDetailsPreAuthorized',
                PayInPaymentType::BankWire => '\MangoPay\PayInPaymentDetailsBankWire',
                PayInPaymentType::DirectDebit => '\MangoPay\PayInPaymentDetailsDirectDebit',
                PayInPaymentType::DirectDebitDirect => '\MangoPay\PayInPaymentDetailsDirectDebitDirect',
                PayInPaymentType::PayPal => '\MangoPay\PayInPaymentDetailsPaypal',
                // ...and more in future...
            ),
            'ExecutionType' => array(
                '_property_name' => 'ExecutionDetails',
                PayInExecutionType::Web => '\MangoPay\PayInExecutionDetailsWeb',
                PayInExecutionType::Direct => '\MangoPay\PayInExecutionDetailsDirect',
                PayInExecutionType::ExternalInstruction => '\MangoPay\PayInExecutionDetailsExternalInstruction',                
                // ...and more in future...
            )
        );
    }
302845
protected function getIDListFromDB() : array
    {
        $arElementIDList = (array) Product::getByCategory($this->sValue)
            ->where('brand_id', '>', 0)
            ->lists('brand_id', 'id');

        $obCategory = Category::find($this->sValue);
        if (!empty($obCategory)) {
            $arAdditionalElementIDList = (array) $obCategory->product_link()
                ->where('brand_id', '>', 0)
                ->lists('brand_id', 'id');

            $arElementIDList = $arElementIDList + $arAdditionalElementIDList;
        }

        return $arElementIDList;
    }
423275
protected function getAppliedTaxList()
    {
        $obResultTaxList = TaxHelper::instance()->getTaxList();
        if ($obResultTaxList->isEmpty()) {
            return $obResultTaxList;
        }

        foreach ($obResultTaxList as $obTaxItem) {
            $bSkipTax = !$obTaxItem->is_global
                && !$obTaxItem->isAvailableForCategory($this->product->category)
                && !$obTaxItem->isAvailableForProduct($this->product)
                && !$obTaxItem->isAvailableForCountry(TaxHelper::instance()->getActiveCountry())
                && !$obTaxItem->isAvailableForState(TaxHelper::instance()->getActiveState());

            if ($bSkipTax) {
                $obResultTaxList->exclude($obTaxItem->id);
            }
        }

        return $obResultTaxList;
    }
694148
public function getDealerBrandIds()
    {
        if (null === $this->dealer_brand_ids_unserialized) {
            $this->dealer_brand_ids_unserialized = array();
        }
        if (!$this->dealer_brand_ids_unserialized && null !== $this->dealer_brand_ids) {
            $dealer_brand_ids_unserialized = substr($this->dealer_brand_ids, 2, -2);
            $this->dealer_brand_ids_unserialized = $dealer_brand_ids_unserialized ? explode(' | ', $dealer_brand_ids_unserialized) : array();
        }

        return $this->dealer_brand_ids_unserialized;
    }
667797
static public function validProducts () {
        return [
            self::PRODUCT_SERVICEPAKKE,
            self::PRODUCT_SERVICEPAKKE_RETURSERVICE,
            self::PRODUCT_BPAKKE_DOR_DOR,
            self::PRODUCT_BPAKKE_DOR_DOR_RETURSERVICE,
            self::PRODUCT_EKSPRESS09,
            self::PRODUCT_EKSPRESS09_RETURSERVICE,
            self::PRODUCT_PICKUP_PARCEL,
            self::PRODUCT_PICKUP_PARCEL_BULK,
            self::PRODUCT_HOME_DELIVERY_PARCEL,
            self::PRODUCT_BUSINESS_PARCEL,
            self::PRODUCT_BUSINESS_PARCEL_BULK,
            self::PRODUCT_EXPRESS_NORDIC_0900_BULK,
            self::PRODUCT_BUSINESS_PALLET,
            self::PRODUCT_BUSINESS_PARCEL_HALFPALLET,
            self::PRODUCT_BUSINESS_PARCEL_QUARTERPALLET,
            self::PRODUCT_EXPRESS_NORDIC_0900,
            self::PRODUCT_PA_DOREN,
            self::PRODUCT_PAKKE_I_POSTKASSEN,
            self::PRODUCT_PAKKE_I_POSTKASSEN_SPORBAR,
            self::PRODUCT_MAIL,
            self::PRODUCT_EXPRESS_NORDIC_SAME_DAY,
            self::PRODUCT_EXPRESS_INTERNATIONAL_0900,
            self::PRODUCT_EXPRESS_INTERNATIONAL_1200,
            self::PRODUCT_EXPRESS_INTERNATIONAL,
            self::PRODUCT_EXPRESS_ECONOMY,
            self::PRODUCT_CARGO_GROUPAGE,
            self::PRODUCT_COURIER_VIP,
            self::PRODUCT_COURIER_1H,
            self::PRODUCT_COURIER_2H,
            self::PRODUCT_COURIER_4H,
            self::PRODUCT_COURIER_6H,
            self::PRODUCT_OIL_EXPRESS

        ];
    }
738742
def brand(self, brand):
        
        allowed_values = ["visa", "mastercard", "americanExpress", "discover"]
        if brand is not None and brand not in allowed_values:
            raise ValueError(
                "Invalid value for `brand` ({0}), must be one of {1}"
                .format(brand, allowed_values)
            )

        self._brand = brand
999951
public function getPaymentList()
    {
        if ($this->_oPaymentList === null) {
            $this->_oPaymentList = false;

            $sActShipSet = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('sShipSet');
            if (!$sActShipSet) {
                $sActShipSet = \OxidEsales\Eshop\Core\Registry::getSession()->getVariable('sShipSet');
            }

            $oBasket = $this->getSession()->getBasket();

            // load sets, active set, and active set payment list
            list($aAllSets, $sActShipSet, $aPaymentList) =
                \OxidEsales\Eshop\Core\Registry::get(\OxidEsales\Eshop\Application\Model\DeliverySetList::class)->getDeliverySetData($sActShipSet, $this->getUser(), $oBasket);

            $oBasket->setShipping($sActShipSet);

            // calculating payment expences for preview for each payment
            $this->_setValues($aPaymentList, $oBasket);
            $this->_oPaymentList = $aPaymentList;
            $this->_aAllSets = $aAllSets;
        }

        return $this->_oPaymentList;
    }
1090930
public function getCartSkus() {
    $items = $this->items();
    if (empty($items)) {
      return [];
    }

    $skus = [];
    foreach ($items as $item) {
      $skus[] = $item['sku'];
    }

    return $skus;
  }
347697
protected function getByPriceTypeASC() : array
    {
        $obPriceType = $this->getPriceTypeObject();
        if (empty($obPriceType)) {
            return $this->getByPriceASC();
        }

        //Get product ID list (sort by offer price)
        //We can not use groupBy() in this place
        $arElementIDList = (array) DB::table('lovata_shopaholic_prices')
            ->select('lovata_shopaholic_offers.product_id')
            ->where('lovata_shopaholic_prices.price_type_id', $obPriceType->id)
            ->where('lovata_shopaholic_offers.active', true)
            ->where('lovata_shopaholic_prices.item_type', Offer::class)
            ->orderBy('lovata_shopaholic_prices.price', 'asc')
            ->join('lovata_shopaholic_offers', 'lovata_shopaholic_offers.id', '=', 'lovata_shopaholic_prices.item_id')
            ->lists('product_id');
        $arElementIDList = array_unique($arElementIDList);

        return $arElementIDList;
    }
722235
public function getNotMappedToRDFaPayments()
    {
        $oPayments = oxNew(\OxidEsales\Eshop\Application\Model\PaymentList::class);
        $oPayments->loadNonRDFaPaymentList();

        return $oPayments;
    }
18299
public static function getChoices()
    {
        return [
            self::PHYSICAL     => 'ekyna_product.type.'.self::PHYSICAL,
            self::VIRTUAL      => 'ekyna_product.type.'.self::VIRTUAL,
            self::DOWNLOADABLE => 'ekyna_product.type.'.self::DOWNLOADABLE,
        ];
    }
234475
public function getIdentityAttributes()
    {
        $allowedAttributes = array_flip($this->identityAttributesMap());
        $result = [];
        foreach ($this->getAttributes() as $name => $value) {
            if (isset($allowedAttributes[$name])) {
                $result[$allowedAttributes[$name]] = $value;
            }
        }

        return $result;
    }
341587
public function getFDeliveryCosts()
    {
        $oPrice = $this->getCosts('oxdelivery');

        if ($oPrice && ($this->getBasketUser() || \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('blCalculateDelCostIfNotLoggedIn'))) {
            return \OxidEsales\Eshop\Core\Registry::getLang()->formatCurrency($oPrice->getBruttoPrice(), $this->getBasketCurrency());
        }

        return false;
    }
1064281
protected function getListProduct()
    {
        $id = $this->getParam(0);

        if (!isset($id)) {
            return $this->product->getList(array('limit' => $this->getLimit()));
        }

        if (!is_numeric($id)) {
            $this->errorAndExit($this->text('Invalid argument'));
        }

        if ($this->getParam('user')) {
            return $this->product->getList(array('user_id' => $id, 'limit' => $this->getLimit()));
        }

        if ($this->getParam('category')) {
            return $this->product->getList(array('category_id' => $id, 'limit' => $this->getLimit()));
        }

        if ($this->getParam('brand')) {
            return $this->product->getList(array('brand_category_id' => $id, 'limit' => $this->getLimit()));
        }

        if ($this->getParam('class')) {
            return $this->product->getList(array('product_class_id' => $id, 'limit' => $this->getLimit()));
        }

        if ($this->getParam('store')) {
            return $this->product->getList(array('store_id' => $id, 'limit' => $this->getLimit()));
        }

        $result = $this->product->get($id);

        if (empty($result)) {
            $this->errorAndExit($this->text('Unexpected result'));
        }

        return array($result);
    }
884386
protected function getBrandIds(BrandCollectionTransfer $brandCollectionTransfer): array
    {
        $ids = [];
        foreach ($brandCollectionTransfer->getBrands() as $brandTransfer) {
            $ids[] = $brandTransfer->getIdBrand();
        }
        return $ids;
    }
66198
private function getSortedProducts()
    {
        $products   = [];
        $productIds = $this->getSortedProductIds();

        if ($productIds && count($productIds)) {
            $productCollection = $this->getProductCollection()->setPageSize(count($productIds));

            $idFilterParams = ['values' => $productIds, 'field' => 'entity_id'];
            $idFilter       = $this->queryFactory->create(QueryInterface::TYPE_TERMS, $idFilterParams);
            $productCollection->addQueryFilter($idFilter);

            $products = $productCollection->getItems();
        }

        $sortedProducts = [];

        foreach ($this->getSortedProductIds() as $productId) {
            if (isset($products[$productId])) {
                $sortedProducts[$productId] = $products[$productId];
            }
        }

        return $sortedProducts;
    }