Exemple #1
0
        public void Checkout(PaymentDetails paymentDetails, bool notifyCustomer)
        {
            if (paymentDetails.PaymentMethod == PaymentMethod.CreditCard)
            {
                ChargeCard(paymentDetails);
            }

            ReserveInventory();

            if (notifyCustomer)
            {
                NotifyCustomer();
            }
        }
Exemple #2
0
 private void ChargeCard(PaymentDetails paymentDetails)
 {
     // Get sum of money from the credit card
     Console.WriteLine("ChargeCard");
 }