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;
 }
Exemplo n.º 2
0
 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();
 }
Exemplo n.º 3
0
        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();
        }
Exemplo n.º 4
0
        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);
        }