我正在尝试集成在我的PHP应用程序的支付网关。为此,我使用了沙箱。但在付款后,状态显示为待定,尽管金额已从帐户中扣除。
我的代码如下:
<form name="frm" action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick" />
<input type="hidden" name="business" value="sri_1338363856_biz@gmail.com" />
<input type="hidden" name="amount" value="<?php echo get_plan_value($plan_id); ?>" />
<input type="hidden" name="no_shipping" value="1" />
<input type="hidden" name="no_note" value="1" />
<input type="hidden" name="currency_code" value="USD" />
<input type="hidden" name="lc" value="US" />
<input type="hidden" name="item_name" value="<?php echo get_plan_name_by_value($_REQUEST['bus_plan']) ?> Registration" />
<input type="hidden" name="bn" value="PP-BuyNowBF" />
<input type="hidden" name="return" value="http://localhost/uploaded_server_alert/backup/alertR/business/payments-over.php?last_id=<?php echo $lastId; ?>&agent_email=<?php echo $agent_email; ?>&username=<?php echo ($uname); ?>&contact_email=<?php echo $contact_email; ?>" />
<input type="hidden" name="rm" value="2" />
<input type="submit" border="0" name="submit" value="Order Now" alt="Make payments with PayPal - it's fast, free and secure!" class="additional_height" title="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>我该如何解决这个问题呢?
发布于 2012-08-17 15:47:09
这是因为Payment Review已启用。
在开发人员中心->测试帐户中将其更改为已禁用
发布于 2012-08-17 15:47:19
仔细检查您的IPN侦听器和IPN处理程序。
请看一些示例代码:
http://www.micahcarrick.com/paypal-ipn-with-php.html http://www.evoluted.net/thinktank/web-development/paypal-php-integration
发布于 2012-08-17 16:17:03
问题是你没有提到notify_url。notify_url是一个网址,在这里贝宝发送IPN用于商品价格,reciever_email,货币等认证,notify_url不应该是本地主机的网址,因为当你现在已经被重定向到贝宝的域名,在交易完成后,当贝宝尝试发送IPN点击时,它将获得本地主机的` ulr,而在贝宝上没有本地主机。
Write following input tag:
<input type="hidden" id="notify_url" name="notify_url" value="url of ipn listener"/>
in above tag replace value by your ipn listener url.https://stackoverflow.com/questions/12001582
复制相似问题