コード例 #1
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;
 }
コード例 #2
0
ファイル: MyApp.cs プロジェクト: Ecetera/appdynamics-sandpit
 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();
 }
コード例 #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();
        }
コード例 #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);
        }