admin 管理员组

文章数量: 887829


2023年12月25日发(作者:grep目录下所有文件)

ameter("sign", sign); //debug信息 ugInfo(ng() + " => sign:" + sign); } ///

/// 没有KEY的拼接和MD5 HASH 签名 /// public virtual void createSignWithoutKey() { StringBuilder sb = new StringBuilder(); ArrayList akeys = new ArrayList(); (); foreach (string k in akeys) { string v = (string)parameters[k]; if (null != v && "".CompareTo(v) != 0 && "sign".CompareTo(k) != 0 && "key".CompareTo(k) != 0) { (k + "=" + v + "&"); } } string rst = ng(); rst = d('&'); // ("key=" + ()); string sign = 5(rst, getCharset()).ToUpper(); ameter("sign", sign); //debug信息 ugInfo(ng() + " => sign:" + sign); } /// /// 获取参数值 /// /// 参数名 /// public string getParameter(string parameter) { string s = (string)parameters[parameter]; return (null == s) ? "" : s; } /// /// 设置参数值 /// /// 参数名 /// 参数值 public void setParameter(string parameter, string parameterValue) { if (parameter != null && parameter != "") { if (ns(parameter)) { (parameter); } (parameter, parameterValue);

///

/// 设置返回内容 /// /// XML内容 public virtual void setContent(string content) { t = content; XmlDocument xmlDoc = new XmlDocument(); olver = null;//2018-12-3 l(content); XmlNode root = SingleNode("xml"); XmlNodeList xnl = odes; foreach (XmlNode xnf in xnl) { ameter(, ext); } } /// /// 是否平台签名,规则是:按参数名称a-z排序,遇到空值的参数不参加签名。 /// /// public virtual Boolean isTenpaySign() { StringBuilder sb = new StringBuilder(); ArrayList akeys = new ArrayList(); (); foreach (string k in akeys) { string v = (string)parameters[k]; if (null != v && "".CompareTo(v) != 0 && "sign".CompareTo(k) != 0 && "key".CompareTo(k) != 0) { (k + "=" + v + "&"); } } ("key=" + ()); string sign = 5(ng(), getCharset()).ToUpper(); //debug信息 ugInfo(ng() + " => sign:" + sign); return getParameter("sign").Equals(sign); } }}

--

xml root 为"xml"。


本文标签: 参数 目录 设置