Donate Button with More Than 10 Dropdown Menu Options

mjulep1920
Contributor
Contributor

I am working on the donation webpage for my state-wide organization. We have 20 affiliated organizations around the state for whom we process donations. I found some code that enabled me to create a dropdown menu so that donors could earmark their donation for one of these local organizations. (PayPal only allows for 10 options in their customization, but I need 20 options.) I have just discovered that this will only work once a day. After one person has used the dropdown menu option successfully, any subsequent visitors will have their donation default back to our state fund. Has anyone else attempted this with any success? Or have some kind of work-around?

Login to Me Too
1 ACCEPTED SOLUTION

Accepted Solutions
Solved

mjulep1920
Contributor
Contributor

This code fixed my issue:

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>

<title>Button Example Code</title>

<!-- START META TAG SECTION -->
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<meta http-equiv="Content-Language" content="en">
<!-- END META TAG SECTION -->

 

</head>

<body>

<!-- START SAMPLE CODE SECTION -->


<!-- PARAGRAPH 1 -->
Donation Examples

<br><br>

Using Options.

<br><br>

Widget Fund

<br><br>


<!-- Start of Form -->
<form target="_self" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<!-- If using a Business or Company Logo Graphic, include the "cpp_header_image" variable. -->
<input type="hidden" name="cpp_header_image" value="https://yourwebsite.com/logo.jpg">
<input type="hidden" name="cmd" value="_donations">
<!-- Replace "business" value with your PayPal Email Address or your Merchant Account ID -->
<input type="hidden" name="business" value="your email address">
<input type="hidden" name="item_name">
<input type="hidden" name="item_number" value="WF-1001">
<input type="hidden" name="tax" value="0">
<input type="hidden" name="no_shipping" value="2">
<input type="hidden" name="lc" value="US">
<input type="hidden" name="currency_code" value="USD">
<!-- Replace value with the web page you want the customer to return to after a successful transaction -->
<input type="hidden" name="return" value="http://www.yourwebsite.com/ThankYou.html">
<!-- Replace value with the web page you want the customer to return to after item cancellation -->
<input type="hidden" name="cancel_return" value="http://www.yourwebsite.com/Cancel.html">
<input type="hidden" name="bn" value="PP-DonationsBF:btn_donateCC_LG.gif:NonHosted">
<input type="hidden" name="button_subtype" value="products">
<input type="hidden" name="no_note" value="0">
<input type="hidden" name="cn" value="Add special instructions to the seller:">
<!-- -->
Please enter your donation amount: (Example - 10.00)
<br><br>
<!-- <input type="hidden" name="item_name" value="Our purpose is something " /> -->

<input name="on0" type="hidden" value="Donation for XXX" />
<input name="os0" type="hidden" value="Donation for XXX" />
<select name="item_name">
<option value="Widget Fund Donation - Good Will" selected>Good Will</option>
<option value="Widget Fund Donation - United Way">United Way</option>
<option value="Widget Fund Donation - Boys and Girls Club">Boys and Girls Club</option>
<option value="Widget Fund Donation - West Side Shelter">West Side Shelter</option>
<option value="Widget Fund Donation - Pets and Vets">Pets and Vets</option>
</select>
<br><br>
<input type="hidden" name="on0" value="In Memory Of">In Memory of - Enter Name:&nbsp;&nbsp;
<input type="text" name="os0">
<br><br>
<input type="hidden" name="on1" value="Tax Deductable Email Receipt Requested">Would you like a Tax Deductable Email Receipt?&nbsp;&nbsp;&nbsp;
<INPUT NAME="os1" type="radio" value="Yes" checked>Yes
&nbsp;&nbsp;&nbsp;
<INPUT NAME="os1" type="radio" value="No Thanks">No Thanks
<br><br>
<!-- -->
<input type="image" src="https://www.paypalobjects.com/en_US/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_US/i/scr/pixel.gif" width="1" height="1">
</form>
<!-- End of Form -->

View solution in original post

Login to Me Too
3 REPLIES 3

sharpiemarker
Esteemed Advisor
Esteemed Advisor

@mjulep1920 

 

The most options you can do is 10. Instead make 20 separate buttons, each for a different affiliate. Then paste them on your page in a html table with name of each affiliate above the button. For each button you can add Item name and unique Item Number to help you keep track of the donations. For item name, you can enter name of first affiliate and some kind of code, AFF01, AFF02 and so on. After you make the first one, click Action > Create Similar button and go in and edit the item name and Item number.

 

