示例#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;
 }
示例#2
0
 public void SaveCheckoutInformation(ShoppingCart orderRequest, Address address, CreditCard card)
 {
     orderRequest.Buyer.SetAddress(address);
     orderRequest.Buyer.SetPaymentDetails(card);
     _customerRepository.Save(orderRequest.Buyer);
 }
示例#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;
        }