MCPcopy Create free account
hub / github.com/geekcomputers/Python / company

Method company

Credit_Card_Validator.py:9–35  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

7
8 @property
9 def company(self):
10 comp = None
11 if str(self.card_no).startswith("4"):
12 comp = "Visa Card"
13 elif str(self.card_no).startswith(
14 (
15 "50",
16 "67",
17 "58",
18 "63",
19 )
20 ):
21 comp = "Maestro Card"
22 elif str(self.card_no).startswith("5"):
23 comp = "Master Card"
24 elif str(self.card_no).startswith("37"):
25 comp = "American Express Card"
26 elif str(self.card_no).startswith("62"):
27 comp = "Unionpay Card"
28 elif str(self.card_no).startswith("6"):
29 comp = "Discover Card"
30 elif str(self.card_no).startswith("35"):
31 comp = "JCB Card"
32 elif str(self.card_no).startswith("7"):
33 comp = "Gasoline Card"
34
35 return "Company : " + comp
36
37 def first_check(self):
38 if 13 <= len(self.card_no) <= 19:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected