public string Authorise(string creditcard, string expiry, string cvv) { string result; log.Info(string.Format("Authorisation request for {0}-{1}-{2}::", creditcard, expiry, cvv)); AppD.MerchantBank.CardService cardService = new AppD.MerchantBank.CardService(); if (cardService.IsValid(creditcard)) result = "authorised"; else result = "notauthorised"; log.Info(string.Format("result: {0}", result)); return result; }
static void Main(string[] args) { string creditcard = "4444333322221111"; // Set up a simple configuration that logs on the console. //BasicConfigurator.Configure(); AppD.MerchantBank.CardService cardService = new AppD.MerchantBank.CardService(); if (cardService.IsValid(creditcard)) { cardService.Debit(creditcard, 50); cardService.Credit(creditcard, 33); } Console.Read(); }
static void Main(string[] args) { string creditcard = "4444333322221111"; // Set up a simple configuration that logs on the console. //BasicConfigurator.Configure(); AppD.MerchantBank.CardService cardService = new AppD.MerchantBank.CardService(); if (cardService.IsValid(creditcard)) { cardService.Debit(creditcard, 50); cardService.Credit(creditcard, 33); } Console.Read(); }
public string Authorise(string creditcard, string expiry, string cvv) { string result; log.Info(string.Format("Authorisation request for {0}-{1}-{2}::", creditcard, expiry, cvv)); AppD.MerchantBank.CardService cardService = new AppD.MerchantBank.CardService(); if (cardService.IsValid(creditcard)) { result = "authorised"; } else { result = "notauthorised"; } log.Info(string.Format("result: {0}", result)); return(result); }