Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion src/CreditCard.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,13 @@ class CreditCard
'luhn' => true,
),
// Credit cards
'verve' => array(
'type' => 'verve',
'pattern' => '/^(506[0-1]|6500[0-2])/',
'length' => array(16, 19),
'cvcLength' => array(3),
'luhn' => true,
),
'visa' => array(
'type' => 'visa',
'pattern' => '/^4/',
Expand Down Expand Up @@ -93,7 +100,8 @@ class CreditCard
'length' => array(16),
'cvcLength' => array(3),
'luhn' => true,
),
)

);

public static function validCreditCard($number, $type = null)
Expand Down
3 changes: 3 additions & 0 deletions tests/Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ class Test extends PHPUnit_Framework_TestCase
'3530111333300000',
'3566002020360505',
),
'verve' => array(
'5060 6666 6666 6666 666',
),
);

public function testCardsTypes()
Expand Down