5

我尝试通过 PayPal 按钮创建捐赠并添加带有金额的自定义选择。我试图添加这样的东西:

<label for="amount">Select the amount you wish to donate:</label>
<input type="hidden" name="currency_code" value="EUR" />
<select id="amount" name="amount">
  <option value="25.00">€25.00</option>
  <option value="35.00">€35.00</option>
  <option value="50.00">€50.00</option>
  <option value="75.00">€75.00</option>
  <option value="100.00">€100.00</option>
</select>

但 PayPal 根本没有收到选定的价值。我错过了什么?我应该将哪些自定义变量放入按钮生成器表单中?

4

1 回答 1

8

这段代码对我有用:

<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="my@email.com">

<!-- Specify a Donate button. -->
<input type="hidden" name="cmd" value="_donations">

<!-- Specify details about the contribution -->
<input type="hidden" name="item_name" value="Donation">
<input type="hidden" name="item_number" value="Donation"> 
<select name="amount"><option value="10.00">€10.00</option><option value="25.00">€25.00</option></select>
<input type="hidden" name="currency_code" value="EUR">

<!-- Display the payment button. -->
<input type="image" name="submit" border="0" src="https://www.paypal.com/en_US/i/btn/btn_donate_LG.gif" alt="PayPal - The safer, easier way to pay online">
</form>

参考

于 2012-06-19T17:09:38.893 回答