Exemplo n.º 1
0
        public void RemoveFromVault(int peopleId)
        {
            var person      = db.LoadPersonById(peopleId);
            var paymentInfo = person.PaymentInfo();

            if (paymentInfo == null)
            {
                return;
            }

            if (CustomerGateway.DeleteCustomer(paymentInfo.AuNetCustId.ToString()))
            {
                paymentInfo.AuNetCustId        = null;
                paymentInfo.AuNetCustPayId     = null;
                paymentInfo.AuNetCustPayBankId = null;
                paymentInfo.MaskedCard         = null;
                paymentInfo.MaskedAccount      = null;
                paymentInfo.Expires            = null;
                db.SubmitChanges();
            }
            else
            {
                throw new Exception($"Failed to delete customer {peopleId}");
            }
        }
Exemplo n.º 2
0
 //Customer delete call
 public int DeleteCustomert(CustomerModel customerModel)
 {
     return(customerGateway.DeleteCustomer(customerModel));
 }