Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PayPal Donation Button: Adding 'Amount' and 'Currency'

Tags:

paypal

I have the "normal" PayPal donation button. I want to add two multiple choice fields: Amount and Currency as the image below. So the user dont need to put the amount of the PayPal website:

enter image description here

This is the 'normal paypal donation button code':

<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="XXXXXXXXXXXXX">
<input type="image" src="https://www.paypalobjects.com/es_ES/ES/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal.">
<img alt="" border="0" src="https://www.paypalobjects.com/es_ES/i/scr/pixel.gif" width="1" height="1">
</form>

I have read on this post that you have to add the following lines, but I dont know where or how to do it. It doesnt work.

<label for="amount">Select the amount you wish to donate:</label> 
<select name="amount" id="amount">
<option value="5.00">$5.00</option>
<option value="25.00">$25.00</option>
<option value="50.00">$50.00</option>
</select>

Can anyone tell me how to do it correctly? Thanks!

like image 560
user963658 Avatar asked Feb 03 '12 20:02

user963658


People also ask

How does a PayPal donation work?

When a donor gives through PayPal, the funds quickly arrive in your PayPal account. From there, you can transfer them to your organization's bank account, free of charge. You can track every donor, and every donation. See how quickly your fundraising adds up.

How long does a donation take to show on PayPal?

Donations through PayPal are automatically deposited into your PayPal account immediately after it occurs. You can manually transfer funds from PayPal into your bank account by logging into www.paypal.com. This process typically takes 3-5 business days to settle in your bank account.


1 Answers

Hosted PayPal buttons allow you to send option variables, but when not for a donation button, be sure that the option values (for drop downs / text boxes) match exactly what is saved in your PayPal account. i.e. do not edit drop down boxes PayPal creates for you.

As for adding drop down boxes / text boxes to a hosted button, perfectly possible, as long as they do not alter the payment amount. So, for creating a hosted donation button that allows you to edit the amount, I advise the following:

  1. Create a buy now button on PayPal, adding the drop down boxes and/or text boxes you wish to add to your donation button. Create this button as if you were creating your donation button, because that is exactly what we will be doing, changing this button into a donation button.
  2. Copy the the whole buy now button HTML code, paste into notepad, or an editor where you can use 'find and replace'.
  3. Replace all occurances of 'buynow' with 'donate' (This usually just changes the image). Also, replace '_xclick' with '_donations'. (to tell PayPal how to generate the checkout page)

You now have a donation button

like image 155
SgtPooki Avatar answered Sep 19 '22 06:09

SgtPooki