我只是在创建一个网站,在其中销售一些东西。网站按说明工作:
- 客户确实选择了一种产品
- 客户点击链接购买产品,该链接将直接重定向到贝宝
我现在想做的是,在付款肯定成功后,我想在数据库中写下客户的贝宝电子邮件地址,如下所示:
|id | paypal |已批准|
|1|j@d.com|是|
我到底怎么能意识到这一点?必须将客户重定向到";结账页面";然后在那里执行PHP代码来读取数据?
有人能帮我吗?:)谢谢
您正在寻找即时支付通知。Instant Payment Notification (IPN) is a message service that automatically notifies merchants of events related to PayPal transactions. Merchants can use it to automate back-office and administrative functions, like automatically fulfilling orders and providing customers with order status.
因此,每次交易后,PayPal都会向您的服务器侦听器文件发送通知,其中包括买家、交易信息,您可以使用这些信息存储在数据库中。
您可以在此处下载示例php代码