Exemple #1
0
 internal void AddCreditCard(CreditCard creditCard)
 {
     this.CreditCards.Add(creditCard);
 }
Exemple #2
0
        private void saveUserCreditCard(PaymentInfo paymentInfo, PaymentResult paymentResult)
        {
            if (!paymentInfo.ShouldSaveCreditCard() || !paymentResult.InstantBuyKey.HasValue)
                return;

            var creditCard = new CreditCard(this.Customer, paymentResult.InstantBuyKey.Value,
                paymentInfo.CreditCardBrand, paymentInfo.CreditCardNumber.GetLast(4), paymentInfo.ExpMonth, paymentInfo.ExpYear);
            this.Customer.AddCreditCard(creditCard);
        }