internal void ProcessMonth(int year, int month) { var customer = repo.Customers.Single(); if (NeedsBilling(customer, year, month)) { bool charged = charger.ChargeCustomer(customer); customer.Subscription.RecordChargeResult(charged); } }
public void ProcessMonth(int year, int month) { var customer = _repo.Customers.Single(); if (NeedsBilling(year, month, customer)) { bool charged = _charger.ChargeCustomer(customer); customer.Subscription.RecordChargedResult(charged); } }
public void ProcessMonth(int year, int month) { var customer = _repo.Customers.Single(); if (NeedsBilling(year, month, customer)) { bool charged = _charger.ChargeCustomer(customer); if (!charged && ++customer.PaymentFailures >= MAX_FAILURES) { customer.Subscribed = false; } } }