Foundation offers a starting point that is intuitive, well-structured and modular allowing developers to explore CMS, Commerce, Personalization, Search and Navigation, Data Platform and Experimentation.
Describe the bug
CustomerContext.Current.CurrentContact.ContactCreditCards should return saved credit cards but it doesn't return any list or say length is always 0, even after saving one credit card entry through code.
To Reproduce
Run this code and at first run there can be empty list of credit cards but after saving one it should show saved credit cards list.
var epiServerContext = CustomerContext.Current.CurrentContact;
var epiServerCreditCards1 = CustomerContext.Current?.GetContactCreditCards(epiServerContext);
var epiServerCreditCards2 = epiServerContext?.ContactCreditCards;
var creditCard = new CreditCard
{
LastFourDigits = Convert.ToString("1111"),
ExpirationMonth = Convert.ToInt32(12),
ExpirationYear = Convert.ToInt32(2023),
CardType = 1,
};
epiServerContext?.AddCreditCard(creditCard);
epiServerContext?.SaveChanges();
Describe the bug CustomerContext.Current.CurrentContact.ContactCreditCards should return saved credit cards but it doesn't return any list or say length is always 0, even after saving one credit card entry through code.
To Reproduce Run this code and at first run there can be empty list of credit cards but after saving one it should show saved credit cards list.