Exemple #1
0
        public void PutCreditCard(string id)
        {
            if (id.Count() < 5)
            {
                display.ShowText("Kortelė nevalidi!");
            }

            paymentContext = new CardPayment(id);
        }
        public void PutCreditCard(string id)
        {
            if (id.Count() < 5)
            {
                display.ShowText("Kortelė nevalidi!");
            }

            paymentContext = new CardPayment(id);
        }
Exemple #3
0
        public void PutCoin(int amount)
        {
            if (amount != 1 &&
                amount != 2 &&
                amount != 5 &&
                amount != 10 &&
                amount != 20)
            {
                display.ShowText("Netinkama moneta.");
            }

            if (paymentContext == null ||
                paymentContext is CardPayment)
            {
                paymentContext = new CashPayment();
            }

            _amount += amount;
            display.ShowEstimatedExpireTime(_amount);
        }
        public void PutCoin(int amount)
        {
            if (amount != 1 && 
                amount != 2 && 
                amount != 5 && 
                amount != 10 && 
                amount != 20)
            {
                display.ShowText("Netinkama moneta.");
            }

            if (paymentContext == null ||
                paymentContext is CardPayment)
            {
                paymentContext = new CashPayment();
            }

            _amount += amount;
            display.ShowEstimatedExpireTime(_amount);
        }