Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/arduino/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用PHP对非托管按钮进行Paypal订阅检查_Php_Paypal_Subscription - Fatal编程技术网

使用PHP对非托管按钮进行Paypal订阅检查

使用PHP对非托管按钮进行Paypal订阅检查,php,paypal,subscription,Php,Paypal,Subscription,我在为我正在开发的Web应用程序实现定期付款时遇到了一个特殊的问题。我不能使用托管的paypal订阅按钮,因为支付金额是可变的。因此,我使用了一个非托管的解决方案,如下所示: <form action="https://www.sandbox.paypal.com/us/cgi-bin/webscr" method="post"> <input type="hidden" name="cmd" value="_xclick-subscriptions"> <inpu

我在为我正在开发的Web应用程序实现定期付款时遇到了一个特殊的问题。我不能使用托管的paypal订阅按钮,因为支付金额是可变的。因此,我使用了一个非托管的解决方案,如下所示:

<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检查谁付费,并根据这个cron生成内容

从互联网上的讨论可以看出,paypal没有为订阅发送txn_id。那么,我该如何检查用户是否在下个月支付了费用?
我想到的一件事是一个IPN侦听器,但它是否适用于非托管按钮?完全被这搞糊涂了。有人能给我指一下正确的方向吗?

IPN是个不错的选择。使用IPN,您的系统将在创建配置文件、配置文件再次向用户计费、配置文件取消或无法计费时收到通知。您还可以在配置文件每次收费时将交易id返回IPN。

完美!谢谢你引导我走上正确的道路。我最终使用了用于PHP的Paypal Digital Goods()类,您的回答引导我找到了它。已接受:-)@neg?为什么?这个问题是3年前发布的。。获得生命。