【问题标题】:Paypal - IPN integration with subcription using PHP classPaypal - 使用 PHP 类与订阅的 IPN 集成
【发布时间】:2011-07-14 02:05:51
【问题描述】:

我正在使用此处提供的 Paypal 课程:
http://www.micahcarrick.com/php-paypal-ipn-integration-class.html
由 Micah Carrick 为 paypal 与 IPN 集成。

现在,我希望用户订阅并且我想要处理订阅/取消订阅 IPN。 这是当前代码:

case 'ipn': 

if ($p->validate_ipn()) {

     // Payment has been recieved and IPN is verified.  This is where you
     // update your database to activate or process the order, or setup
     // the database with the user's order details, email an administrator,
     // etc.  You can access a slew of information via the ipn_data() array.

我如何检测事件是“订阅”、“取消订阅”还是其他?

提前致谢,
快乐哈迪克

【问题讨论】:

    标签: php paypal subscription paypal-ipn


    【解决方案1】:

    您可以通过请求中可用的txn_type 参数来判断事务的类型。请参阅the various types 的 PayPal 手册。

    subscr_signupsubscr_cancel 分别表示订阅和取消订阅。

    【讨论】:

      猜你喜欢
      • 2020-04-29
      • 2010-11-06
      • 2011-09-01
      • 2011-06-08
      • 2012-01-23
      • 2012-12-25
      • 2014-11-08
      • 1970-01-01
      相关资源
      最近更新 更多