private BasePaymentMethod GetPaymentMethodInfo(Guid userGuid, List <BasePaymentMethod> availablePaymentMethods, CartModel cart) { string paymentMethodName = GetPaymentMethod(userGuid) ?? (availablePaymentMethods.Count() == 1 ? availablePaymentMethods.First().SystemName : null); BasePaymentMethod paymentMethodInfo = _paymentMethodService.GetMethodForCart(paymentMethodName, cart); return(paymentMethodInfo); }
public static string GetUrl(this BasePaymentMethod method, UrlHelper urlHelper) { return(urlHelper.Action(method.ActionName, method.ControllerName)); }
public static bool UseStandardFlow(this BasePaymentMethod method) { return(method.PaymentType == PaymentType.Redirection || method.PaymentType == PaymentType.ServiceBased); }