Small patch that adds support for Maestro, Visa Debit, Diner's Club, JCB and Laser cards to the credit card include file.

Comments

recidive’s picture

Version: 7.x-1.0-alpha5 » 7.x-1.x-dev
Status: Active » Needs work

I'm not sure if this is plausible to be in core, but I think it makes sense.

+ 'dc' => t('Diner\'s Club'),

In the line above you should use double quotes to avoid the need for escaping the single quote in "Diner's Club".

ikos’s picture

StatusFileSize
new372 bytes

Revised patch version taking into account #1.

This is a small change really and will avoid people having to hack a core commerce module just to add different card types.

recidive’s picture

Status: Needs work » Needs review

Actually you don't need to hack a core commerce module. You can form alter commerce_payment_credit_card_form form and add your options to $form['credit_card']['type']['#options'].

But since there's a way for the payment modules to tell which credit cards they accept, it sounds ok having those other cards on the list as a Developer Experience improvement.

rszrama’s picture

Status: Needs review » Fixed

Committed, thanks guys.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.