这是一个关于以下问题的后续提问: PHP: Easy way to start PayPal checkout?
我的问题是我指定了返回URL。然而,在使用PayPal支付后,我最终到达一个屏幕,上面显示:
您刚刚完成了付款。XXXX,您已经完成了付款。 此次支付的交易ID为:XXXXXXXXXXXX。
我们将向XX@XXXX.com发送确认电子邮件。此交易将显示为PAYPAL。
我需要让它不显示此屏幕,并直接转到返回URL。我已经完成以下操作:Go to PayPal account overview
实际上,这是我的整个表单:
- 设置“返回”变量
- 将“rm”变量设置为:2(根据指南=“使用POST方法将买家的浏览器重定向到返回URL,并包括所有付款变量”)
<form method="post" action="https://www.sandbox.paypal.com/cgi-bin/webscr"> <input type="hidden" value="_xclick" name="cmd"> <input type="hidden" value="onlinestore@thegreekmerchant.com" name="business"> <!-- <input type="hidden" name="undefined_quantity" value="1" /> --> <input type="hidden" value="Order at The Greek Merchant:<Br />Goldfish Flock BLG<br />" name="item_name"> <input type="hidden" value="NA" name="item_number"> <input type="hidden" value="22.16" name="amount"> <input type="hidden" value="5.17" name="shipping"> <input type="hidden" value="0" name="discount_amount"> <input type="hidden" value="0" name="no_shipping"> <input type="hidden" value="No comments" name="cn"> <input type="hidden" value="USD" name="currency_code"> <input type="hidden" value="http://XXX/XXX/XXX/paypal/return" name="return"> <input type="hidden" value="2" name="rm"> <input type="hidden" value="11255XXX" name="invoice"> <input type="hidden" value="US" name="lc"> <input type="hidden" value="PP-BuyNowBF" name="bn"> <input type="submit" value="Place Order!" name="finalizeOrder" id="finalizeOrder" class="submitButton"> </form>
有什么办法可以让它自动返回?或者,如何将支付结果返回到我的网站,以便我可以更新数据库?什么是IPN?