<form action="https://www.<%if sandbox%>sandbox.<%endif%>paypal.com/cgi-bin/webscr" method="post">
  <input type="hidden" name="business" value="<%if to_email%><%escape_html to_email%><%else%><%escape_html business_email%><%endif%>" />
  <input type="hidden" name="currency_code" value="<%escape_html currency%>" />
  <input type="hidden" name="return" value="<%config.db_cgi_url%>/add.cgi" />
  <input type="hidden" name="custom" value="do;process_payment=1;payment_success=1<%loop config.dynamic_preserve%><%if in.$loop_value%>;<%loop_value%>=<%in.$loop_value%><%endloop%>" />
  <input type="hidden" name="cancel_return" value="<%config.db_cgi_url%>/add.cgi" />
  <input type="hidden" name="rm" value="2" />
  <%if notify_url%><input type="hidden" name="notify_url" value="<%escape_html notify_url%>" /><%endif%>
  <%if pp_image_url%><input type="hidden" name="image_url" value="<%escape_html pp_image_url%>" /><%endif%>
  <%if note and payment_type != 2 %><input type="hidden" name="cn" value="<%escape_html note%>" /><%else%><input type="hidden" name="no_note" value="1" /><%endif%>
  <%if color eq 'black'%><input type="hidden" name="cs" value="1" /><%endif%>
  <input type="hidden" name="cmd" value="_xclick<%if payment_type == 2%>-subscriptions<%endif%>" />
<%~if payment_type == 2%>
  <input type="hidden" name="a3" value="<%escape_html payment_amount%>" />
  <input type="hidden" name="p3" value="<%escape_html payment_term_num%>" />
  <input type="hidden" name="t3" value="<%if payment_term_u istarts 'd'%>D<%elsif payment_term_u istarts 'w'%>W<%elsif payment_term_u istarts 'm'%>M<%elsif payment_term_u istarts 'y'%>Y<%endif%>" />
  <input type="hidden" name="src" value="1" />
  <input type="hidden" name="sra" value="1" />
<%~else%>
  <input type="hidden" name="amount" value="<%escape_html payment_amount%>" />
<%~endif%>
  <input type="hidden" name="invoice" value="<%escape_html unique_id%>" />
  <input type="hidden" name="item_name" value="<%escape_html site_title%> link submission (<%ifnot payment_term_num%>Lifetime<%else%><%escape_html payment_term_num%> <%escape_html payment_term_unit%><%endif%><%if payment_type == 2%>, recurring<%endif%>)" />
  <input type="hidden" name="no_shipping" value="1" />
  <input type="image" name="submit" src="<%if button_custom%><%escape_html button_custom%><%else%>https://www.paypal.com/images/<%escape_html button%><%endif%>" title="Make payments with PayPal - it's fast, free and secure!" class="image" />
</form>
