C# Class Com.Alipay.Notify

类名:Notify 功能:支付宝通知处理类 详细:处理支付宝各接口通知返回 版本:3.3 修改日期:2011-07-05 '说明: 以下代码只是为了方便商户测试而提供的样例代码,商户可以根据自己网站的需要,按照技术文档编写,并非一定要使用该代码。 该代码仅供学习和研究支付宝接口使用,只是提供一个参考。 //////////////////////注意///////////////////////////// 调试通知返回时,可查看或改写log日志的写入TXT里的数据,来检查通知返回是否正常
Datei anzeigen Open project: hiihellox10/ICanPay Class Usage Examples

Public Methods

Method Description
Notify ( ) : System

构造函数 从配置文件中初始化变量

Verify ( string>.SortedDictionary inputPara, string notify_id, string sign ) : bool

验证消息是否是支付宝发出的合法消息

getPublicKeyStr ( string Path ) : string

从文件读取公钥转公钥字符串

Private Methods

Method Description
GetPreSignStr ( string>.SortedDictionary inputPara ) : string

获取待签名字符串(调试用)

GetResponseTxt ( string notify_id ) : string

获取是否是支付宝服务器发来的请求的验证结果

GetSignVeryfy ( string>.SortedDictionary inputPara, string sign ) : bool

获取返回时的签名验证结果

Get_Http ( string strUrl, int timeout ) : string

获取远程服务器ATN结果

Method Details

Notify() public method

构造函数 从配置文件中初始化变量
public Notify ( ) : System
return System

Verify() public method

验证消息是否是支付宝发出的合法消息
public Verify ( string>.SortedDictionary inputPara, string notify_id, string sign ) : bool
inputPara string>.SortedDictionary 通知返回参数数组
notify_id string 通知验证ID
sign string 支付宝生成的签名结果
return bool

getPublicKeyStr() public static method

从文件读取公钥转公钥字符串
public static getPublicKeyStr ( string Path ) : string
Path string 公钥文件路径
return string