예제 #1
0
        public async Task <IActionResult> ShoppingCart(int?id)
        {
            //hard code the customer id
            var custId = 1;
            var order  = await _api.GetOrder(custId);

            Cart cart = new Cart()
            {
                OrderDetail   = order,
                PizzaProperty = new Pizza()
            };

            return(View(cart));
        }
예제 #2
0
        public static Order GetOrderCall()
        {
            const string simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
            var          api       = new OrderApi(simpleKey);
            const string expansion = "item,summary";
            const string orderId   = "DEMO-0009104309";

            OrderResponse res = api.GetOrder(orderId, expansion);

            return(res.Order);
        }