public static bool heart() { string posData = "token=" + token; HttpResult httpResult = postData(Constants.serverUrl + "/all/terminal/checkStatus", posData); ServiceCommonResult result = JSON.parse <ServiceCommonResult>(httpResult.Html); if (result.code == "0") { return(true); } else { lastError = result.msg; return(false); } }
public static bool uploadOrder(string orderSn, string title, string money, string memo, string time) { string posData = "p={ token : \"" + token + "\", orderInfos: [ { orderNo:\"" + orderSn + "\", title:\"" + title + "\", money: \"" + money + "\", orderMemo:\"" + memo + "\", orderTime: \"" + time + "\"}] }"; HttpResult httpResult = postData(Constants.serverUrl + "/all/terminal/orderUpload", posData); ServiceCommonResult result = JSON.parse <ServiceCommonResult>(httpResult.Html); if (result.code == "0") { return(true); } else { lastError = result.msg; return(false); } }