PayPal Standard
The PayPal_Standard class provides a simple way of generating the required html form components to impliment a PayPal Standard setup.
This code doesn't do anything other than generate an html form but it makes it easy to do so.
The Class can be downloaded from GitHub below.
http://github.com/ArthurGuy/PayPal-Standard
The example below shows the code you would need to generate a complete html form ready to send data to PayPal.
In the example a single item is added to the basket but the code does give you the flexibility to add multiple items complete with associated shipping, handling, tax and discount costs.
In a typical environment this code would be placed at the top of your shopping basket page so you can loop through the basket contents adding it to the class, you can then display the PayPal button and hidden form components on the page.