コード例 #1
0
ファイル: OrderController.cs プロジェクト: antinka/Diploma
        public ActionResult Pay(PaymentTypes paymentType)
        {
            var userId = CurrentUser.Id;

            if (userId == Guid.Empty)
            {
                userId = GetUserId();
            }

            var order = _ordersService.GetOrderByUserId(userId);

            var orderPay = new OrderPayment()
            {
                Id     = order.Id,
                UserId = order.UserId,
                Cost   = order.Cost
            };

            return(_paymentStrategy.GetPaymentStrategy(paymentType, orderPay));
        }