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(); }
public int Debit(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.Debit(creditcard, amount); log.Info(string.Format("result: {0}", result)); return(result); }
public int Debit(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.Debit(creditcard, amount); log.Info(string.Format("result: {0}", result)); return result; }
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); }
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; }