package ejiaofei import ( "encoding/xml" "fmt" "net/http" ) type QueryJkOrdersResult struct { XMLName xml.Name `xml:"response"` UserID string `xml:"userid"` // 会员账号 POrderID string `xml:"Porderid"` // 鼎信平台订单号 OrderID string `xml:"orderid"` // 用户订单号 Account string `xml:"account"` // 需要充值的手机号码 Face string `xml:"face"` // 充值面值 Amount string `xml:"amount"` // 购买数量 StartTime string `xml:"starttime"` // 开始时间 State string `xml:"state"` // 订单状态 EndTime string `xml:"endtime"` // 结束时间 Error string `xml:"error"` // 错误提示 } // QueryJkOrders 通用查询接口 // orderid 用户提交的订单号 用户提交的订单号,最长32位(用户保证其唯一性) func (app *App) QueryJkOrders(orderID string) (body []byte, err error) { // 参数 param := NewParams() param.Set("orderid", orderID) params := app.NewParamsWith(param) // 签名 app.signStr = fmt.Sprintf("userid%vpwd%vorderid%v", app.UserID, app.Pwd, orderID) // 请求 body, err = app.request("http://api.ejiaofei.net:11140/query_jkorders.do", params, http.MethodGet) return body, err }