I have a small commerce site that accepts paypal, but it's been a long time since I've looked at the code. Taking a quick peek, it looks like you send a lot of hidden information via a POST command when you submit the information. Here is a sample:
<FORM name="fred" target="paypal" action="https://www.paypal.com/dgi-bin/webscr" method="POST">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="upload" value="1">
<input type="hidden" name="business" value="sales@marinascosmetics.com">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="return" value="thankyou.html">
<input type="hidden" name="cn" value="Please include additional instructions if needed. Thank you!"><br>
...(blah blah)...
<input type='submit' >
</form>
I think the cmd/_cart combination allows you to submit the entire cart to PayPal. Not sure how it works anymore, but there is documentation up on PayPal that talks about it.
Hope this helps steer you in the right direction...