You are viewing limited content. For full access, please sign in.

Question

Question

Credit Card validation

asked on July 12, 2016

I am sure I have seen a post similar. I am looking to create a javascript that will validate the correct amount of numbers have been entered for credit cards. I believe American Express has 15 number and Visa uses 16 numbers. I'm wondering if there is way if Visa is selected then it will make the submitter put at least 16 numbers.

0 0

Answer

SELECTED ANSWER
replied on July 12, 2016 Show version history

I would strongly caution you against using Forms to collect and store credit card data. Handling credit card data needs to be PCI compliant and Forms was not build to handle sensitive credit card data.

It would be better to look into integrating with a 3rd party payment gateway.

 

Added 9/25/2017: Forms' integration with Braintree and the upcoming one with Authorize.Net side-step this issue as the data is never stored in Forms, it goes directly to the payment gateway's servers. Both Braintree and Authorize.Net are PCI DSS compliant. The company hosting Forms and the integration should still complete a A-EP self-assessment questionnaire.

3 0
replied on July 13, 2016

So you wouldn't recommend taking down the credit card number on a secured server? I will contact my IT Department to see if the know anything about PCI Compliance.  

0 0
replied on July 13, 2016

I would not, no, because you would need to comply to the standard or risk being liable in case of a breach. It's not just that the server needs to be secure, there's a host of security measures and ongoing tests to ensure the data is safe.

1 0

Replies

replied on July 12, 2016 Show version history

One way of doing this would be to use Out of the box functionalities and not use Javascript. 

create a radio button visa and MasterCard etc. Have two fields with regular expression (\d\d..) one for each depending upon length.

hide one using field rules when other is selected.

this could give you a basic structure to work with. 

Also, this could be a good help during testing.

Hope it helps.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.