public List <PaymentMethods> GetAllUserPaymentMethod(string userId) { List <PaymentMethods> paymentMethods = _paymentMethodRepository .GetAll() .Where(pm => pm.UserId == userId) .Include(pm => pm.Wallets) .ToList(); return(paymentMethods); }
/// <summary> /// Gets all applicable payment methods on the current site. /// </summary> /// <param name="cart">Shopping cart of the site</param> /// <returns>Collection of applicable payment methods</returns> private IEnumerable <PaymentOptionInfo> GetApplicablePaymentMethods(ShoppingCart cart) { // Gets all enabled payment methods from Kentico IEnumerable <PaymentOptionInfo> enabledPaymentMethods = paymentRepository.GetAll(); // Returns all applicable payment methods return(enabledPaymentMethods.Where(cart.IsPaymentMethodApplicable)); }
public async Task <OrderMeta> Handle(GetOrderMetaQuery request, CancellationToken cancellationToken) { return(new OrderMeta { Countries = await _countryRepository.GetAll(), ShippingMethods = await _shippingMethodRepository.GetAll(), PaymentMethods = await _paymentMethodRepository.GetAll(), }); }
public async Task <IActionResult> ExecuteAsync(CancellationToken cancellationToken) { var paymentMethods = await _PaymentMethodRepository.GetAll(cancellationToken); if (paymentMethods == null) { return(new NoContentResult()); } var viewPaymentMethod = _paymentMethodMapper.MapList(paymentMethods); return(new OkObjectResult(viewPaymentMethod)); }
public ActionResult GetAll() { try { var response = repository.GetAll(); return(Ok(new { success = true, data = response })); } catch (Exception ex) { return(Ok(new { success = false, errorMessage = ex.GetBaseException() })); } }
public IEnumerable <PaymentMethod> GetAll(bool isCache = true) { IEnumerable <PaymentMethod> iePaymentMethod; if (isCache) { var sbKey = new StringBuilder(); sbKey.AppendFormat(CachePaymentMethodKey, "GetAll"); var key = sbKey.ToString(); iePaymentMethod = _cacheManager.GetCollection <PaymentMethod>(key); if (iePaymentMethod == null) { iePaymentMethod = _paymentMethodRepository.GetAll(); _cacheManager.Put(key, iePaymentMethod); } } else { iePaymentMethod = _paymentMethodRepository.GetAll(); } return(iePaymentMethod); }
public IHttpActionResult GetPayTypeEnums() { return(DoFunction(() => { var lst = _paymentMethodRepository.GetAll(1, 1000); var lstDto = new List <Item>(); foreach (var t in lst.Result) { var ii = new Item(); ii.Key = t.Code; ii.Value = t.Name; lstDto.Add(ii); } return lstDto; })); }
private IEnumerable <PaymentOptionInfo> GetApplicablePaymentMethods(ShoppingCartInfo cart) { return(mPaymentMethodRepository.GetAll().Where(paymentMethod => PaymentOptionInfoProvider.IsPaymentOptionApplicable(cart, paymentMethod))); }
public IEnumerable <PaymentMethodViewModel> List() { return(Mapper.Map <IEnumerable <PaymentMethodViewModel> >(_paymentMethodRepository.GetAll())); }
private IEnumerable <PaymentOptionInfo> GetApplicablePaymentMethods(ShoppingCart cart) { return(mPaymentMethodRepository.GetAll().Where(cart.IsPaymentMethodApplicable)); }
public IEnumerable <PaymentMethod> GetAll() { return(_paymentMethodRepository.GetAll()); }
/// <summary> /// Method whose purpose is to return all /// paymenth method records from the database. /// </summary> /// <returns> /// Returns all payment method objects as a IList /// of PaymentMethodModel objects. /// </returns> public IList <PaymentMethodModel> GetAll() { return(_paymentMethodRepository.GetAll()); }
public IEnumerable <PaymentMethod> GetAll() { return(_paymentMethodRepository.GetAll(this.User.Identity.Name)); }