Can someone show me the "hello world" of Paypal IPN?
我想建立一个PayPal捐款箱,并使用他们的IPN协议来监测捐赠何时到来。文档非常复杂,充满了我不感兴趣的功能。是否有一个简短的代码片段 - 理想情况是在Python中 - 这说明如何连接到PayPal,永久循环,并且每次捐赠时都打印“刚刚获得5美元”?
Actually, with IPNs it's the other way around. PayPal posts a notification to your server via HTTP POST when a payment is made. You therefore need to make a CGI script or server that receives these posts, checks their validity, and processes them.
Probably the easiest sample code to look at for setting up an IPN processor is the PHP sample code at:
https://cms.paypal.com/cms_content/US/en_US/files/developer/IPN_PHP_41.txt
but there's a whole set of code snippets at:
https://github.com/paypal/ipn-code-samples
You shouldn't skip the official documentation because it covers how to administratively set up, and test, IPNs. It's at:
https://www.paypalobjects.com/webstatic/en_US/developer/docs/pdf/ipnguide.pdf
In particular, see chapters 2-4.
链接地址: http://www.djcxy.com/p/46604.html上一篇: Java消息服务和Haskell