DTcms.API/DTcms.API.Payment.tenpaypc/TenpayUtil.cs
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using DTcms.BLL;
using DTcms.Common;
using DTcms.Model;
using System;
using System.Text;
using System.Web;
using System.Xml;
namespace DTcms.API.Payment.tenpaypc
{
public class TenpayUtil
{
public string tenpay = "1";
public string partner = "";
public string key = "";
public string type = "1";
public string return_url = "";
public string notify_url = "";
public TenpayUtil()
{
string fullPath = Utils.GetMapPath("~/xmlconfig/tenpaypc.config");
XmlDocument doc = new XmlDocument();
doc.Load(fullPath);
XmlNode _partner = doc.SelectSingleNode("Root/partner");
XmlNode _key = doc.SelectSingleNode("Root/key");
XmlNode _type = doc.SelectSingleNode("Root/type");
XmlNode _return_url = doc.SelectSingleNode("Root/return_url");
XmlNode _notify_url = doc.SelectSingleNode("Root/notify_url");
DTcms.Model.siteconfig model = new DTcms.BLL.siteconfig().loadConfig();
this.partner = _partner.InnerText;
this.key = _key.InnerText;
this.type = _type.InnerText;
this.return_url = "http://" + HttpContext.Current.Request.Url.Authority.ToLower() + _return_url.InnerText;
this.notify_url = "http://" + HttpContext.Current.Request.Url.Authority.ToLower() + _notify_url.InnerText;
}
public string UrlEncode(string instr, string charset)
{
string result;
if (instr == null || instr.Trim() == "")
{
result = "";
}
else
{
string res;
try
{
res = HttpUtility.UrlEncode(instr, System.Text.Encoding.GetEncoding(charset));
}
catch (System.Exception ex_38)
{
res = HttpUtility.UrlEncode(instr, System.Text.Encoding.GetEncoding("GB2312"));
}
后面还有 52 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。