PHP验证贝宝捐赠
我如何验证贝宝捐赠?
在用户面板中,我有一个捐赠按钮.一旦有人真的捐赠了,我就想为他做点什么.但我不知道如何检查用户是否真的捐赠了或只是点击了捐赠按钮.
In the user panel I have a donate button. And once someone actually donates I want to do something to him. But I do not know how to check if the user actually donated or just clicked the donate button.
推荐答案
查看 Paypal 的 IPN (即时付款通知)
Look in to Paypal's IPN (Instant Payment Notification)
当有人向您的 Paypal 帐户付款或捐款时,Paypal 会向您的网络服务器发送一封包含所有付款详细信息的邮件.然后,您可以向 Paypal 发送消息以确保付款是真实的...
When someone makes a payment or donation to your Paypal account, Paypal will send a post message to your web server with all the payment details. You can then send a message back to Paypal to make sure that the payment was real...
甚至还有一些代码示例 在 paypal 的网站上.包括一个用于 PHP 的.
There are even some code examples on paypal's website. Including one for PHP.
请注意,您必须先启用 IPN 并在您的贝宝帐户中定义回调 URL,然后才能开始使用 IPN.
Note you have to enable IPN and define the call back URL in your paypal account before you can start using IPN.
相关文章