WmptWap/App_LocalResources/tenpayLib/TenpayUtil.cs
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Text;
using System.Web;
using WMPT.Common;
namespace tenpayApp
{
/// <summary>
/// TenpayUtil 的摘要说明。
/// 配置文件
/// </summary>
public class TenpayUtil
{
public static string charset = "UTF-8";
public static string tenpay = "1";
public static string partner = "1252000401";//商户号(微信公众号中的微信支付商户号,不是财富通邮件中的)
public static string key = "97ba4b32a06f9be58096c2828955a0f2"; //密钥(PartnerKey)
public static string appid = "wxe68fe7f664ba9efe";//appid
public static string tenpay_notify = "http://wx.wm0530.com/weixinpay/payNotifyUrl.aspx"; //支付完成后的回调处理页面,*替换成notify_url.asp所在路径
public TenpayUtil()
{
}
/// <summary>
/// 生成随机串
/// </summary>
/// <returns></returns>
public static string getNoncestr()
{
Random random = new Random();
return Utils.GetMD5(random.Next(1000).ToString(), charset);
}
public static string getTimestamp()
{
TimeSpan ts = DateTime.UtcNow - new DateTime(1970, 1, 1, 0, 0, 0, 0);
return Convert.ToInt64(ts.TotalSeconds).ToString();
}
/** 对字符串进行URL编码 */
public static string UrlEncode(string instr, string charset)
{
//return instr;
if (instr == null || instr.Trim() == "")
return "";
else
{
string res;
res = HttpUtility.UrlEncode(instr, Encoding.GetEncoding(charset));
return res;
}
}
/** 对字符串进行URL解码 */
public static string UrlDecode(string instr, string charset)
{
if (instr == null || instr.Trim() == "")
后面还有 45 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
