Initial Kohana install
[speedfreak] / Server / system / config / credit_cards.php
1 <?php defined('SYSPATH') OR die('No direct access allowed.');
2 /**
3  * Credit card validation configuration.
4  * 
5  * Options for each credit card:
6  *  length - All the allowed card number lengths, in a comma separated string
7  *  prefix - The digits the card needs to start with, in regex format
8  *  luhn   - Enable or disable card number validation by the Luhn algorithm
9  */
10 $config = array
11 (
12         'default' => array
13         (
14                 'length' => '13,14,15,16,17,18,19',
15                 'prefix' => '',
16                 'luhn'   => TRUE
17         ),
18         'american express' => array
19         (
20                 'length' => '15',
21                 'prefix' => '3[47]',
22                 'luhn'   => TRUE
23         ),
24         'diners club' => array
25         (
26                 'length' => '14,16',
27                 'prefix' => '36|55|30[0-5]',
28                 'luhn'   => TRUE
29         ),
30         'discover' => array
31         (
32                 'length' => '16',
33                 'prefix' => '6(?:5|011)',
34                 'luhn'   => TRUE,
35         ),
36         'jcb' => array
37         (
38                 'length' => '15,16',
39                 'prefix' => '3|1800|2131',
40                 'luhn'   => TRUE
41         ),
42         'maestro' => array
43         (
44                 'length' => '16,18',
45                 'prefix' => '50(?:20|38)|6(?:304|759)',
46                 'luhn'   => TRUE
47         ),
48         'mastercard' => array
49         (
50                 'length' => '16',
51                 'prefix' => '5[1-5]',
52                 'luhn'   => TRUE
53         ),
54         'visa' => array
55         (
56                 'length' => '13,16',
57                 'prefix' => '4',
58                 'luhn'   => TRUE
59         ),
60 );