tags:

views:

329

answers:

2

I have some items for sale that have 2 and 3 levels of customization. Once set the user adds them to my onsite cart. Problem is, how can i send each item to paypal on checkout? The only code ive found for dynamic buttons supports only a single item.

<form method="post" action="https://www.paypal.com/cgi-bin/webscr" target="paypal">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="add" value="1">
<input type="hidden" name="business" value="EMAIL">
<input type="hidden" name="item_name" value="Item #1">
<input type="hidden" name="item_number" value="123456">
<input type="hidden" name="amount" value="7.00">
<input type="hidden" name="shipping" value="0">
<input type="hidden" name="shipping2" value="0">
<input type="hidden" name="handling" value="0">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="return" value="http://www.yoursite.com/thankyou.htm"&gt;
<input type="hidden" name="undefined_quantity" value="1">
<input type="image" src="http://images.paypal.com/en_US/i/btn/x-click-but22.gif" border="0" name="submit" width="87" height="23" alt="Make payments with PayPal - it's fast, free and secure!">
</form>

I tried adding

<input type="hidden" name="item_name_2" value="Item #1">
<input type="hidden" name="item_number_2" value="123456">
<input type="hidden" name="amount_2" value="7.00">

But no positive result.

Any ideas?

+2  A: 

Why don't you send the total amount your client has to pay to PayPal?

Ben Fransen
id like their paypal reciept to reflect exactly what was ordered and paid for by item. Alternative is to bunch it all together.
Patrick
Indeed, what you were looking for is the upload option which have to be set to 1.Here is some documentation about this:http://www.paypal.com/cgi-bin/webscr?cmd=_pdn_howto_checkout_outside#methodtwoWhile i was searching for your answer you allready figured it out i guess ;)
Ben Fransen
useful information though. Thanks for posting the link. I gave you credit on the answer btw.
Patrick
You're welcome! Thanks for the credits :)
Ben Fransen
+2  A: 

Here is the solution

<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="upload" value="1">
<input type="hidden" name="business" value="[email protected]">
<input type="hidden" name="item_name_1" value="Item #1">
<input type="hidden" name="amount_1" value="1.00">
<input type="hidden" name="item_name_2" value="Item #2">
<input type="hidden" name="amount_2" value="2.00">
<input type="submit" value="PayPal">
</form>
Patrick