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); }
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); }
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); }