Project / Support Center
Welcome, Guest. Please login or register. April 05, 2020, 01:52: AM
Home Help Search Login Register
D-Web Web Site Creator D - Web Web Site Creator On-line HTML Editor No Programming knowledge required. Web Global Net PayPal-Cart Shopping Cart System PayPal - Kart Shopping Cart System for E-Commerce over the internet, that's easy to use. Web Global Net Newsletter Manager Newsletter Manager On-line Newsletter Creator with Email Subscriber Management.
Ring Central Discount
Web Global Net Web Application & Web Development Project Center  |  Technical Issues  |  PayPal Related  |  Topic: PayPal Button Codes 0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Go Down Send this topic Print
Author Topic: PayPal Button Codes  (Read 7860 times)
admin
Guest
« on: July 28, 2010, 11:50: PM »

The code for a Subscriptions button would look similar to the following sample:
Note:
Several optional fields are shown below.
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
  <input type="hidden" name="cmd" value="_xclick-subscriptions">
  <input type="hidden" name="business" value="nora@paypal.com">
  <input type="hidden" name="item_name" value="Baseball Hat Monthly">
  <input type="hidden" name="item_number" value="123">
  <input type="hidden" name="image_url"
value="https://www.yoursite.com/logo.gif">
  <input type="hidden" name="no_shipping" value="1">
  <input type="hidden" name="return"
value="http://www.yoursite.com/thankyou.htm">
  <input type="hidden" name="cancel_return"
value="http://www.yoursite.com/cancel.htm">
  <input type="hidden" name="a1" value="0">
  <input type="hidden" name="p1" value="1">
  <input type="hidden" name="t1" value="W">
  <input type="hidden" name="a2" value="5.00">
  <input type="hidden" name="p2" value="2">
  <input type="hidden" name="t2" value="M">
  <input type="hidden" name="a3" value="50.00">
  <input type="hidden" name=é─¨p3" value="1">
  <input type="hidden" name="t3" value="Y">
  <input type="hidden" name="src" value="1">
  <input type="hidden" name="sra" value="1">
  <input type="hidden" name="srt" value="5">
  <input type="hidden" name="no_note" value="1">
  <input type="hidden" name="custom" value="customcode">
  <input type="hidden" name="invoice" value="invoicenumber">
  <input type="hidden" name="usr_manage" value="1">
  <input type="image"
     src="http://images.paypal.com/images/x-click-but01.gif"
border="0" name="submit"
alt="Make payments with PayPal - ité─˘s fast, free and secure!">
</form>
Sample Hyperlink for a Subscriptions Link
The same inputs would generate the following hyperlink.
Note:
Several optional fields are included below.
https://www.paypal.com/subscriptions/business=nora%40paypal.com&item_name=Baseball+Hat+Monthly&item_number=123&image_url=https%3A//www.yoursite.com/logo.gif&no_shipping=1&return=http%3A//www.yoursite.com/thankyou.htm&cancel_return=http%3A//www.yoursite.com/cancel.htm&no_note=1&a1=0.00&p1=1&t1=W&a2=5.00&p2=2&t2=M&a3=50.00&p3=1&t3=Y&src=1&sra=1& srt=5&no_note=1&custom=customcode&invoice=invoicenumber&usr_manage=1
 
