Exemplo n.º 1
0
        public IActionResult CreateOrder()
        {
            try
            {
                var data = HttpContext.Request.Form;


                IOrderDTO orderDTO = new OrderDTO();
                orderDTO.Customer_email = data["user"];
                orderDTO.Order_total    = Convert.ToInt32(data["cartTotal"]);
                orderDTO.Order_address  = data["address"];
                orderDTO.Order_pincode  = data["pincode"];
                orderDTO.Order_mobile   = data["mobile"];
                IList <OrderProductDTO> orderDetails = GetOrderList(data);
                int result = _orderBusiness.CreateOrder(orderDTO, orderDetails);
                return(Ok(new {  }));
            }
            catch (Exception ex)
            {
                return(Ok(new { error = ex }));
            }
        }