PayPal捐款按钮,价格选项下拉发送空/零值

时间:2017-06-02 19:45:12

标签: paypal

我正在尝试生成一个PayPal捐赠按钮,价格下降,是 - 否下拉。按钮工作正常,但数量/价格是空的。以下是从PayPal网站生成的HTML。有人可以帮忙吗?谢谢!

<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_donations">
<input type="hidden" name="business" value="my@email.com">
<input type="hidden" name="lc" value="GB">
<input type="hidden" name="item_name" value="IICC">
<input type="hidden" name="item_number" value="GT7">
<input type="hidden" name="button_subtype" value="services">
<input type="hidden" name="no_note" value="0">
<input type="hidden" name="no_shipping" value="2">
<input type="hidden" name="rm" value="1">
<input type="hidden" name="return" value="http://website.org/">
<input type="hidden" name="cancel_return" value="http://website.org/">
<input type="hidden" name="bn" value="PP-BuyNowBF:btn_buynowCC_LG.gif:NonHosted">
<table>
<tr><td><input type="hidden" name="on0" value="Select a donation category">Select a donation category</td></tr><tr><td><select name="os0">
<option value="Red">Red £50.00 GBP</option>
<option value="Bronze">Bronze £100.00 GBP</option>
<option value="Silver">Silver £200.00 GBP</option>
<option value="Gold">Gold £300.00 GBP</option>
<option value="Platinum">Platinum £500.00 GBP</option>
<option value="Diamond">Diamond £1,000.00 GBP</option>
</select> </td></tr>
<tr><td><input type="hidden" name="on1" value="Do you agree?">Do you agree?</td></tr><tr><td><select name="os1">
<option value="NO">NO</option>
<option value="YES">YES</option>
</select> </td></tr>
</table>
<input type="hidden" name="currency_code" value="GBP">
<input type="hidden" name="option_select0" value="Red">
<input type="hidden" name="option_amount0" value="50.00">
<input type="hidden" name="option_select1" value="Bronze">
<input type="hidden" name="option_amount1" value="100.00">
<input type="hidden" name="option_select2" value="Silver">
<input type="hidden" name="option_amount2" value="200.00">
<input type="hidden" name="option_select3" value="Gold">
<input type="hidden" name="option_amount3" value="300.00">
<input type="hidden" name="option_select4" value="Platinum">
<input type="hidden" name="option_amount4" value="500.00">
<input type="hidden" name="option_select5" value="Diamond">
<input type="hidden" name="option_amount5" value="1000.00">
<input type="hidden" name="option_index" value="0">
<input type="image" src="https://www.paypalobjects.com/en_US/GB/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal – The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypalobjects.com/en_GB/i/scr/pixel.gif" width="1" height="1">
</form>

1 个答案:

答案 0 :(得分:0)

AFAIK,捐赠按钮(cmd = _donations)不支持option_index。您可以尝试使用BuyNow按钮(cmd = _xclick),或将金额字段更改为下拉菜单,例如

<select name="amount">
	<option value="50">Red</option>
	<option value="100">Bronze</option>
	<option value="200">Silver</option>
	...
</select>