root/trunk/system/config/credit_cards.php

Revision 3326, 1.1 kB (checked in by Shadowhand, 2 months ago)

Core cleanup:

  • Removed SYSPATH check from all files
  • Changed copyrights to 2007-2008 where they had not been updated
  • Started to add @example doc comments
  • Property svn:eol-style set to LF
  • Property copyright set to Copyright (c) 2007-2008 Kohana Team
  • Property svn:keywords set to Id
Line 
1<?php
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);
Note: See TracBrowser for help on using the browser.