Tip: Passing a shopping cart to Paypal Website Payments Standard

Tags: 

Here's a little tip for anyone using Paypal's Website Payments Standard system for electronic payments on their shopping cart. Their API allows you to pass in a complete shopping cart using a series of form fields listing the items, quantities, etc, as you'd expect. There's one tiny little detail that isn't explicitly stated - the button that you use to submit to the API must not have a name attribute otherwise it will fail. Here's a fully working example to better explain:
[source:html]












[/source]
As you can see there's no name attribute on the submit button, just an id.