Log in
Model

Cctype

Magento\Payment\Model\Source\Cctype

What it does

This class provides a source model for credit card types in Magento 2's payment system.

Developers use it to generate dropdown options of available credit card types (Visa, Mastercard, etc.) in admin configuration or checkout forms.

It can be filtered to show only specific card types allowed by a payment method.

Public Methods

  • getAllowedTypes()
  • setAllowedTypes()
  • toOptionArray()