DTcms.API/DTcms.API.Payment.alipaymb/Notify.cs
(开头部分) 5KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.IO;
using System.Net;
using System.Text;
using System.Xml;
namespace DTcms.API.Payment.alipaymb
{
public class Notify
{
private string _partner = "";
private string _key = "";
private string _private_key = "";
private string _public_key = "";
private string _input_charset = "";
private string _sign_type = "";
private string Https_veryfy_url = "https://mapi.alipay.com/gateway.do?service=notify_verify&";
public Notify()
{
this._partner = Config.Partner.Trim();
this._key = Config.Key.Trim();
this._private_key = Config.Private_key.Trim();
this._public_key = Config.Public_key.Trim();
this._input_charset = Config.Input_charset.Trim().ToLower();
this._sign_type = Config.Sign_type.Trim().ToUpper();
}
public bool VerifyReturn(System.Collections.Generic.Dictionary<string, string> inputPara, string sign)
{
bool isSign = this.GetSignVeryfy(inputPara, sign, true);
return isSign;
}
public bool VerifyNotify(System.Collections.Generic.Dictionary<string, string> inputPara, string sign)
{
if (this._sign_type == "0001")
{
inputPara = this.Decrypt(inputPara);
}
string responseTxt = "true";
try
{
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.LoadXml(inputPara["notify_data"]);
string notify_id = xmlDoc.SelectSingleNode("/notify/notify_id").InnerText;
if (notify_id != "")
{
responseTxt = this.GetResponseTxt(notify_id);
}
}
catch (System.Exception e)
{
后面还有 129 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。