validating credit card numbers - Mon Aug 17, 2009

This code is pretty old now but still useful for basic checks against incoming credit card data. In most situations these days, this logic will be handled via supplied libraries from the processor themselves but it still is often useful to trim out the garbage data before you get to that point.

Source code for this simple credit card validation class can be found here.

topics: PHP, programming

blog

CODEgrunt consulting

Experienced PHP web developer.

$35 an hour, no job too small.

There is no replacement for integrity and experience.

Contact me for more information.

calendar

March 2010

Sun
Mon
Tue
Wed
Thu
Fri
Sat
28
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
1
2
3