Can use the regular style buy now/pay now button.

https://developer.paypal.com/docs/classic/paypal-payments-standard/integration-guide/buy_now_step_1/

You can elect to not require a shipping address in the button options step 3.

 

Or you can use the donation style button for each affiliate.

https://developer.paypal.com/docs/classic/paypal-payments-standard/integration-guide/donate_step_1/#...


Kudos & Solved are greatly appreciated. 🙂
Login to Me Too

mjulep1920
Contributor
Contributor

20 Donate buttons seems visually overwhelming. The current code that I am using works, but just once a day. It seems like it ought to be tweakable, but I don't know how. It sounds like payment buttons have the option to generate code for non-hosted buttons, that can then be edited to add more than 10 items. It seems like there should be a way to do something comparable to with donate buttons. :>)

Login to Me Too
Solved

mjulep1920
Contributor
Contributor

This code fixed my issue:

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>

<title>Button Example Code</title>

<!-- START META TAG SECTION -->
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<meta http-equiv="Content-Language" content="en">
<!-- END META TAG SECTION -->

 

</head>

<body>

<!-- START SAMPLE CODE SECTION -->


<!-- PARAGRAPH 1 -->
Donation Examples

<br><br>

Using Options.

<br><br>

Widget Fund

<br><br>


<!-- Start of Form -->
<form target="_self" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<!-- If using a Business or Company Logo Graphic, include the "cpp_header_image" variable. -->
<input type="hidden" name="cpp_header_image" value="https://yourwebsite.com/logo.jpg">
<input type="hidden" name="cmd" value="_donations">
<!-- Replace "business" value with your PayPal Email Address or your Merchant Account ID -->
<input type="hidden" name="business" value="your email address">
<input type="hidden" name="item_name">
<input type="hidden" name="item_number" value="WF-1001">
<input type="hidden" name="tax" value="0">
<input type="hidden" name="no_shipping" value="2">
<input type="hidden" name="lc" value="US">
<input type="hidden" name="currency_code" value="USD">
<!-- Replace value with the web page you want the customer to return to after a successful transaction -->
<input type="hidden" name="return" value="http://www.yourwebsite.com/ThankYou.html">
<!-- Replace value with the web page you want the customer to return to after item cancellation -->
<input type="hidden" name="cancel_return" value="http://www.yourwebsite.com/Cancel.html">
<input type="hidden" name="bn" value="PP-DonationsBF:btn_donateCC_LG.gif:NonHosted">
<input type="hidden" name="button_subtype" value="products">
<input type="hidden" name="no_note" value="0">
<input type="hidden" name="cn" value="Add special instructions to the seller:">
<!-- -->
Please enter your donation amount: (Example - 10.00)
<br><br>
<!-- <input type="hidden" name="item_name" value="Our purpose is something " /> -->

<input name="on0" type="hidden" value="Donation for XXX" />
<input name="os0" type="hidden" value="Donation for XXX" />
<select name="item_name">
<option value="Widget Fund Donation - Good Will" selected>Good Will</option>
<option value="Widget Fund Donation - United Way">United Way</option>
<option value="Widget Fund Donation - Boys and Girls Club">Boys and Girls Club</option>
<option value="Widget Fund Donation - West Side Shelter">West Side Shelter</option>
<option value="Widget Fund Donation - Pets and Vets">Pets and Vets</option>
</select>
<br><br>
<input type="hidden" name="on0" value="In Memory Of">In Memory of - Enter Name:&nbsp;&nbsp;
<input type="text" name="os0">
<br><br>
<input type="hidden" name="on1" value="Tax Deductable Email Receipt Requested">Would you like a Tax Deductable Email Receipt?&nbsp;&nbsp;&nbsp;
<INPUT NAME="os1" type="radio" value="Yes" checked>Yes
&nbsp;&nbsp;&nbsp;
<INPUT NAME="os1" type="radio" value="No Thanks">No Thanks
<br><br>
<!-- -->
<input type="image" src="https://www.paypalobjects.com/en_US/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_US/i/scr/pixel.gif" width="1" height="1">
</form>
<!-- End of Form -->

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.