Why do I get a parameter error when adding multiple buy buttons on the same page?

Each button added to the page needs to have its own opening and closing form field. This tells the browser that each form is separate, and not part of the same one.

The following correct example generated two separate buy buttons:

<form action="https://www.2checkout.com/checkout/purchase" method="post">
<input type="hidden" name="sid" value="XXXXXX" />
<input type="hidden" name="product_id" value="10" />
<input type="text" name="quantity" size="5" value="1" />
<input type="submit" name="submit" value="Buy from 2CO" />
</form><form action="https://www.2checkout.com/checkout/purchase" method="post">
<input type="hidden" name="sid" value="XXXXXX" />
<input type="hidden" name="product_id" value="10" />
<input type="text" name="quantity" size="5" value="1" />
<input type="submit" name="submit" value="Buy from 2CO" />
</form>

** Notice that there are two opening tags ( <form> ) and two closing tags ( </form> ).

Another possibility, if you are using an HTML editor, is the editor may be adding extra numbers to the parameters, thinking each identical one is part of the same form, and not a separate form. Look at the parameters in the forms, and make sure there are not extra numbers added to it.
Incorrect Example:

<form action="https://www.2checkout.com/checkout/purchase" method="post">
<input type="hidden" name="sid1" value="XXXXXX" />
<input type="hidden" name="product_id" value="10" />
<input type="text" name="quantity" size="5" value="1" />
<input type="submit" name="submit" value="Buy from 2CO" />
</form>

** Notice that the in second line from the name=”sid1″, this should always be name=”sid”

Important Note: When you are testing parameters, please be certain to clear the cookies in your browser between tests to ensure the changes you have made are applied. For more information on clearing the cookies please click here.

Can I have extra fields on the form?

Most of our Vendors that need extra details about the buyer usually have the buyer sent back to a form on their site after the sale. This way, the buyer could send all extra details directly to them.

Do you offer an API?

An API (Application Programming Interface) is used in many different contexts in this industry. To clear this up with our service, read below:

We offer a Common Gateway Interface (CGI). This means your site will need to contain an HTML form or link with cgi parameters appended that passes the correct parameters (and the customer) to our site for checkout. Passing in the Proper Parameters will result in the customer going through the rest of our checkout process (such as entering their credit card information), and after verification, a successful sale.

The following Knowledge Base articles provide more information about the specific parameter sets 2CO uses:

What are the parameters for the Plug n Play cart?

Does your system have it’s own parameters? If so, what are they?

Does your system support Authorize.net parameters? If so, what are they?

What are the New Cart Purchase Parameters? *Required if not using the plug-and-play cart parameter set*

Recent Posts from the Community:

Invoicing

posted by: hienbt

selling coins

posted by: c0mrade

Invoices

posted by: silversurf

ACH Payment

posted by: silversurf

demo mode

posted by: jsimmons

Old panel

posted by: tools

16% service fee?

posted by: 3dom
More from the community »

Now a faster, easier way to get paid – the 2CO reloadable MasterCard®.

Sign up today and receive a $10 credit on your card.


Click here to learn more.

Spotlight Supplier

Spotlight Supplier

Innovative Software Development

Spotlight Product

Spotlight Product

Costa Rican Coffee


Popular Tags