public void request4VersionInfo() { try { String url = VZ_AppHelper.baseURL + "/wxpay/version"; String tm = "" + VZMethods.ConvertDateTimeInt(DateTime.Now); Dictionary <String, String> dic = new Dictionary <String, String>(); dic.Add("from", "vrzone"); dic.Add("id", "" + VZ_AppHelper.GetInstance().systemInfo.computerId); dic.Add("sid", "iloveyouvrzone"); dic.Add("tm", tm); dic.Add("uid", "1"); String sign = "from=vrzone&id=" + VZ_AppHelper.GetInstance().systemInfo.computerId + "&sid=iloveyouvrzone&tm=" + tm + "&uid=1&--iloveyouvrzone"; dic.Add("sign", VZMethods.strToMD5(sign).ToUpper()); url = url + "?from=vrzone&id=" + VZ_AppHelper.GetInstance().systemInfo.computerId + "&sid=iloveyouvrzone&tm=" + tm + "&uid=1&sign=" + VZMethods.strToMD5(sign).ToUpper(); HttpWebResponse response = HttpWebResponseUtility.CreateGetHttpResponse(url, 2000, null, null); Stream responseStream = response.GetResponseStream(); StreamReader sr = new StreamReader(responseStream, Encoding.GetEncoding(response.CharacterSet)); String msg = sr.ReadToEnd(); versionInfo = JsonHelper.DeserializeJsonToObject <VZ_VersionInfo>(msg); checkVersion(); return; } catch (Exception ex) { Scratch.Log.LogConfig.Logger.Error("出错:", ex); } }
public String getQRCodeURL(int index) { String url = "http://api.360looker.com/V2/wxpay/qrcode?"; String tm = "" + VZMethods.ConvertDateTimeInt(DateTime.Now); String sign = "from=vrzone&id=" + VZ_AppHelper.GetInstance().systemInfo.computerId + "&sid=iloveyouvrzone&sonid=" + (index + 1) + "&tm=" + tm + "&uid=1&--iloveyouvrzone"; sign = VZMethods.strToMD5(sign).ToUpper(); url += "from=vrzone&id=" + VZ_AppHelper.GetInstance().systemInfo.computerId + "&sid=iloveyouvrzone&sonid=" + (index + 1) + "&tm=" + tm + "&uid=1&sign=" + sign; return(url); }