NEED HELP FOR INPUT FORMATTING AND CARD TYPE VALIDATION

atanunu 31 May, 2019
I am working on a payment page, and want to collect Debit Card Information (Card Number, Valid Till and CVV). I want on the input of CARD NUMBER, the input should automatically format itself i.e., 481781929187 should become 4817 8192 9187 as the user types. And for the VALID TILL, I want the MASK to be MM/YY instead of the MM/YYYY that's available on Chronoforms.

Also, I want to display the card type on the right side of the input field box (Visa, Mastercard, Verve ...)

I will be very grateful to get solutions.
GreyHead 31 May, 2019
Hi atanunu,

I strongly recommend that you do not collect credit card data on your site as these days there is a high risk of data being attacked. Instead either redirect to user to your payment gateway, or embed a payment form from your gateway provider that submits the critical data directly to them.

Stripe used to have some library that you could use for this, including card recognition etc. I think there was a FAQ here on using it with a previous version of CF.

Bob
healyhatman 31 May, 2019
I second GreyHead, that's a terrible idea.
Also, you don't need to select the card type because it's encoded in the first 4 digits of the card.
healyhatman 31 May, 2019
If you absolutely insist on capturing people's card details, then at the absolute very least you'd better have SSL. And still, I wouldn't do it.
healyhatman 05 Jun, 2019
Also, in the field under Validation --> validation rules you can put
creditCard:Must be a valid credit card number
This topic is locked and no more replies can be posted.