我需要使用 paypal 提供的沙箱测试订阅按钮。我有一个带有以下代码的按钮:
<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">
<input type="image" src="https://www.paypal.com/es_XC/i/btn/x-click-but6.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
<input type="hidden" name="cmd" value="_xclick-subscriptions">
<input type="hidden" name="business" value="cda.1_1350317871_biz@mymail.es">
<input type="hidden" name="item_name" value="Anuncio Premium">
<input type="hidden" name="item_number" value="SS-001">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="currency_code" value="EUR">
<input type="hidden" name="a3" value="3.00">
<input type="hidden" name="p3" value="1">
<input type="hidden" name="t3" value="D">
<input type="hidden" name="src" value="1">
<input type="hidden" name="sra" value="1">
<input type="hidden" name="no_shipping" value="1">
<input type="hidden" name="custom" value="<?php print $user->uid; ?>">
如您所见,我设置了 t3=D 和 p3=1 以强制 paypal 每分钟发送一次定期付款,如下所示: https://www.paypalobjects.com/en_US/ebook/PP_Sandbox_UserGuide/testing_recurringpayments.html
一切正常。我收到第一笔付款及其相应的 IPN,并在我的测试账户中创建了一个经常性付款资料。但是没有收到更多的经常性付款,所以我的问题是我是否做错了什么。我希望在短时间内收到定期付款,这样我就不必等待 1 天来测试我的网站。
谢谢
最佳答案
不幸的是,这个功能已经有一段时间没有用了,他们也知道了,但是它的优先级还不够高,无法修复它。
如果您需要测试基于定期付款的 IPN,我建议您设置一个简单的 HTML 表单,并将操作设置为您的 IPN 监听器 URL,然后添加一堆与您的名称和值相匹配的隐藏字段' d 期望从 IPN 得到。
这样您就可以在浏览器中直接提交给您的 IPN 监听器并在屏幕上查看错误。这也有助于故障排除。
请记住,执行此操作时,IPN 验证系统将失败,因为数据并非来自实际的 PayPal 系统。不过,您可以出于测试目的相应地处理它。
关于 Paypal 测试订阅按钮,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13002563/