Skip to content

Commit 3b5d219

Browse files
authored
Update Credit_Card_Validator.py
Add fix for Maestro Card
1 parent bdf7c75 commit 3b5d219

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Credit_Card_Validator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ def company(self):
1010
comp =None
1111
if str(self.card_no).startswith('4'):
1212
comp = 'Visa Card'
13+
elif str(self.card_no).startswith(('50', '67', '58','63',)):
14+
comp = 'Maestro Card'
1315
elif str(self.card_no).startswith('5'):
1416
comp = 'Master Card'
1517
elif str(self.card_no).startswith('37'):
@@ -18,8 +20,6 @@ def company(self):
1820
comp = 'Discover Card'
1921
elif str(self.card_no).startswith('35'):
2022
comp = 'JCB Card'
21-
elif str(self.card_no).startswith('50' or '67'or '58'or'63'):
22-
comp = 'Maestro Card'
2323
elif str(self.card_no).startswith('7'):
2424
comp = 'Gasoline Card'
2525

0 commit comments

Comments
 (0)