Mark__G
01-31-2008, 10:24 PM
So I have a page set up for a customer who doesn't want to set up a shopping cart program, but rather just a simple straight forward page with multiple items for sale all on one page.
I am trying to figure out how to post to paypal's secure order form with multiple items and values since all the codes they reference are sending the item name and the value as a hidden value within a single form so it wouldn't work for multiple items.
My solution was this (not working)...
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" name="form1">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="ACCOUNT@EMAIL.COM">
<input type="hidden" name="no_shipping" value="0">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="weight" value="1">
<input type="hidden" name="weight_unit" value="lbs">
<input type="hidden" name="lc" value="US">
<input type="hidden" name="bn" value="PP-BuyNowBF">
<a href="https://www.paypal.com/cgi-bin/webscr?item_name=ITEM1&amount=10" onclick="document.['form1'].submit(); return false">ITEM1</a>
<a href="https://www.paypal.com/cgi-bin/webscr?item_name=ITEM2&amount=20" onclick="document.['form1'].submit(); return false">ITEM2</a>
<a href="https://www.paypal.com/cgi-bin/webscr?item_name=ITEM3&amount=30" onclick="document.['form1'].submit(); return false">ITEM3</a>
</form>
So ya that doesn't work, just wondering if anyone had any ideas on trying to get this to work?
I am trying to figure out how to post to paypal's secure order form with multiple items and values since all the codes they reference are sending the item name and the value as a hidden value within a single form so it wouldn't work for multiple items.
My solution was this (not working)...
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" name="form1">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="ACCOUNT@EMAIL.COM">
<input type="hidden" name="no_shipping" value="0">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="weight" value="1">
<input type="hidden" name="weight_unit" value="lbs">
<input type="hidden" name="lc" value="US">
<input type="hidden" name="bn" value="PP-BuyNowBF">
<a href="https://www.paypal.com/cgi-bin/webscr?item_name=ITEM1&amount=10" onclick="document.['form1'].submit(); return false">ITEM1</a>
<a href="https://www.paypal.com/cgi-bin/webscr?item_name=ITEM2&amount=20" onclick="document.['form1'].submit(); return false">ITEM2</a>
<a href="https://www.paypal.com/cgi-bin/webscr?item_name=ITEM3&amount=30" onclick="document.['form1'].submit(); return false">ITEM3</a>
</form>
So ya that doesn't work, just wondering if anyone had any ideas on trying to get this to work?