You are here

public function PaymentGatewayBase::getCreditCardTypes in Commerce Core 8.2

Gets the credit card types handled by the gateway.

Return value

\Drupal\commerce_payment\CreditCardType[] The credit card types.

Overrides PaymentGatewayInterface::getCreditCardTypes

File

modules/payment/src/Plugin/Commerce/PaymentGateway/PaymentGatewayBase.php, line 266

Class

PaymentGatewayBase
Provides the base class for payment gateways.

Namespace

Drupal\commerce_payment\Plugin\Commerce\PaymentGateway

Code

public function getCreditCardTypes() {

  // @todo Allow the list to be restricted by the merchant.
  return array_intersect_key(CreditCard::getTypes(), array_flip($this->pluginDefinition['credit_card_types']));
}