2012-06-19 100 views
4

我嘗試通過PayPal按鈕創建捐贈並添加自定義選擇和金額。 我嘗試添加像這樣:用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> 

,但貝寶根本不接受她選擇值。 我失蹤了什麼? 應該將哪些自定義變量放入按鈕生成器窗體中?

回答

7

此代碼的工作對我來說:

<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="[email protected]"> 

<!-- 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> 

Reference

+0

謝謝。它完美的作品。我猜錯誤是由輸入「hosted_button_id」引起的 – arekstasiewicz

相關問題