Ejemplo n.º 1
0
 public static CreditCard Create(CreditCardType type, string number, string owner, ExpiryDate expiration)
 {
     var card = new CreditCard {Type = type, Owner = owner, Number = number, Expires = expiration};
     return card;
 }
Ejemplo n.º 2
0
 public void SaveCheckoutInformation(ShoppingCart orderRequest, Address address, CreditCard card)
 {
     orderRequest.Buyer.SetAddress(address);
     orderRequest.Buyer.SetPaymentDetails(card);
     _customerRepository.Save(orderRequest.Buyer);
 }
Ejemplo n.º 3
0
        /// <summary>
        /// Set the payment details of the customer (e.g., credit card number)
        /// </summary>
        /// <param name="card">Credit card used for payment</param>
        /// <returns>this instance</returns>
        public Customer SetPaymentDetails(CreditCard card)
        {
            if (card != null)
                Payment = card;

            return this;
        }