public ActionResult Payment(int id) { var model = _recipeDrugService.Get(id); var viewModel = new RecipeDrugPaymentViewModel { IngPrice = model.Ingridients.Sum(i => i.Price), ServicePrice = makingRecipeDrugPrice, ShippingPrice = ShippingPrices.ShippingPrice(model.Package.Shipping), RecipeDrug = model }; return(View("Payment", viewModel)); }
public ActionResult Payment(RecipeDrugPaymentViewModel model) { model.RecipeDrug = _recipeDrugService.Get(model.RecipeDrug.ID); var m = new RecipeDrugAfterPaymentViewModel { PaymentType = model.PaymentType, RecipeDrug = model.RecipeDrug }; if (model.PaymentType.ToLower().Equals("ondelivery")) { model.RecipeDrug.Status = OrderStatusEnum.OnDelivery; return(View("Success")); } return(PaymentPlaceholder(m)); }