/// <summary> /// Add payment to list of payments when it is authorized. /// </summary> /// <param name="payment">One of payment method: CashPayment, CheckPayment, or CreditCardPayment</param> public void processPayment(PaymentMethod payment) { if (payment.process()) this.addPayment(payment); }
/// <summary> /// /// </summary> /// <param name="payment"></param> public void addPayment(PaymentMethod payment) { payments.Add(payment); }