コード例 #1
0
        static SessionType PromtSessionType(PaytureAPIType apiType)
        {
            var add = apiType == PaytureAPIType.vwapi;

            Console.WriteLine($"Specify The Session Type: pay, block {( add ? "add" : "" )}");
            var session = Console.ReadLine().ToUpper();

            if (session == "PAY" || session == "P")
            {
                return(SessionType.Pay);
            }
            else if (session == "BLOCK" || session == "B")
            {
                return(SessionType.Block);
            }
            else if (session == "ADD" || session == "A")
            {
                return(SessionType.Add);
            }
            else
            {
                Console.WriteLine($"Illegal Session Type. Only pay, block{(add ? " or add" : "")} available.");
                return(PromtSessionType(apiType));
            }
        }
コード例 #2
0
 public Transaction(PaytureAPIType api, PaytureCommands command, Merchant merchnat)
 {
     _apiType  = api;
     Command   = command;
     _merchant = merchnat;
 }