示例#1
0
        public CardTransaction MakePOSPayment(decimal amount, string destinationName, string destinationAccount)
        {
            var transaction     = BankAccount.CreatePayment(amount, destinationName, destinationAccount, "POS Payment");
            var cardTransaction = CardTransaction.Create(transaction, CardTransactionType.POS);

            cardTransactions.Add(cardTransaction);
            return(cardTransaction);
        }
示例#2
0
        public CardTransaction WithdrawFromATM(decimal amount, string atmIdentifier)
        {
            var transaction     = BankAccount.CreatePayment(amount, atmIdentifier, "", "ATM Withdrawal");
            var cardTransaction = CardTransaction.Create(transaction, CardTransactionType.ATM);

            cardTransactions.Add(cardTransaction);
            return(cardTransaction);
        }
示例#3
0
        public CardTransaction OnlinePayment(decimal amount, string destinationName, string destinationAccount, string cvv)
        {
            if (!CVV.Equals(cvv))
            {
                throw new CVVMismatchException(CVV, cvv);
            }

            var transaction     = BankAccount.CreatePayment(amount, destinationName, destinationAccount, "Online Payment");
            var cardTransaction = CardTransaction.Create(transaction, CardTransactionType.Online);

            cardTransactions.Add(cardTransaction);
            return(cardTransaction);
        }