Sometimes you need more PayPal options than the Simple Commerce Module can offer. In this case it can be a good idea to create the necessary form yourself instead of having the SCM do it.
You can still use the SCM to provide basic data like item price etc. Here’s an example:
{exp:weblog:entries weblog="webshop" rdf="off" disable="pagination|member_date|trackbacks" limit="1"}
{exp:simple_commerce:purchase entry_id="{entry_id}"}
...
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="paypal">
<input type="hidden" name="cmd" value="_cart" />
<input type="hidden" value="http://www.example.com/?ACT=20" name="notify_url" />
<input type="hidden" value="http://www.example.com/webshop/thank_you" name="return" />
<input type="hidden" value="http://www.example.com/webshop/cancel" name="cancel_return" />
<input type="hidden" name="business" value="me@example.com" />
<input type="hidden" name="currency_code" value="EUR" />
<input type="hidden" name="item_name" value="{title}" />
<input type="hidden" name="item_number" value="{item_id}" />
<input type="hidden" name="add" value="1" />
<input type="hidden" name="upload" value="1" />
<input type="hidden" name="no_shipping" value="2" />
<input type="hidden" name="no_note" value="1" />
<input type="hidden" name="undefined_quantity" value="1" />
<input name="submit" alt="Make secure payments with PayPal"
onclick="window.open('','paypal','width=780,height=500,scrollbars=yes,resizable=yes,status=yes')" />
<input type="radio" name="amount" value="{item_regular_price}" checked="checked" /> Pay full price: {item_regular_price} €<br />
<input type="radio" name="amount" value="100" /> Pay by installments - First rate 100 €<br />
<input type="checkbox" value="10.00" name="shipping">
Check if delivery address is outside the EU (€ 30 for S&H;)
</form>
{/exp:simple_commerce:purchase}
{/exp:weblog:entries}
The item_name and item_id are automatically provided by EE, as is the price. (We are offering two options here, paying in full or by installments. If you don’t just replace the radio button with a hidden field.)
Also, we provide a checkbox for adding a shipping surcharge for some customers. You could easily use a pulldown menu to let them select the country or region they’re in.
Category:Commerce -> PayPal Category:Tricks
