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 int Credit(string creditcard, double amount) { int result; log.Info((string.Format("Credit request for {0}-{1}::", creditcard, amount))); AppD.MerchantBank.CardService cardService = new AppD.MerchantBank.CardService(); result = cardService.Credit(creditcard, amount); log.Info(string.Format("result: {0}", result)); return(result); }
public int Credit(string creditcard, double amount) { int result; log.Info((string.Format("Credit request for {0}-{1}::", creditcard, amount))); AppD.MerchantBank.CardService cardService = new AppD.MerchantBank.CardService(); result = cardService.Credit(creditcard, amount); 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(); }
public int Credit(string creditcard, double amount) { int result; log.Info((string.Format("Credit request for {0}-{1}::", creditcard, amount))); AppD.MerchantBank.CardService cardService = new AppD.MerchantBank.CardService(); result = cardService.Credit(creditcard, amount); log.Info(string.Format("result: {0}", result)); //send a message here (exit point as per req) SendMessage("a refund message", "REFUND_NOTICE"); SumOfRefunds(amount); return(result); }
public int Credit(string creditcard, double amount) { int result; log.Info((string.Format("Credit request for {0}-{1}::", creditcard, amount))); AppD.MerchantBank.CardService cardService = new AppD.MerchantBank.CardService(); result = cardService.Credit(creditcard, amount); log.Info(string.Format("result: {0}", result)); //send a message here (exit point as per req) SendMessage("a refund message", "REFUND_NOTICE"); SumOfRefunds(amount); return result; }