<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
   <title>{l}Processing Payment...{/l}</title>
   <link rel="stylesheet" type="text/css" href="{$smarty.const.FULL_TEMPLATE_PATH}/style/style.css" />
</head>
{strip}
<body onLoad="document.form.submit();">

<br />
<br />
<br />
<br />
<br />
<br />

<div align="center" class="navbar">Processing Payment by PayPal...</div>

   <form name="form" action="https://www.paypal.com/cgi-bin/webscr" method="post">

      {if isset ($SubscriptionEnabled) and $SubscriptionEnabled eq 1 and $PAYMENT.SUBSCRIBED eq 1}
         <input type="hidden" name="cmd" value="_xclick-subscriptions" />
      {else}
         <input type="hidden" name="cmd" value="_xclick" />
      {/if}

      <input type="hidden" name="business" value="{$smarty.const.PAYPAL_ACCOUNT}" />
      <input type="hidden" name="item_name" value="Link to {$URL|trim}" />
      <input type="hidden" name="item_number" value="{$ID}" />
      <input type="hidden" name="amount" value="{$PAYMENT.AMOUNT}" />
      <input type="hidden" name="quantity" value="{$PAYMENT.QUANTITY}" />
      <input type="hidden" name="no_shipping" value="1" />
      <input type="hidden" name="return" value="http://{$smarty.server.SERVER_NAME}{$smarty.const.DOC_ROOT}/payment.php?payed={$ID}" />
      <input type="hidden" name="cancel_return" value="http://{$smarty.server.SERVER_NAME}{$smarty.const.DOC_ROOT}/payment.php?canceled={$ID}" />
      <input type="hidden" name="notify_url" value="http://{$smarty.server.SERVER_NAME}{$smarty.const.DOC_ROOT}/ipn.php?pid={$PAYMENT.ID}" />
      <input type="hidden" name="custom" value="{$PAYMENT.ID}" />
      <input type="hidden" name="no_note" value="1" />
      <input type="hidden" name="email" value="{$OWNER_EMAIL|escape|trim}" />
      <input type="hidden" name="currency_code" value="{$smarty.const.PAY_CURRENCY_CODE}" />

      {if isset ($SubscriptionEnabled) and $SubscriptionEnabled eq 1 and $PAYMENT.SUBSCRIBED eq 1}
         <input type="hidden" name="a3" value="{$PAYMENT.TOTAL}" />
         <input type="hidden" name="p3" value="{$Subscription.PERIOD}" />
         <input type="hidden" name="t3" value="{$Subscription.UM}" />
         <input type="hidden" name="src" value="1" />
         <input type="hidden" name="sra" value="1" />
      {/if}

   </form>
</body>
</html>
{/strip}