示例#1
0
        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);
        }
示例#2
0
 public static string GetUrl(this BasePaymentMethod method, UrlHelper urlHelper)
 {
     return(urlHelper.Action(method.ActionName, method.ControllerName));
 }
示例#3
0
 public static bool UseStandardFlow(this BasePaymentMethod method)
 {
     return(method.PaymentType == PaymentType.Redirection || method.PaymentType == PaymentType.ServiceBased);
 }