【问题标题】:Paypal Subscription check with PHP for non hosted button使用 PHP 对非托管按钮进行 Paypal 订阅检查
【发布时间】:2013-08-07 05:56:06
【问题描述】:

我在为我正在开发的 web 应用程序实施定期付款时遇到了一个特殊问题。我无法使用托管的贝宝订阅按钮,因为付款金额是可变的。所以,我使用了类似这样的非托管解决方案:

<form action="https://www.sandbox.paypal.com/us/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick-subscriptions">
<input type="hidden" name="business" value="business@email.com">
<input type="hidden" name="item_name" value="Some item"/>
<input type="hidden" name="return" value="return_url">
<input type="hidden" name="cancel_return" value="cancel_url">
<input type="hidden" name="notify_url" value="notification_url">

<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="no_shipping" value="1">
<input type="image" src="http://www.paypal.com/en_US/i/btn/btn_subscribe_LG.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
<input type="hidden" name="a3" value="variable_amount">
<input type="hidden" name="p3" value="1"> 
<input type="hidden" name="t3" value="M">
<input type="hidden" name="rm" value="2">
<input type="hidden" name="src" value="1">
<input type="hidden" name="sra" value="1">
<input type="hidden" name="custom" value="planid1,planid2"/>
</form>

现在,我需要使用 cron 每个月检查谁已付款,并据此生成内容。

从整个互联网的讨论来看,很明显,paypal 不会发送订阅的 txn_id。那么,我应该如何检查用户是否在下个月付款? 我想到的一件事是 IPN 侦听器,但它可以与非托管按钮一起使用吗?对此完全感到困惑。有人能指出我正确的方向吗?

【问题讨论】:

  • @Negvoter?为什么?这个问题是在 3 年前发布的。获得生命。

标签: php paypal subscription


【解决方案1】:

IPN 将是要走的路。使用 IPN,您的系统会在配置文件创建、配置文件再次向用户收费、配置文件被取消或收费失败时收到通知。每次向配置文件收费时,您还可以在 IPN 中获取交易 ID。

【讨论】:

猜你喜欢
  • 2018-09-28
  • 2015-11-06
  • 2012-06-27
  • 1970-01-01
  • 2016-09-29
  • 2012-10-11
  • 2020-11-19
  • 2017-02-25
  • 2012-08-03
相关资源
最近更新 更多