【发布时间】:2014-02-16 10:40:40
【问题描述】:
我在我的网站上使用贝宝支付网关进行支付。
在这里我想要一个功能,比如我可以发送我想购买的产品 ID 列表。 成功付款后,我想要所有这些 id,以便我可以更新我的数据。 我不能使用 IPN,因为它已经用于其他站点。
下面是我的 paypal html 表单。
<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="praveend06-facilitator@gmail.com">
<input type="hidden" name="item_name" value="PAYMENT REASON">
<input type="hidden" name="amount" value="10">
<input type="hidden" name="quantity" value="1">
<input type="hidden" name="no_shipping" value="0">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="lc" value="MX">
<input type="hidden" name="bn" value="PP-BuyNowBF">
<input type="hidden" name="notify_url" value="http://localhost/paypal/notify.php">
<input type="hidden" name="return" value="http://localhost/paypal/success.php">
<input type="hidden" name="rm" value="2">
<input type="hidden" name="cbt" value="Return to The Store">
<input type="hidden" name="cancel_return" value="http://localhost/paypal/fail.php">
<input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but6.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>
我在success.php中写了下面的代码 但它返回空白数组。即使我没有得到交易ID。
请帮助我实现这一目标。谢谢
【问题讨论】:
-
我认为你不能使用localhost。您必须将其上传到服务器并尝试。
-
它在本地主机上工作正常。我的系统已连接互联网。唯一的问题是获取帖子数据。