private CustomerPaymentViewModel GetCustomerPaymentModel(ApplicationUser user, Donation donation, DonationViewModel detail, List <CountryViewModel> countryList) { return(new CustomerPaymentViewModel { Name = user.FullName, AddressLine1 = user.AddressLine1, AddressLine2 = user.AddressLine2, City = user.City, State = user.State, Country = string.IsNullOrEmpty(user.Country) ? "US" : user.Country, Zip = user.Zip, DonationId = donation.Id, Description = donation.Reason, Frequency = _localizer[detail.GetCycle(donation.CycleId.ToString())], Amount = (decimal)donation.DonationAmount, IsCustom = donation.IsCustom, countries = countryList }); }
private CustomerPaymentViewModel GetCustomerPaymentModel(ApplicationUser user, Donation donation, DonationViewModel detail, List <CountryViewModel> countryList) { return(new CustomerPaymentViewModel { Name = user.FullName, AddressLine1 = user.AddressLine1, AddressLine2 = user.AddressLine2, City = user.City, State = user.State, Country = string.IsNullOrEmpty(user.Country) ? _currencySettings.Value.ServerLocation == "China" ? "CN" : "" : user.Country, Zip = user.Zip, DonationId = donation.Id, Description = donation.Reason, Frequency = _localizer[detail.GetCycle(donation.CycleId.ToString())], Amount = (decimal)donation.DonationAmount, IsCustom = donation.IsCustom, countries = countryList, yearList = GeneralUtility.GetYeatList() }); }
private CustomerRePaymentViewModel CustomerRepaymentModelData(ApplicationUser user, Donation donation, DonationViewModel detail, List <CountryViewModel> countryList, StripeCustomer objStripeCustomer, StripeCard objStripeCard) { return(new CustomerRePaymentViewModel() { Name = user.FullName, AddressLine1 = user.AddressLine1, AddressLine2 = user.AddressLine2, City = user.City, State = user.State, Country = string.IsNullOrEmpty(user.Country) ? _currencySettings.Value.ServerLocation == "China" ? "CN" : "" : user.Country, Zip = user.Zip, DonationId = donation.Id, Description = donation.Reason, Frequency = _localizer[detail.GetCycle(donation.CycleId.ToString())], Amount = (decimal)donation.DonationAmount, IsCustom = donation.IsCustom, countries = countryList, Last4Digit = objStripeCard.Last4, CardId = objStripeCard.Id, DisableCurrencySelection = string.IsNullOrEmpty(objStripeCustomer.Currency) ? "0" : "1" }); }