static AccessTokenManage() { //1.初始化AppID if (AppID == null) { AppID = ConfigInfo.GetInfo().AppID; } }
/// <summary> /// 签名处理------统一下单---key不处理大小写 /// </summary> /// <param name="dic"></param> /// <returns></returns> public static string GetPaySign(Dictionary <string, string> dic) { ConfigInfo config = ConfigInfo.GetInfo(); string[] tempList = dic.OrderBy(q => q.Key).Select(q => q.Key + "=" + q.Value).ToArray(); string signTemp = string.Join("&", tempList); //追加apikey signTemp += "&key=" + config.APIKey; LogOperate.Write(signTemp); return(Common.SecurityHelper.MD5(signTemp)); }
/// <summary> /// 获取发送数据内容 /// </summary> /// <returns></returns> private string GetSendData(OrderInfo order) { ConfigInfo config = ConfigInfo.GetInfo(); XmlDocument doc = new XmlDocument(); XmlElement root = doc.CreateElement("xml"); Dictionary <string, string> dic = GetSendDic(order); foreach (var item in dic) { root.AppendChild(getElem(doc, item.Key, item.Value)); } doc.AppendChild(root); return(doc.InnerXml); }
public BaseManage() { config = ConfigInfo.GetInfo(); }