我在将 PayPal 实现到网站时遇到了一些问题。我有一段时间没有使用它了,从那以后很多事情都发生了变化。
我遇到的问题是我明确指定不应提示用户输入他们的送货地址,但是,当选择“无 Paypal 帐户”选项时,无论如何都会询问送货信息。
我知道我应该问 PayPal,但这里的人更聪明、更友善。 =)
代码:
请注意:<input type="hidden" name="no_shipping" value="1">
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<!-- Identify your business so that you can collect the payments. -->
<input type="hidden" name="business" value="ventas@ziced.com">
<!-- Specify a Buy Now button. -->
<input type="hidden" name="cmd" value="_xclick">
<!-- Variables agregadas -->
<input type="hidden" name="notify_url" value="notify.php">
<input type="hidden" name="return" value="return.php">
<input type="hidden" name="cancel_return" value="cancel_return.php">
<input type="hidden" name="page_style" value="primary">
<input type="hidden" name="lc" value="EN">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="no_shipping" value="1">
<!-- Specify details about the item that buyers will purchase. -->
<input type="hidden" name="item_name" value="Ziced id:">
<input type="hidden" name="amount" value="10">
<input type="hidden" name="currency_code" value="EUR">
<input type="hidden" name="quantity" value="1">
<!-- Display the payment button. -->
<input type="image" name="submit" border="0"
src="https://www.paypal.com/en_US/i/btn/btn_buynow_LG.gif"
alt="PayPal - The safer, easier way to pay online">
<img alt="" border="0" width="1" height="1"
src="https://www.paypal.com/en_US/i/scr/pixel.gif" >
</form>
最佳答案
no_shipping=1
适用于送货地址。您在“访客结帐表”上为买家寻找的是账单地址。这总是需要的。
关于 Paypal 无送货变量不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7925532/