I have a webpage in which I would like to integrate a recurring donation .
I have the following HTML code, which allows a user to insert any amount, and click donate to submit that sum.
What I would like is a thick box that once pressed, will make that amount recurring. As a mention, I have a business account on paypal.
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_donations">
<input type="hidden" name="business" value="email@domain-x.com">
<input type="hidden" name="lc" value="US">
<input type="hidden" name="item_name" value="Widget Fund">
<input type="hidden" name="item_number" value="W-001">
<input type="hidden" name="no_note" value="0">
<input type="hidden" name="cn" value="Add special instructions to the seller:">
<input type="hidden" name="no_shipping" value="2">
<input type="hidden" name="currency_code" value="USD">
<!-- --><br />
Please enter your donation amount: (Example - 10.00)<br />
<input type="text" name="amount" size="5"><br />
<input type="hidden" name="bn" value="PP-DonationsBF:btn_donateCC_LG.gif:NonHosted"><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!"><br />
<img alt="" border="0" src="https://www.paypalobjects.com/en_GB/i/scr/pixel.gif" width="1" height="1"><br />
</form>
PayPal buttons have parameters to describe the payment schedule; if you send those parameters then PayPal will set up a recurring payment rather than a single payment. The variables are all described here:
$5 per month (with no trial or balloon payments) would be: a3=$5 (amount) t3=M (term type is months) p3=1 (every 1 month)
... and then there are additional parameters (in the docs) to offer many more features and settings.
I've had the same problem and spend a lot of time trying to create a form asking user for amout AND number of payement. In fact the key is not filling a3, t3 or p3! The key is... the cmd field!!
Like this:
<input type="hidden" name="cmd" value="_donations">
you'll get unique donation payement (and you must use the "amount" field to specify the amount)
To get recuring donation you must use:
<input type="hidden" name="cmd" value="_xclick-subscriptions ">
And in this case you'll have to use "a3" field for amount, "t3" for "type of time" (D=each day, M=each month and Y=each year) and "p3" for number of time. You must also use "src" and "srt". So, EG:
a3 = 15 // You donate 15 dollar
t3 = M // the unit for time is "month"
p3 = 1 // The paiment will occur each "unit of time" so each month
src = 1 // There is a "recurrent paiement"
srt = 6 // which will happened 6 time
So in this example, the user will pay 15 dollar, each month during 6 month
Or EG:
a3 = 20 // You donate 30 dollar
t3 = M // the unit for time is "month"
p3 = 3 // The paiment will occur each "unit of time" so each 3 month
src = 1 // There is a "recurrent paiement"
srt = 4 // which will happened 4 time
So in this example, the user will pay 20 dollars, each 3 months during 4 times. So January, April, July, and so on.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.