English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

My husband is trying to write a code for validating a credit card expiration date. Any clues? Thanks in advance!!!

2006-09-04 16:07:46 · 2 answers · asked by Gigi H 1 in Computers & Internet Programming & Design

2 answers

Why? This is part of credit card security .. nobody is going to help you figure this out even if they know how!

2006-09-04 16:26:39 · answer #1 · answered by MeInUSA 5 · 0 0

Hey Gigi H -

I'm not going to give you the exact details (too long and complicated) but here's the step-by-step instructions on how your hubby can figure it out himself.

First, he needs to know a little JavaScript.
Second, he needs to know the credit card rules.

Assuming he knows JavaScript, he can "borrow" the validation code from someone else's site. This will basicaly give him step two above.

Keep in mind that you can use your browser to inspect any code that runs "client side", thus if you visit some site and their script runs on your browser, you can inspect it.

Using this principle, you can visit some site that performs credit card validation - client side - and examine the rules they use to validate submissions to their site.

Basically, what you do is start to make a purchase, but cancel before finalizing the purchase. When you get to the page where you enter your credit card number, use your browser to check for JavaScript on the page.

Bear in mind that some sites use server-side validation, in which case you will not be able to see what rules they use for validation. If this is the case, keep trying until you find a site that performs client-side validation.

If you are using MS Internet Explorer, you can view a site's JavaScript by clicking "View|Source".

2006-09-04 23:29:29 · answer #2 · answered by Tom D 4 · 0 0

fedest.com, questions and answers