FEATURE REQUEST: Eliminate Card Type drop down

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
8 years ago
The card type is determined by the first one or two digits of the card, so the Card Type drop down is not needed.
8 years ago
Hi Bruce,

Thanks a lot for suggestion. Please find the work item here
8 years ago
Thanks Andrei :) I voted. It will be a little more convenient for the user.
8 years ago
I Agree with it.
8 years ago
Could anybody please confirm the following rules cover all possible credit card types or possible prefix and width values:

'*CARD TYPES            *PREFIX           *WIDTH
'American Express         34, 37            15
'Diners Club              300 to 305, 36    14
'Carte Blanche            38                14
'Discover                 6011              16
'EnRoute                  2014, 2149        15
'JCB                      3                 16
'JCB                      2131, 1800        15
'Master Card              51 to 55          16
'Visa                     4                 13, 16
8 years ago
a.m. wrote:
Could anybody please confirm the following rules cover all possible credit card types or possible prefix and width values:

I don't think so.  This table is copied from this article which has some good info on the subject (which in turn credits wikipedia):
Card Type                  Card Number Prefix
American Express           34, 37
China UnionPay             62, 88
Diners ClubCarte Blanche   300-305
Diners Club International  300-305, 309, 36, 38-39
Diners Club US & Canada    54, 55
Discover Card              6011, 622126-622925, 644-649, 65
JCB                        3528-3589
Laser                      6304, 6706, 6771, 6709
Maestro                    5018, 5020, 5038, 5612, 5893, 6304,
                           6759, 6761, 6762, 6763, 0604, 6390
Dankort                    5019
MasterCard                 50-55
Visa                       4
Visa Electron              4026, 417500, 4405, 4508, 4844, 4913, 4917

This Stack Overflow post also has some good discussion in the comments, particularly with regard to card number length and validation based on the Luhn algorithm.  I'm not suggesting this is even a complete list of what's current and card issuers may release cards that don't conform to these standards in future so it's probably best not to be too restrictive with regards to validation.
8 years ago
Hi Pete,

Thanks a lot for the links. In this case it can cause issues for some payment plugins (such as PayPal Direct) that requires a credit card type property to be passed to a gateway. If we don't know about 100% ways to determine credit card type, then some customers simply won't be able to place an order (because nopCommerce won't be able to determine a credit card type by its number)
8 years ago
a.m. wrote:
Thanks a lot for the links. In this case it can cause issues for some payment plugins (such as PayPal Direct) that requires a credit card type property to be passed to a gateway. If we don't know about 100% ways to determine credit card type, then some customers simply won't be able to place an order (because nopCommerce won't be able to determine a credit card type by its number)

I think once you narrow the scope to a specific payment provider the problems go away. Detecting the card type from the number works in 99.9% of cases, you've just got to be careful about those weird edge cases. Most websites get away with it because they know in advance what card types their chosen payment processor supports (which is often defined by geographical region) so they don't need to worry about the others.  With a solution like nop you can't really make the same assumptions about what card types will need to be supported.

According to the Paypal website they only accept a limited range of card types: Visa / Delta / Electron, MasterCard / Eurocard, Maestro, American Express (though I'm not sure if this varies by region), so it would probably be quite easy to do number based detection.

On the other hand if you were looking to put in some common functionality that could be used by multiple payment methods then it might be more difficult. You could just handle the main ones and have an option to switch if off and allow manual selection.
8 years ago
Sorry I haven't investigated how this works currently.  But when someone starts typing the number does the dropdown change the selected the value based on what has been typed?  If so this could be a good workaround.
8 years ago
Thanks a lot! I'll investigate about possible issues with this approach. For example, I don't know whether credit card issuing companies are allowed introduce some new prefix numbers in the future.

In the meantime I've removed this field from Authorize.NET plugin that already doesn't use it. Please see changeset e21eb488e208
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.