【问题标题】:Check if payment was successful via PHP and/or JQuery?(PayPal API)检查是否通过 PHP 和/或 JQuery 成功付款?(PayPal API)
【发布时间】:2015-06-06 03:20:49
【问题描述】:

我只是在创建一个我在其中销售东西的网站。该网站按描述工作:

  1. 客户确实选择了产品
  2. 客户点击链接购买产品,该产品将直接重定向到贝宝。

我现在要做的是,在付款肯定成功后,我想在数据库中写下客户的paypal-email地址,如下所示:

|编号 |贝宝 |批准 |

| 1 | j@d.com |是的|

我究竟是如何意识到这一点的?之后是否必须将客户重定向到“结帐页面”并在那里执行 PHP 代码以读取数据?

有人可以帮我吗? :) 谢谢!

【问题讨论】:

    标签: php json api paypal


    【解决方案1】:

    您正在寻找Instant Payment NotificationsInstant 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代码here

    【讨论】:

      猜你喜欢
      • 2013-01-17
      • 2011-07-29
      • 2014-02-21
      • 2014-09-23
      • 2014-01-18
      • 1970-01-01
      • 2018-08-22
      • 2016-12-17
      • 2014-10-09
      相关资源
      最近更新 更多