Пример #1
0
        //
        // GET: /Step3_1/
        public async Task <ActionResult> Index()
        {
            string order_number_s = "SPO0004207587";
            //string member_number_s = "MEM0000000028";
            int                      tcash_i = 0;
            bool                     is_atm  = true; //atm :true credit card:1false
            ApiController            api     = new ApiController();
            OrderInfomation_PostData orderinfomation_postData = new OrderInfomation_PostData()
            {
                order_no = order_number_s
            };
            ATMTransferAccount_PostData atmtransferaccount_postData = new ATMTransferAccount_PostData()
            {
                order_no = order_number_s
            };
            var orderinfomation_source = await api.OrderInfomation_api(orderinfomation_postData);

            var atmtransferaccount_source = await api.ATMTransferAccount_api(atmtransferaccount_postData);

            step3_1_view_return_data step3_1_view_data = new step3_1_view_return_data {
                orderinfomation_result = orderinfomation_source, tcash = tcash_i, atmtransferaccount_result = atmtransferaccount_source
            };

            return(View(step3_1_view_data));
        }
Пример #2
0
        //order_1.5
        public async Task <OrderInfomation_result> OrderInfomation_api(OrderInfomation_PostData postdata)
        {
            string     targetURI = "https://dorder-api.startravel.com.tw/api/OrderInfomation";
            string     final_URI = targetURI + "?order_no=" + postdata.order_no;
            HttpClient client    = new HttpClient();

            client.MaxResponseContentBufferSize = Int32.MaxValue;

            HttpResponseMessage response = client.GetAsync(final_URI).Result;
            var collection      = response.Content.ReadAsStringAsync().Result;
            var collection_jobj = JsonConvert.DeserializeObject <OrderInfomation_result>(collection);

            return(collection_jobj);
        }
Пример #3
0
        //
        // GET: /Step4/
        public async Task <ActionResult> Index()
        {
            string order_number_s = "SPO0004207587";

            ApiController            api = new ApiController();
            OrderInfomation_PostData orderinfomation_postData = new OrderInfomation_PostData()
            {
                order_no = order_number_s
            };
            var orderinfomation_source = await api.OrderInfomation_api(orderinfomation_postData);

            step4_view_return_data step4_view_data = new step4_view_return_data {
                orderinfomation_result = orderinfomation_source
            };


            return(View(step4_view_data));
        }