There have been several posts about this in the past. It requires custom changes to the plugin source code. (I think someone did contribute a modified version a long time ago, but I don't see it in the marketplace anymore)
CreditCardTypes = new List<SelectListItem> { new SelectListItem { Text = "Visa", Value = "visa" }, new SelectListItem { Text = "Master card", Value = "MasterCard" }, //new SelectListItem { Text = "Discover", Value = "Discover" }, //new SelectListItem { Text = "Amex", Value = "Amex" }, }
the above will only stop those options from showing in the dropdown menu, a customer could still enter an Amex or Disco cc# and I did not see any validation to prevent it.
You could validate against Amex / Disco with javascript in the view (still possible to bypass) or regex in the controller (another round trip to the server).
Typically a DIsco card begins with '6' and Amex with '3', but there is probably a more definitive regex out there to be found.
The code for the manual payment plugin is included. You would change the code in Visual Studio then build the plugin's solution to compile the changes. Then upload the new DLLs to your server and restart the application.
... no real validation to prevent them from being used.
It's always been that way in the plugin. There actually is validator code that does a CRC check, but nothing that matches the first digit to the card type.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.