/** * Get card types available for Braintree * @return array */ private function getConfiguredCardTypes() { $types = $this->ccType->getCcTypeLabelMap(); $configCardTypes = array_fill_keys($this->gatewayConfig->getAvailableCardTypes(), ''); return array_intersect_key($types, $configCardTypes); }