Exemple #1
0
 public DebitCard(string name)
 {
     CardType   = "Debit Card";
     FullName   = name;
     CardPrefix = "2400";
     CardNumber = NumGenerator.GenerateNumber(CardPrefix, 16);
 }
Exemple #2
0
 public Maestro(string name)
 {
     CardType = "Maestro";
     FullName = name;
     string[] prefixes = new string[] { "5018", "5020", "5038", "5893", "6304", "6759", "6761", "6762", "6763" };
     CardPrefix = prefixes[new Random().Next(0, prefixes.Length)];
     CardNumber = NumGenerator.GenerateNumber(CardPrefix, 19);
     ExpiryDate = DateTime.Today.AddYears(5).AddMonths(8);
 }
Exemple #3
0
 public VisaElectron(string name)
 {
     CardType = "Visa Electron";
     FullName = name;
     string[] prefixes = new string[] { "4026", "417500", "4508", "4844", "4913", "4917" };
     CardPrefix   = prefixes[new Random().Next(0, prefixes.Length)];
     CardNumber   = NumGenerator.GenerateNumber(CardPrefix, 16);
     ExpiryDate   = DateTime.Today.AddYears(5);
     MonthlyLimit = 10000;
 }
Exemple #4
0
 public Mastercard(string name)
 {
     CardType = "Mastercard";
     FullName = name;
     string[] prefixes = new string[] { "51", "52", "53", "54", "55" };
     CardPrefix   = prefixes[new Random().Next(0, prefixes.Length)];
     CardNumber   = NumGenerator.GenerateNumber(CardPrefix, 16);
     ExpiryDate   = DateTime.Today.AddYears(5);
     CreditLimit  = 40000;
     MonthlyLimit = 30000;
     DailyLimit   = 5000;
 }