/// <summary> /// 支付订单接口,充值订单下单完成,必须在30分钟内调用此接口,否则必须重新下单 /// </summary> /// <param name="billId">订单编号</param> /// <returns>返回支付成功的订单详情</returns> public string PayBill(string billId) { string jsonResult = string.Empty; try { IOpenClient client = new DefaultOpenClient(ETong.QianMi.Logic.Authorize.API_SERVER_URL, ETong.QianMi.Logic.Authorize.APP_KEY, ETong.QianMi.Logic.Authorize.APP_SECRET); RechargeBasePayBillRequest req = new RechargeBasePayBillRequest(); req.BillId = billId; RechargeBasePayBillResponse response = client.Execute(req, ETong.QianMi.Logic.Authorize.ACCESS_TOKEN); if (!response.IsError) { jsonResult = response.Body; } } catch (Exception ex) { } return(jsonResult); }
public QmcsMessagesConfirmResponse ConfirmMessage(List <string> messages) { IOpenClient client = new DefaultOpenClient(ETong.QianMi.Logic.Authorize.API_SERVER_URL, ETong.QianMi.Logic.Authorize.APP_KEY, ETong.QianMi.Logic.Authorize.APP_SECRET); QmcsMessagesConfirmRequest req = new QmcsMessagesConfirmRequest(); req.SMessageIds = string.Join(",", messages); return(client.Execute(req, ETong.QianMi.Logic.Authorize.ACCESS_TOKEN)); }
protected void cwxz_SelectedIndexChanged(object sender, EventArgs e) { IOpenClient client = new DefaultOpenClient(BMEshenghuo.serverUrl, BMEshenghuo.appKey, BMEshenghuo.appSecret); AirLinesListRequest req = new AirLinesListRequest(); req.From = qdz.SelectedValue; req.To = zdz.SelectedValue; req.ItemId = mc.SelectedValue; req.Date = txtBeginTime.Text; AirLinesListResponse response = client.Execute(req, BMEshenghuo.accessToken); if (!response.IsError) { //hxxz.DataSource = response.Airlines; //hxxz.DataTextField = "FlightNo" + "SeatMsg" + "SettlePrice" + "DepTime"; //hxxz.DataValueField = "FlightNo"; //hxxz.DataBind(); List <Qianmi.Api.Domain.Elife.Airline> alist = response.Airlines; int i = 0; foreach (Qianmi.Api.Domain.Elife.Airline item in alist) { List <Qianmi.Api.Domain.Elife.AirSeat> ss = item.AirSeats; foreach (Qianmi.Api.Domain.Elife.AirSeat item1 in ss) { if (hxxz.SelectedValue == alist[i].FlightNo.ToString() + alist[i].DepTime.ToString()) { for (int j = 0; j < ss.Count; j++) { if (cwxz.SelectedValue == alist[i].AirSeats[j].SeatCode.ToString()) { seatCode.Value = alist[i].AirSeats[j].SeatCode; airlineCode.Value = alist[i].AirSeats[j].AirlineCode; parPrice.Value = alist[i].AirSeats[j].ParPrice.ToString(); seatMsg.Value = alist[i].AirSeats[j].SeatMsg; seatStatus.Value = alist[i].AirSeats[j].SeatStatus; flightNo.Value = alist[i].FlightNo; FlightCompanyName.Value = alist[i].FlightCompanyName; DepTime.Value = alist[i].DepTime; ArriTime.Value = alist[i].ArriTime; } } } } i++; } lab.Text = parPrice.Value; ClientScript.RegisterStartupScript(this.GetType(), "", "<script>$('#yc3').show();$('#yc1').show();</script>", false); } }
protected void cyxlb_Click(object sender, EventArgs e) { IOpenClient client = new DefaultOpenClient(BMEshenghuo.serverUrl, BMEshenghuo.appKey, BMEshenghuo.appSecret); AirLinesListRequest req = new AirLinesListRequest(); req.From = qdz.SelectedValue; req.To = zdz.SelectedValue; req.ItemId = mc.SelectedValue; req.Date = txtBeginTime.Text; AirLinesListResponse response = client.Execute(req, BMEshenghuo.accessToken); if (!response.IsError) { //hxxz.DataSource = response.Airlines; //hxxz.DataTextField = "FlightNo" + "SeatMsg" + "SettlePrice" + "DepTime"; //hxxz.DataValueField = "FlightNo"; //hxxz.DataBind(); if (response.Airlines == null) { ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + GetTran("010468", "没有查到机票请重新输入条件") + "');</script>", false); return; } List <Qianmi.Api.Domain.Elife.Airline> alist = response.Airlines; foreach (Qianmi.Api.Domain.Elife.Airline item in alist) { List <Qianmi.Api.Domain.Elife.AirSeat> ss = item.AirSeats; foreach (Qianmi.Api.Domain.Elife.AirSeat item1 in ss) { hxxz.Items.Clear(); for (int j = 0; j < response.Airlines.Count; j++) { //hxxz.Items.Add(item.Cities[j].City.Name); hxxz.Items.Insert(j, alist[j].FlightNo.ToString() + GetTran("010469", ".时间:") + alist[j].DepTime.ToString()); hxxz.Items[j].Value = alist[j].FlightNo.ToString() + alist[j].DepTime.ToString(); } } } //lab.Text = parPrice.Value; mc.Enabled = false; qdz.Enabled = false; zdz.Enabled = false; txtBeginTime.Enabled = true; cyxlb.Visible = false; ClientScript.RegisterStartupScript(this.GetType(), "", "<script>$('#yc3').show();$('#yc1').show();</script>", false); } }
/// <summary> /// 订单列表查询 /// </summary> /// <param name="rechargeAccount">充值账号</param> /// <param name="pageNo">页码,从0开始</param> /// <param name="pageSize">每页显示条数</param> /// <param name="orderState">订单状态,1 成功 2 充值中 3 已撤销 4 未付款</param> /// <param name="orderTime">订单时间,按日查询或者按月查询,yyyy-MM或者yyyy-MM-dd</param> /// <returns></returns> public string GetOrderList(string rechargeAccount = "", string pageNo = "0", string pageSize = "100", string orderState = "0", string orderTime = "2015-12-18") { string jsonResult = string.Empty; try { IOpenClient client = new DefaultOpenClient(ETong.QianMi.Logic.Authorize.API_SERVER_URL, ETong.QianMi.Logic.Authorize.APP_KEY, ETong.QianMi.Logic.Authorize.APP_SECRET); RechargeOrderListRequest req = new RechargeOrderListRequest(); if (rechargeAccount != "") { req.RechargeAccount = rechargeAccount; } if (pageNo != "") { req.PageNo = pageNo; } req.PageSize = pageSize; if (rechargeAccount != "") { req.RechargeAccount = rechargeAccount; } if (orderState != "") { req.OrderState = orderState; } if (orderTime != "") { req.OrderTime = orderTime; } RechargeOrderListResponse response = client.Execute(req, ETong.QianMi.Logic.Authorize.ACCESS_TOKEN); if (!response.IsError) { jsonResult = response.Body; } } catch (Exception ex) { } return(jsonResult); }
/// <summary> /// 消费多条消息 /// </summary> /// <returns></returns> public QmcsMessagesConsumeResponse MessagesConsume(string group_name, long quantity = 100) { QmcsMessagesConsumeResponse response = null; IOpenClient client = new DefaultOpenClient(ETong.QianMi.Logic.Authorize.API_SERVER_URL, ETong.QianMi.Logic.Authorize.APP_KEY, ETong.QianMi.Logic.Authorize.APP_SECRET); QmcsMessagesConsumeRequest req = new QmcsMessagesConsumeRequest(); req.GroupName = group_name; req.Quantity = quantity; response = client.Execute(req, ETong.QianMi.Logic.Authorize.ACCESS_TOKEN); return(response); }
public void chayouxi() { IOpenClient client = new DefaultOpenClient(BMEshenghuo.serverUrl, BMEshenghuo.appKey, BMEshenghuo.appSecret); BmGamesListRequest req = new BmGamesListRequest(); BmGamesListResponse response = client.Execute(req, BMEshenghuo.accessToken); if (!response.IsError) { mc.DataSource = response.Games; mc.DataTextField = "GameName"; mc.DataValueField = "GameId"; mc.DataBind(); cyx.Visible = false; ClientScript.RegisterStartupScript(this.GetType(), "", "<script>$('#yc1').show();$('#yc2').hide();</script>", false); } }
protected void yxkczxz_Click(object sender, EventArgs e) { IOpenClient client = new DefaultOpenClient(BMEshenghuo.serverUrl, BMEshenghuo.appKey, BMEshenghuo.appSecret); BmGameItemsListRequest req = new BmGameItemsListRequest(); req.ClassId = yxkcz.SelectedValue; BmGameItemsListResponse response = client.Execute(req, BMEshenghuo.accessToken); if (!response.IsError) { xzsp.DataSource = response.Items; xzsp.DataTextField = "ItemName"; xzsp.DataValueField = "ItemId"; xzsp.DataBind(); ClientScript.RegisterStartupScript(this.GetType(), "", "<script>$('#yc4').show();</script>", false); } }
/// <summary> /// 获取自定义用户分组列表 /// </summary> /// <param name="group_names">分组列表,不传代表查询所有分组信息,但不会返回组下面的用户信息。如果应用没有设置分组则返回空。组名不能以default开头,default开头是系统默认的组。</param> /// <param name="page_no">页码</param> /// <param name="page_size">每页条数</param> /// <returns></returns> public QmcsGroupsGetResponse GroupsGet(string group_names, int page_no = 0, int page_size = 50) { QmcsGroupsGetResponse response = null; try { IOpenClient client = new DefaultOpenClient(ETong.QianMi.Logic.Authorize.API_SERVER_URL, ETong.QianMi.Logic.Authorize.APP_KEY, ETong.QianMi.Logic.Authorize.APP_SECRET); QmcsGroupsGetRequest req = new QmcsGroupsGetRequest(); req.GroupNames = group_names; req.PageNo = page_no; req.PageSize = page_size; response = client.Execute(req, ETong.QianMi.Logic.Authorize.ACCESS_TOKEN); } catch (Exception ex) { } return(response); }