예제 #1
0
        public CartModel Assign(CartModel cart, Guid userGuid)
        {
            cart.AnyStandardPaymentMethodsAvailable = _paymentMethodService.AnyStandardMethodsEnabled();
            cart.PayPalExpressAvailable             = _paymentMethodService.PayPalExpressCheckoutIsEnabled();
            cart.PayPalExpressPayerId = GetPayPalExpressPayerId(userGuid);
            cart.PayPalExpressToken   = GetPayPalExpressToken(userGuid);
            cart.BillingAddress       = GetBillingAddress(cart, userGuid);
            List <BasePaymentMethod> availablePaymentMethods = _paymentMethodService.GetAllAvailableMethods(cart);

            cart.AvailablePaymentMethods = availablePaymentMethods;
            cart.PaymentMethod           = GetPaymentMethodInfo(userGuid, availablePaymentMethods, cart);
            return(cart);
        }