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

推荐订阅源

腾讯CDC
Schneier on Security
Schneier on Security
B
Blog RSS Feed
aimingoo的专栏
aimingoo的专栏
P
Proofpoint News Feed
A
About on SuperTechFans
Recorded Future
Recorded Future
Recent Announcements
Recent Announcements
Microsoft Security Blog
Microsoft Security Blog
L
LangChain Blog
Hugging Face - Blog
Hugging Face - Blog
The GitHub Blog
The GitHub Blog
Google DeepMind News
Google DeepMind News
T
Tailwind CSS Blog
Vercel News
Vercel News
H
Hackread – Cybersecurity News, Data Breaches, AI and More
MyScale Blog
MyScale Blog
V2EX - 技术
V2EX - 技术
N
Netflix TechBlog - Medium
F
Fortinet All Blogs
V
Visual Studio Blog
Martin Fowler
Martin Fowler
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
博客园 - Franky
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
T
The Exploit Database - CXSecurity.com
F
Full Disclosure
Scott Helme
Scott Helme
H
Heimdal Security Blog
博客园 - 叶小钗
Google DeepMind News
Google DeepMind News
Cyberwarzone
Cyberwarzone
Application and Cybersecurity Blog
Application and Cybersecurity Blog
V
Vulnerabilities – Threatpost
Blog — PlanetScale
Blog — PlanetScale
Security Latest
Security Latest
WordPress大学
WordPress大学
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
T
Troy Hunt's Blog
S
SegmentFault 最新的问题
Forbes - Security
Forbes - Security
Jina AI
Jina AI
S
Securelist
小众软件
小众软件
Simon Willison's Weblog
Simon Willison's Weblog
J
Java Code Geeks
AWS News Blog
AWS News Blog
N
News and Events Feed by Topic
博客园 - 三生石上(FineUI控件)
量子位

博客园 - 深渊野鱼

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