Payment button, code for more versatile payment option?

MysticPeace
Contributor
Contributor

Hi,

I have been doing some testing on my organization's donation page (https://www.livingmiraclescenter.org/donations.html). Currently the service that provides us the payment options is First Data; this company is changing the way they work and in order for us to continue using it, we would need to completely overhaul our donations pages across our websites. So, we're investigating how versatile and customizable PayPal buttons are. If you check the link, you see that our current options through First Data are multifaceted. In one simple transaction people may choose a preset amount to donate, pick their own amount, AND choose recurring payment options with the donation amount they chose or choose not to use that option. So, in one payment form we’re able to offer one-time donations as well as recurring ones.

I would like to know if there is any way that PayPal buttons may provide the same versatility. We've been thinking to switch over entirely to PayPal and do away with First Data, but the one thing that's held us back is the little customization that has been offered when making PayPal buttons.

I've played with different code for payment buttons, however been getting error messages ("Invalid Regular period. You must specify valid values for the A3, P3, and T3 parameters for a subscription") each time I actually try out the newly created buttons on the website. The codes I've used are, one:

<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="SACSLVL35UTAS">
<input type="hidden" name="lc" value="US">
<input type="hidden" name="item_name" value="Donate to My Organization">
<input type="hidden" name="item_number" value="1234">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="no_shipping" value="2">
<input type="hidden" name="src" value="1">
<input type="hidden" name="p3" value="1">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="bn" value="PP-SubscriptionsBF:btn_subscribeCC_LG.gif:NonHosted">
<table>
<tr><td>When would you like this to Recur?</td></tr><tr><td><select name="t3">
<option value="D">Daily</option>
<option value="M">Monthly</option>
<option value="Y">Yearly</option>
</select> </td></tr>
<tr><td>How many times would you like this to recur? (including this payment)</td></tr><tr><td><select name="srt">
<option value="0">Never End</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
</select> </td></tr>
<tr><td>Enter Your Donation Amount</td></tr>
<tr><td><input type="text" name="a3" size="4" maxlength="60"></td></tr>
</table>
<input type="image" src="https://www.paypal.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.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>

and two:

<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="_xclick-subscriptions">
<!-- <input type="hidden" name="redirect_cmd" value="_xclick-subscriptions"> -->
<!-- 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" value="Widget Fund Donation">
<input type="hidden" name="item_number" value="WFD-1002">
<input type="hidden" name="no_note" value="1">
<!-- no_shipping value 2 needed to send the free gift -->
<input type="hidden" name="no_shipping" value="2">
<input type="hidden" name="tax" value="0">
<input type="hidden" name="lc" value="US">
<input type="hidden" name="currency_code" value="USD">
<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:">
<input type="hidden" name="bn" value="PP-BuyNowBF:btn_buynow_LG.gif:NonHosted">
<!-- 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">

<!--  -->
Enter the amount you would like to donate:&nbsp;
<!-- a3, Required, Regular Subscription Price -->
<input type="text" name="a3" size="4" maxlength="7">

<br><br>

<!-- src, Optional, Recurring Payments, 0 no recur, 1 payments recur -->
<input type="hidden" name="src" value="1">

<!--  -->
Select the length of the desired Billing Cycle:&nbsp;
<!-- p3, Required, Duration based on the value of t3 -->
<select name="p3">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="15">15</option>
<option value="30">30</option>
</select>

<br><br>

<!--  -->
Select how often you would like to Donate:&nbsp;
<!-- t3, Required, Subscription Units D W M Y, -->
<select name="t3">
<option value="D">Day(s)</option>
<option value="W">Week(s)</option>
<option value="M">Month(s)</option>
<option value="Y">Year(s)</option>
</select>

<br><br>

<!--  -->
Select the number of Donation Payments you would like to make:
<br><br>
<!-- srt, Optional, Recurring Times, must be used with src -->
<select name="srt">
<option value="">Until Canceled</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="6">6</option>
<option value="12">12</option>
<option value="18">18</option>
<option value="24">24</option>
<option value="36">36</option>
</select>

<!-- sra, Optional, Reattempt on failure 2 more time, value 0 or 1, if 0 no reattempt -->
<input type="hidden" name="sra" value="1">

<br><br><br>

Thank you for your Donation,
<br><br>
Please Select your Free Gift:&nbsp;&nbsp;
<input type="hidden" name="on0" value="Free Gift Choice">
<select name="os0">
<option value="Solar Calculator">Solar Calculator</option>
<option value="Key Chain Light">Key Chain Light</option>
</select>

<br><br><br>

<!--  -->
<input type="hidden" name="bn" value="PP-SubscriptionsBF:btn_donateCC_LG.gif:NonHosted">
<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>

Thank you for any insight, technical help, and wisdom you can provide.

Thanks,
Jutta

Login to Me Too
1 ACCEPTED SOLUTION

Accepted Solutions
Solved

