Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Select amount with Paypal donation button

Tags:

paypal

I try to create donate via PayPal button and add custom select with amount. I tried to add something like this:

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

but PayPal simply doesn't recieve selected value. What I'm missing? What custom variables should I put into button generator form?

like image 611
arekstasiewicz Avatar asked Jun 19 '12 16:06

arekstasiewicz


People also ask

How does donate button work on PayPal?

Accept donations securely via a campaign, a button on your website, or a link on social media. We'll host your page and process the donations—no technical skills required. Easily add a logo and imagery to your donation page to showcase your brand. No setup or cancellation fees.


1 Answers

This code works for me:

<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

like image 123
Kermit Avatar answered Oct 11 '22 04:10

Kermit