Skip to content

支付宝支付后的异步回调(仅支持新版支付)

Notifications You must be signed in to change notification settings

fdstar/AlipayAsyncNotify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

AlipayAsyncNotify

支付宝新版支付支付后的异步回调,对应 面对面扫码支付、App支付、手机网站支付、PC支付

.NET版本支持

目前支持以下版本:.NET45.NET Standard 2.0

解决方案构成说明

AopSdk为支付宝提供的Net版服务端Sdk,下载地址为: https://docs.open.alipay.com/54/103419/
AlipayAsyncNotify为支付的异步回调辅助类,目前已将加解密相关代码复制到AlipayAsyncNotify,可见性为internal以保证不会与AopSdk冲突,所以实际已不再依赖AopSdk,支持Net45+、NetStandard2.0
AlipayAsyncNotifyWeb为支付异步回调项目例子,包含MVC及WebApi的接入例子

修改及测试说明

要想正确运行Web项目,需先修改配置信息,具体位置如下:AlipayAsyncNotifyWeb\Utils\NotifyHelper,修改文件内的第14、15行,如是沙箱测试,则还需修改第16行的验证地址

public static string AppId = "你的AppId";
public static string AlipayPublicKey = "你的支付宝公钥";
public static string MapiUrl = "https://mapi.alipay.com/gateway.do";

修改完成后,可以在VS中调试
http://localhost:52192/AlipayMvcNotify/Notify 测试MVC下的支付宝异步通知
http://localhost:52192/api/AlipayWebApiNotify 测试WebApi下的支付宝异步通知
PS:端口号请自行修改

About

支付宝支付后的异步回调(仅支持新版支付)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages