public function getCardTypes(CreditCardPayment $handler) { $key = get_class($handler) . '_customCardTypes'; if ($this->config->isValueSet($key)) { if ($types = trim($this->config->get($key))) { $types = explode(',', $types); foreach ($types as $key => $type) { $types[$key] = trim($type); } return array_combine($types, $types); } } $key = get_class($handler) . '_cardTypes'; if ($this->config->isValueSet($key)) { $types = array_keys($this->config->get($key)); return array_combine($types, $types); } }