DTcms.API/DTcms.API.Payment.alipaypc/Notify.cs
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.IO;
using System.Net;
using System.Text;
namespace DTcms.API.Payment.alipaypc
{
public class Notify
{
private string _partner = string.Empty;
private string _key = string.Empty;
private string _input_charset = string.Empty;
private string _sign_type = string.Empty;
private string Https_veryfy_url = "https://mapi.alipay.com/gateway.do?service=notify_verify&";
public Notify()
{
Config xmlConfig = new Config();
this._partner = Config.Partner.Trim();
this._key = Config.Key.Trim().ToLower();
this._input_charset = Config.Input_charset.Trim().ToLower();
this._sign_type = Config.Sign_type.Trim().ToUpper();
}
public bool Verify(System.Collections.Generic.SortedDictionary<string, string> inputPara, string notify_id, string sign)
{
string mysign = this.GetResponseMysign(inputPara);
string responseTxt = "true";
if (notify_id != "")
{
responseTxt = this.GetResponseTxt(notify_id);
}
return responseTxt == "true" && sign == mysign;
}
private string GetPreSignStr(System.Collections.Generic.SortedDictionary<string, string> inputPara)
{
System.Collections.Generic.Dictionary<string, string> sPara = new System.Collections.Generic.Dictionary<string, string>();
sPara = Core.FilterPara(inputPara);
return Core.CreateLinkString(sPara);
}
private string GetResponseMysign(System.Collections.Generic.SortedDictionary<string, string> inputPara)
{
System.Collections.Generic.Dictionary<string, string> sPara = new System.Collections.Generic.Dictionary<string, string>();
sPara = Core.FilterPara(inputPara);
return Core.BuildMysign(sPara, this._key, this._sign_type, this._input_charset);
}
private string GetResponseTxt(string notify_id)
{
string veryfy_url = string.Concat(new string[]
{
this.Https_veryfy_url,
"partner=",
后面还有 32 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。