How do I create a shopping cart link in PayPal Payments Standard?
This is a legacy method that allows you to create shopping cart links manually. It involves taking the shopping cart variables and converting them to a URL format.
<input type="hidden" value="email@example.com" name="business">
in the link.
Example Add to Cart link
Submit URL <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=YOUR_EMAIL_ADDRESS_HERE&item_name=ITEM_NAME_HERE&item_number=123456&amount=99.99&return=http://www.paypal.com&cancel_return=http://www.paypal.com" target="_click">Purchase</a>
- Where it says YOUR_EMAIL_ADDRESS_HERE, enter your email address.
- Where it says ITEM_NAME_HERE, enter the item name, and so on.
Additional variables (up to 127 characters unless noted)
- &custom= Any value you may need
- &on0= Any value you may need; proprietary (up to 15 characters)
- &os0= Any value you may need; proprietary (up to 30 characters)
- &on1= Any value you may need; proprietary (up to 15 characters)
- &os1= Any value you may need; proprietary (up to 30 characters)
- &invoice= Unique number per transaction
- &image_url= URL for a banner image
- & notify_url= URL for IPN only
- &cn= A message title (up to 30 characters)
In each case, place the desired value after the = sign.
Note: The on and os variables are proprietary. You must use them in order from top to bottom. If you use the variables out of order, they won't pass the value. Use in this order: on0, then os0, then on1, then os1.
Example of View Cart code
https://www.paypal.com/cgi-bin/webscr?cmd=_cart&business=YOUR EMAIL ADDRESS&display=1
PayPal recommends that you create shopping cart links using the following process. You can do this as you generate the code for your shopping cart from merchant services.
- Log in to your PayPal account.
- Click Tools.
- Click PayPal buttons.
- Click Create new button.
- Under Choose a button type, select a button type.
- Fill out the form and click Create Button.
- Click Email to see the auto-generated link for your shopping cart.