Table 9.1
HTML Variables for PayPal Subscriptions
Variable Name
Required or Optional
Description
é─˙posté─¨ action
Required
Must be set to é─˙https://www.paypal.com/cgi-bin/webscré─¨
cmd
Required
Must be set to é─˙_xclick-subscriptionsé─¨
business
Required
This is your PayPal ID, or email address. This email address must be confirmed and linked to your Verified Business or Premier account
item_name
Optional
Description of item being sold (maximum 127 characters). If you are collecting aggregate payments, this can include a summary of all items purchased, tracking numbers, or generic terms such as é─˙subscription.é─¨ If omitted, customer will see a field in which they have the option of entering an Item Name
return
Optional
An internet URL where the user will be returned after completing the payment. For example, a URL on your site that hosts a é─˙Information on your new subscriptioné─¨ page. If omitted, users will be taken to the PayPal site
rm
Optional
Return URL behavior. If set to é─˙1é─¨ and if a é─˙returné─¨ value is submitted, upon completion of the payment the buyer will be sent back to the return URL using a GET method, and no transaction variables will be submitted. If set to é─˙2é─¨ and if a é─˙returné─¨ value is submitted, the buyer will be sent back to the return URL using a POST method, to which all available transaction variables will also be posted. If omitted or set to é─˙0é─¨, GET methods will be used for all Subscriptions transactions and Buy Now, Donations, or PayPal Shopping Cart transactions in which IPN is not enabled. POST methods with variables will be used for the rest
cancel_return
Optional
An internet URL where the user will be returned if payment is cancelled. For example, a URL on your site which hosts a é─˙Payment Cancelledé─¨ page. If if omitted, users will be taken to the PayPal site
a1
Optional
Trial amount 1. This is the price of the first trial period. For a free trial, use a value of 0
p1
Optional
Trial period 1. This is the length of the first trial period. The number is modified by the trial period 1 units (t1, below)
t1
Optional
Trial period 1 units. This is the units of trial period 1 (p1, above). Acceptable values are: D (days), W (weeks), M (months), Y (years)
a2
Optional
Trial amount 2. This is the price of the second trial period
p2
Optional
Trial period 2. This is the length of the second trial period. The number is modified by the trial period 1 units (t2, below)
t2
Optional
Trial period 2 units. This is the units of trial period 2 (p2, above). Acceptable values are: D (days), W (weeks), M (months), Y (years)
a3
Required
Regular rate. This is the price of the subscription
p3
Required
Regular billing cycle. This is the length of the billing cycle. The number is modified by the regular billing cycle units (t3, below)
t3
Required
[required] Regular billing cycle units. This is the units of the regular billing cycle (p3, above) Acceptable values are: D (days), W (weeks), M (months), Y (years)
src
Optional
Recurring payments. If set to é─˙1,é─¨ the payment will recur unless your customer cancels the subscription before the end of the billing cycle. If omitted, the subscription payment will not recur at the end of the billing cycle
sra
Optional
Reattempt on failure. If set to é─˙1,é─¨ and the payment fails, the payment will be reattempted two more times. After the third failure, the subscription will be cancelled. If omitted and the payment fails, payment will not be reattempted and the subscription will be immediately cancelled
srt
Optional
Recurring Times. This is the number of payments which will occur at the regular rate. If omitted, payment will continue to recur at the regular rate until the subscription is cancelled
no_note
Required
This field makes sure your subscriber is not prompted to include a note with the subscription, a function which PayPal Subscriptions does not support. This field must be included, and the value must be set to 1
custom
Optional
User-defined field (maximum 255 characters) which will be passed through the system and returned to user in payment notification emails. This field will not be shown to your subscribers
invoice
Optional
User- defined field (maximum 127 characters) which must be unique with each subscription. The invoice number will be shown to subscribers with the other details of their transactions
usr_manage
Optional
Username and password generation field. If set to é─˙1é─¨ PayPal will generate usernames and passwords for your subscribers. For use with Password Management (see page 33). If omitted, no passwords will be generated
cn
Optional
Label that will appear above the note field (maximum 30 characters). This value is not saved and will not appear in any of your notifications. If omitted, no variable will be passed back to you. é─˙Special instructions (optional):é─¨ will be displayed.
cs
Optional
Sets the background color of your payment pages. If set to é─˙1,é─¨ the background color will be black. If omitted or set to é─˙0é─¨ the background color will be white
on0
Optional
First option field name (maximum 30 characters). If omitted, no variable will be passed back to you
os0
Optional
First set of option value(s). If this option is selected through a text box (or radio button), each value should be no more than 30 characters. If this value is entered by the customer through a text box, there is a 200-character limit. If omitted, no variable will be passed back to you. é─˙on0é─¨ must be defined in order for é─˙os1é─¨ to be recognized
on1
Optional
Second option field name (maximum 30 characters). If omitted, no variable will be passed back to you
os1
Optional
Second set of option value(s). If this option is selected through a text box (or radio button), each value should be no more than 30 characters. If this value is entered by the customer through a text box, there is a 200-character limit. If omitted, no variable will be passed back to you. é─˙on1é─¨ must be defined in order for é─˙os1é─¨ to be recognized
tax
Optional
Transaction-based tax override variable. Set to a flat tax amount you would like to apply to the transaction regardless of the buyeré─˘s location. If present, this value overrides any tax settings that may be set in the selleré─˘s Profile. If omitted, Profile tax settings (if any) will apply
currency_code
Optional
The currency of the payment. Defines the currency in which the monetary variables (amount, shipping, shipping2, handling, tax) are denoted.
See table of supported currency codes.
If omitted, all monetary fields are interpreted as U.S. Dollars
modify
Optional
Modification behavior.
0 or null = The button allows buyers to only create new subscriptions.
1 = The button allows buyers to modify current subscriptions if they have any and to sign up for new subscriptions if they do not.
2 = The button allows buyers only to modify existing subscriptions according to the other parameters specified by the button and does not allow sign-up for new subscriptions.
lc
Optional
Sets the default country and associated language for the login or signup page that your customers see when they click your button. If this variable is absent, the default will be set from the useré─˘s cookie, or will be set to the U.S. if there is no cookie. Can be set to any of the countries currently available on PayPal.
page_style

Optional
Sets the Custom Payment Page Style for payment pages associated with this button/link. The value of page_style is the same as the Page Style Name you chose when adding or editing the page style. You can add and edit Custom Payment Page Styles from the Profile section of the My Account tab. If you would like the button/link to always reference the style you make Primary, set this variable equal to "primary." If you would like the button/link to reference the default PayPal page style, set this variable equal to "paypal." The page_style variable has a maximum length of 30 characters. Valid character set is alphanumeric ASCII lower 7-bit characters only, plus underscore. It cannot include spaces
Report to moderator   Logged
Pages: [1] Go Up Send this topic Print 
Web Global Net Web Application & Web Development Project Center  |  Technical Issues  |  PayPal Related  |  Topic: PayPal Button Codes « previous next »
Jump to:  


Login with username, password and session length
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!