Payment Method with credit card field change required

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
12 years ago
Payment methods with a credit card field such as the PayPal Direct plugin should strip out any white space in the CC number entered. We are having lots of customers entering the space that appears on their card into the CC field on the checkout page.

We've fixed this on our site with details.CreditCard.CreditCardNumber.Replace("  ", string.Empty);

Hope this helps

Darren
12 years ago
Thanks, Darren. I'll create a work item
12 years ago
a.m. wrote:
Thanks, Darren. I'll create a work item


I can see you've fixed this. Thanks.

Instead of explictly defining characters to remove, couldn't we remove any non numeric characters. This would be a more wide ranging fix for unforseen circumstances.

string result = Regex.Replace(processPaymentRequest.CreditCardNumber, "[^0-9]", "");

Also, before this we could replace any o (alpha) with 0 (zero numeric). Quite a few people use o instead of 0 and wonder why there card is declined!
12 years ago
I don't think that it's required. let's keep it simple. Such people should better typo thier CC numbers =)))
Anyway they'll get a warning that entered CC number is not valid
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.