DTcms.API/Payment/Tenpay/ResponseHandler.cs
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections;
using System.Collections.Specialized;
using System.Text;
using System.Web;
namespace DTcms.API.Payment.Tenpay
{
/// <summary>
/// ResponseHandler 的摘要说明。
/// </summary>
public class ResponseHandler
{
/** 密钥 */
private string key;
/** 应答的参数 */
protected Hashtable parameters;
/** debug信息 */
private string debugInfo;
protected HttpContext httpContext;
//获取服务器通知数据方式,进行参数获取
public ResponseHandler(HttpContext httpContext)
{
parameters = new Hashtable();
this.httpContext = httpContext;
NameValueCollection collection;
if(this.httpContext.Request.HttpMethod == "POST")
{
collection = this.httpContext.Request.Form;
}
else
{
collection = this.httpContext.Request.QueryString;
}
foreach(string k in collection)
{
string v = (string)collection[k];
this.setParameter(k, v);
}
}
/** 获取密钥 */
public string getKey()
{ return key;}
/** 设置密钥 */
public void setKey(string key)
{ this.key = key;}
/** 获取参数值 */
public string getParameter(string parameter)
{
string s = (string)parameters[parameter];
return (null == s) ? "" : s;
后面还有 101 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
