Exemple #1
0
        public ActionResult UseBankAccountOnFile(ExigoService.BankAccountType type)
        {
            var paymentMethod = Exigo.GetCustomerPaymentMethods(new GetCustomerPaymentMethodsRequest
            {
                CustomerID = Identity.Current.CustomerID,
                ExcludeIncompleteMethods = true,
                ExcludeInvalidMethods    = true
            }).Where(c => c is BankAccount && ((BankAccount)c).Type == type).FirstOrDefault();

            return(UsePaymentMethod(paymentMethod));
        }
        public ActionResult ManageBankAccount(ExigoService.BankAccountType type)
        {
            var model = Exigo.GetCustomerPaymentMethods(Identity.Current.CustomerID)
                        .Where(c => c is BankAccount && ((BankAccount)c).Type == type)
                        .FirstOrDefault();


            // Clear out the account number
            ((BankAccount)model).AccountNumber = "";


            return(View("ManageBankAccount", model));
        }
Exemple #3
0
        public ActionResult UseBankAccountOnFile(ExigoService.BankAccountType type)
        {
            if (Identity.Customer != null)
            {
                var paymentMethod = Exigo.GetCustomerPaymentMethods(new GetCustomerPaymentMethodsRequest
                {
                    CustomerID = Identity.Customer.CustomerID,
                    ExcludeIncompleteMethods = true,
                    ExcludeInvalidMethods    = true
                }).Where(c => c is BankAccount && ((BankAccount)c).Type == type).FirstOrDefault();

                return(UsePaymentMethod(paymentMethod));
            }
            else
            {
                return(new JsonNetResult(new
                {
                    success = false,
                    message = Resources.Common.YourSessionHasExpired
                }));
            }
        }
        public ActionResult DeleteBankAccount(ExigoService.BankAccountType type)
        {
            Exigo.DeleteCustomerBankAccount(Identity.Current.CustomerID, type);

            return(RedirectToAction("PaymentMethodList"));
        }