惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Attack and Defense Labs
Attack and Defense Labs
T
Threatpost
C
Cybersecurity and Infrastructure Security Agency CISA
H
Hackread – Cybersecurity News, Data Breaches, AI and More
I
Intezer
C
Cyber Attacks, Cyber Crime and Cyber Security
The Register - Security
The Register - Security
量子位
Security Latest
Security Latest
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
大猫的无限游戏
大猫的无限游戏
小众软件
小众软件
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
C
CXSECURITY Database RSS Feed - CXSecurity.com
MyScale Blog
MyScale Blog
J
Java Code Geeks
Apple Machine Learning Research
Apple Machine Learning Research
Google DeepMind News
Google DeepMind News
WordPress大学
WordPress大学
Spread Privacy
Spread Privacy
Jina AI
Jina AI
博客园 - 【当耐特】
P
Palo Alto Networks Blog
Last Week in AI
Last Week in AI
SecWiki News
SecWiki News
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
G
GRAHAM CLULEY
宝玉的分享
宝玉的分享
Hacker News - Newest:
Hacker News - Newest: "LLM"
T
The Blog of Author Tim Ferriss
V
Vulnerabilities – Threatpost
有赞技术团队
有赞技术团队
T
Tor Project blog
H
Hacker News: Front Page
A
Arctic Wolf
NISL@THU
NISL@THU
A
About on SuperTechFans
云风的 BLOG
云风的 BLOG
Engineering at Meta
Engineering at Meta
V
V2EX
N
News and Events Feed by Topic
Webroot Blog
Webroot Blog
Know Your Adversary
Know Your Adversary
P
Privacy International News Feed
I
InfoQ
D
Docker
L
LINUX DO - 最新话题
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
U
Unit 42

博客园 - 深渊野鱼

Framework7 链接重新回来之后,页面数据不重新获取,或者pageinit不重新执行 海关单一窗口程序出现网络/MQ问题后自动修复处理 IE JQuery 多Tab iframe 关闭Tab导致光标丢失 win7 64bit 尝试加载 Oracle 客户端库时引发 BadImageFormatException。如果在安装 32 位 Oracle 客户端组件的情况下以 64 位模式运行,将出现此问题 Commitment definition *N not valid for open XXX CPF4326 排查 PowerDesigner之逆向工程SQLServer注意事项 天敏SDK2500开发小计 Oracle在windows2003按星期几export的bat文件 - 深渊野鱼 - 博客园 OracleClient之诡异现象 虚拟主机权限之log4net Norton我错怪了你啊~~ 两个iFrame同时打开 - 深渊野鱼 - 博客园 如何向远程系统提交命令? RUNRMTCMD命令使用 OS/400与UNIX功能相似的部分命令 关于文件的ShareODP和USROPN 在5250上面实现复制粘贴 如何以某一关键字快速搜索AS/400 中的Message file 如何查看QTEMP的内容?可以查看别人的QTEMP的
Paypal IPN
深渊野鱼 · 2010-06-02 · via 博客园 - 深渊野鱼

网上已经有很多paypay ipn的文章了,只不过他们都是用paypal的购物车。因为我只是用来作为一个付款渠道,因此,我得先生成订单,然后引导客户去paypal付款。

1.转去付款页面

代码

    <form id="payForm" method="post" action="<%Response.Write(URL);%>">
        
<input type="hidden" name="cmd" value="<%Response.Write(cmd);%>" />
        
<input type="hidden" name="business" value="<%Response.Write(business);%>" />
        
<input type="hidden" name="item_name" value="<%Response.Write(item_name);%>" /> 
        
<input type="hidden" name="amount" value="<%Response.Write(amount);%>" />
        
<input type="hidden" name="no_shipping" value="<%Response.Write(no_shipping);%>" />
        
<input type="hidden" name="return" value="<%Response.Write(return_url);%>" />
        
<input type="hidden" name="rm" value="<%Response.Write(rm);%>" />
        
<input type="hidden" name="notify_url" value="<%Response.Write(notify_url);%>" />
        
<input type="hidden" name="cancel_return" value="<%Response.Write(cancel_url);%>" />
        
<input type="hidden" name="currency_code" value="<%Response.Write(currency_code);%>" />
        
<input type="hidden" name="custom" value="<%Response.Write(request_id);%>" />
    
</form><script  type="text/javascript" language="javascript">
    document.forms[
"payForm"].submit();
    
</script>

url 就是付款的网址

notify_url用于paypal更新状态的网址,最好使用https,当然了http也行

return 用于返回的网址,个人觉得没啥太大用处,还不如指回到订单页面

custom用于传递特殊的值,paypal回调notify_url的时候会传递,可以验证请求有效性,是隐藏传递的。

2.付款确认的页面

 将参数加上"&cmd=_notify-validate"回传回付款网址

如果response的值是VERIFIED的时候,表示请求是从paypal出来的

然后用他的request里面的变量判断数据是否正确,比如金额,产品价格、收款人等等

如果这些都对的话,那么就放心的更新订单的付款状态了。

3.paypal只有在确认付款后, payment_status才会等于Completed