snowshoe
Frequent Advisor
Frequent Advisor

As the scope of this forum does not get too technical, you got the best example I can provide.  All I can suggest is, if you're totally up in the air about things, you can always seek the assistance of a Certified Developer. 

View solution in original post

Login to Me Too
8 REPLIES 8

snowshoe
Frequent Advisor
Frequent Advisor

Here's one example you can tinker with:

 

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

Make a One Time Donation or setup a Donation Schedule like a Subscription.

<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="_xclick-subscriptions">
<!-- <input type="hidden" name="redirect_cmd" value="_xclick-subscriptions"> -->
<!-- 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" value="Widget Fund Donation">
<input type="hidden" name="item_number" value="WFD-1002">
<!-- no_shipping value 2 needed to send the free gift -->
<input type="hidden" name="no_shipping" value="2">
<input type="hidden" name="tax" value="0">
<input type="hidden" name="lc" value="US">
<input type="hidden" name="currency_code" value="USD">
<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:">
<input type="hidden" name="bn" value="PP-BuyNowBF:btn_buynow_LG.gif:NonHosted">
<!-- 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">

<!--  -->
Enter the amount you would like to donate:&nbsp;
<!-- a3, Required, Regular Subscription Price -->
<input type="text" name="a3" size="4" maxlength="7">

<br><br>

<!-- src, Optional, Recurring Payments, 0 no recur, 1 payments recur -->
<input type="hidden" name="src" value="1">

<!--  -->
Select the length of the desired Billing Cycle:&nbsp;
<!-- p3, Required, Duration based on the value of t3 -->
<select name="p3">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="15">15</option>
<option value="30">30</option>
</select>

<br><br>

<!--  -->
Select how often you would like to Donate:&nbsp;
<!-- t3, Required, Subscription Units D W M Y, -->
<select name="t3">
<option value="D">Day(s)</option>
<option value="W">Week(s)</option>
<option value="M">Month(s)</option>
<option value="Y">Year(s)</option>
</select>

<br><br>

<!--  -->
Select the number of Donation Payments you would like to make:
<br><br>
<!-- srt, Optional, Recurring Times, must be used with src -->
<select name="srt">
<option value="">Until Canceled</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="6">6</option>
<option value="12">12</option>
<option value="18">18</option>
<option value="24">24</option>
<option value="36">36</option>
</select>

<!-- sra, Optional, Reattempt on failure 2 more time, value 0 or 1, if 0 no reattempt -->
<input type="hidden" name="sra" value="1">

<br><br><br>

Thank you for your Donation,
<br><br>
Please Select your Free Gift:&nbsp;&nbsp;
<input type="hidden" name="on0" value="Free Gift Choice">
<select name="os0">
<option value="Solar Calculator">Solar Calculator</option>
<option value="Key Chain Light">Key Chain Light</option>
</select>

<br><br><br>

<!--  -->
<input type="hidden" name="bn" value="PP-SubscriptionsBF:btn_donateCC_LG.gif:NonHosted">
<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 -->



<!-- END BUTTON EXAMPLES -->



<!-- END SAMPLE CODE SECTION -->

<br><br>


<br><br><br><br>
<hr align="left" width="50%" noshade>
<br><br>
NOTES:
<br>
In order to test the code, you must replace the &quot;business&quot; value variable with your PayPal Email Address or your Merchant Account ID.


</body>
</html>

 

Login to Me Too

MysticPeace
Contributor
Contributor

Yup, that's one of the codes I already tried to use (see my initial submission), but I get this error message: "The link you have used to enter the PayPal system is invalid. Please review the link and try again."

Login to Me Too

snowshoe
Frequent Advisor
Frequent Advisor

As my example works - did you compare the lines of code?

Login to Me Too

MysticPeace
Contributor
Contributor

Yes. Even just copying your code straight the way you offered it. I either get "Invalid Regular period. You must specify valid values for the A3, P3, and T3 parameters for a subscription." or "The link you have used to enter the PayPal system is invalid. Please review the link and try again." and I don't know why.

Login to Me Too

MysticPeace
Contributor
Contributor

Here's the .php page that my partner set-up: https://www.livingmiraclescenter.org/donate/donate1.php. You could take a look at it. We're not entirely sure how that PayPal code works so if you can give me any pointers on that as well, I'd really appreciate it.

 

Thank you!

Login to Me Too

snowshoe
Frequent Advisor
Frequent Advisor

Suggest visiting the Developer's Forum, you may find some additional help there:

http://stackoverflow.com/questions/tagged/paypal

Login to Me Too

MysticPeace
Contributor
Contributor

Have been there. Have not found anything helpful. This is my last resort right now. Thank you.

Login to Me Too
Solved

snowshoe
Frequent Advisor
Frequent Advisor

As the scope of this forum does not get too technical, you got the best example I can provide.  All I can suggest is, if you're totally up in the air about things, you can always seek the assistance of a Certified Developer. 

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.