Merge pull request #556 from kohana/feature/tests-user-agent
[kohana-core.git] / config / credit_cards.php
blobb32424a23d53242a75419c90ded1dee6acad0fd7
1 <?php defined('SYSPATH') OR die('No direct script access.');
2 /**
3 * Credit card validation configuration.
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 return array(
12 'default' => array(
13 'length' => '13,14,15,16,17,18,19',
14 'prefix' => '',
15 'luhn' => TRUE,
18 'american express' => array(
19 'length' => '15',
20 'prefix' => '3[47]',
21 'luhn' => TRUE,
24 'diners club' => array(
25 'length' => '14,16',
26 'prefix' => '36|55|30[0-5]',
27 'luhn' => TRUE,
30 'discover' => array(
31 'length' => '16',
32 'prefix' => '6(?:5|011)',
33 'luhn' => TRUE,
36 'jcb' => array(
37 'length' => '15,16',
38 'prefix' => '3|1800|2131',
39 'luhn' => TRUE,
42 'maestro' => array(
43 'length' => '16,18',
44 'prefix' => '50(?:20|38)|6(?:304|759)',
45 'luhn' => TRUE,
48 'mastercard' => array(
49 'length' => '16',
50 'prefix' => '5[1-5]',
51 'luhn' => TRUE,
54 'visa' => array(
55 'length' => '13,16',
56 'prefix' => '4',
57 'luhn' => TRUE,