Make card types plugable

Created on 29 July 2016, about 9 years ago
Updated 30 July 2025, 2 days ago

Commerce Payment provides a CreditCard class, which defines a number of known card types with basic property validation criteria. In working on the Braintree integration module, it appears they return a broader universe of possible card types, including the following which are not currently defined in Payment:

solo
switch
laser
carte blanche
unknown

To my knowledge, the first two are commonly encountered in the field (they're debit cards, but still "plastic.") The Carte Blanche brand was bought by Diners Club and appears to run on their network, now, however it's unknown if gateways still return the card type as a distinct entry when run as a "Diners Club Carte Blanche" card.

Also not sure what the maintainers' approach is regarding unknown card types. At current, a payment method must specify a valid name from the CreditCard class to work, so it's likely we'll need to expand the universe and possibly handle edge cases.

✨ Feature request
Status

Active

Version

2.0

Component

Payment

Created by

πŸ‡ΊπŸ‡ΈUnited States bradjones1 Digital Nomad Life

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024