예제 #1
0
        public static void DeleteCustomerBankAccount(int customerID, ExigoService.BankAccountType type)
        {
            // If this is a new credit card, don't delete it - we have nothing to delete
            if (type == ExigoService.BankAccountType.New) return;

            // Save the a blank copy of the bank account
            // Save the bank account
            var request = new SetAccountCheckingRequest
            {
                CustomerID = customerID,

                BankName = string.Empty,
                BankAccountNumber = string.Empty,
                BankRoutingNumber = string.Empty,
                BankAccountType = Common.Api.ExigoWebService.BankAccountType.CheckingPersonal,

                NameOnAccount = string.Empty,
                BillingAddress = string.Empty,
                BillingCity = string.Empty,
                BillingState = string.Empty,
                BillingZip = string.Empty,
                BillingCountry = string.Empty
            };
            var response = Exigo.WebService().SetAccountChecking(request);
        }
예제 #2
0
        public static BankAccount SetCustomerBankAccount(int customerID, BankAccount account, ExigoService.BankAccountType type)
        {
            // New bank accounts
            if (type == ExigoService.BankAccountType.New)
            {
                return SaveNewCustomerBankAccount(customerID, account);
            }

            // Save the bank account
            var request = new SetAccountCheckingRequest
            {
                CustomerID = customerID,

                BankName = account.BankName,
                BankAccountNumber = account.AccountNumber,
                BankRoutingNumber = account.RoutingNumber,
                BankAccountType = Common.Api.ExigoWebService.BankAccountType.CheckingPersonal,

                NameOnAccount = account.NameOnAccount,
                BillingAddress = account.BillingAddress.AddressDisplay,
                BillingCity = account.BillingAddress.City,
                BillingState = account.BillingAddress.State,
                BillingZip = account.BillingAddress.Zip,
                BillingCountry = account.BillingAddress.Country
            };
            var response = Exigo.WebService().SetAccountChecking(request);

            return account;
        }