Skip to content

Commit 601db22

Browse files
stefanheimannDarkaOnLine
authored andcommitted
Extend number length for american express (#30)
* Extend number length for american express American Express card can also be 17 digits long, please test with these card details: Card Number: 3455555555555504 CV2/CVV: 1234 * added 16 digits long amex card to tests
1 parent 655260a commit 601db22

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/Cards/AmericanExpress.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class AmericanExpress extends Card implements CreditCard
3939
*
4040
* @var array
4141
*/
42-
protected $number_length = [15];
42+
protected $number_length = [15, 16];
4343

4444
/**
4545
* CVC code length's.

tests/Unit/Cards/AmericanExpressTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ public function validNumbers(): Collection
115115
'344566883297843',
116116
'379811393604866',
117117
'378167408666270',
118+
'3455555555555504',
118119
]);
119120
}
120121

0 commit comments

Comments
 (0)