Location: PHPKode > scripts > Free PHP Shopping Cart > FPHPSC/inc/payment_mods/PAYPAL_Functions.php
<?
//////////////////////////////////////////////////////////////////////
// The freebert.com Free PHP Shopping Cart:
// Version 0.80 - July 14th, 2009
// License / Terms of Use:
// Free to use, edit & customize, so long as the freebert.com logo, 
// the 'Powered By The Free PHP Shopping Cart' text & links 
// remain displayed on the bottom of every visable shopping cart page. 
// Redistribution in whole or in part of any page or function within 
// the freebert.com Free PHP Shopping Cart is strictly forbidden
// without the express written consent from freebert.com.
// Copyright (c) 2007 - 2009  by Colin Burke - freebert.com
// Contact: hide@address.com
// Support: http://www.freebert.com/Wiki/index.php/FPHPSC
// NOTE: If you want a cart script package with more features like
// customer accounts, database integration, administration section,
// online customer orderstatus section and more, OR
// if you simply want to legally remove the logo & links and
// continue to use the freebert.com Free PHP Shopping Cart
// you may do so by buying a domain license for the freebert.com
// Deluxe PHP SQL Shopping Cart Script. For details go to:
// http://www.freebert.com/Products/DeluxePHPSQLShoppingCart/ 
//////////////////////////////////////////////////////////////////////

// ************************************************************************
function Display_PayPal_Option()
{
  $Output ='';
  $Output =$Output.'<table width="100%" border="0" align="center">
  <tr>
    <td colspan="2"><FORM ACTION="MakePayment.php" METHOD="post">
      <div align="center">
	  <table width="95%" border="1" align="center">
        <tr> 
          <td><div align="center"><span class="RedBold">PayPal - Credit Cards / E-Cheques</span></div></td>
        </tr>
        <tr><td><div align="center">
		  <span class="WhiteBold">Pay directly by Credit Cards. All payments made over a secure server. </span>
		  <br><br><input type="submit" name="Submit" value="Click Here To Pay via PayPal"><br><br>
		  <a href="http://www.PayPal.com" target="_blank" class="nct">Powered By PayPal</a><br>
        </div></td>
      </tr>
      </table>
	  <INPUT TYPE="hidden" NAME="PayType" VALUE="PayPal">
      </div>
      </FORM> 
    </td>
  </tr>
  <tr bgcolor="#666666"> 
    <td colspan="2">&nbsp;</td>
  </tr>
</table>';
  return $Output;
  // <input name="amount" type="hidden" id="amount" value="<%=displaytotal %>">
}
// ****************************************************************************************************************************************
function Display_PayPal_Button($Arr_PayPal,$Session_Prefix)
{
  $Output='';
  $Output=$Output.'<div align="center">Click on the button below to pay online on a secure server via PayPal.com</div>
   				<div align="center">
				<form name="PayPal" method="post" action="https://www.paypal.com/cgi-bin/webscr">
				  <table border="2" bordercolor="#FF0000">
                    <tr>
                      <td bgcolor="#FFFF00"><div align="center" class="">						   
  <input type="hidden" name="cmd" value="_cart">
  <input type="hidden" name="business" value="'.$Arr_PayPal['AccountEmail'].'">
  <input type="hidden" name="upload" value="1">
  <input type="hidden" name="currency_code" value="'.$Arr_PayPal["CurrencyCode"].'">
  ';

  $final = $_SESSION[$Session_Prefix.'Item_Count']+1;
  for ($i = 1; $i < $final; $i++)
  {
    $displayserialnum = "serialnum".$i;
    $displayshippinga = "shippinga".$i;
    $displayshippingb = "shippingb".$i;
    $displaytitle = "title".$i;
    $displayprice = "price".$i;
    $displayquantity = "quantity".$i;

    $Output = $Output.'
	
	<INPUT TYPE="hidden" NAME="item_name_'.$i.'" VALUE="'.$_SESSION[$Session_Prefix.$displaytitle].'">
	<INPUT TYPE="hidden" NAME="item_number_'.$i.'" VALUE="'.$_SESSION[$Session_Prefix.$displayserialnum].'">
	<INPUT TYPE="hidden" NAME="amount_'.$i.'" VALUE="'.$_SESSION[$Session_Prefix.$displayprice].'">
	
	<INPUT TYPE="hidden" NAME="shipping_'.$i.'" VALUE="'.$_SESSION[$Session_Prefix.$displayshippinga].'">
	<INPUT TYPE="hidden" NAME="shipping2_'.$i.'" VALUE="'.$_SESSION[$Session_Prefix.$displayshippingb].'">
	<INPUT TYPE="hidden" NAME="quantity_'.$i.'" VALUE="'.$_SESSION[$Session_Prefix.$displayquantity].'">
	';
  }

  $Output = $Output.'  
  <input name="submit" type="submit" value="Click Here To Pay Via PayPal.com">
                      </div></td>
                    </tr>
                  </table>
                </FORM>
	  			</div>';
  
  return $Output;
}
//////////////////////////////////////////////////////////////////////
// The freebert.com Free PHP Shopping Cart:
// Version 0.80 - July 14th, 2009
// License / Terms of Use:
// Free to use, edit & customize, so long as the freebert.com logo, 
// the 'Powered By The Free PHP Shopping Cart' text & links 
// remain displayed on the bottom of every visable shopping cart page. 
// Redistribution in whole or in part of any page or function within 
// the freebert.com Free PHP Shopping Cart is strictly forbidden
// without the express written consent from freebert.com.
// Copyright (c) 2007 - 2009  by Colin Burke - freebert.com
// Contact: hide@address.com
// Support: http://www.freebert.com/Wiki/index.php/FPHPSC
// NOTE: If you want a cart script package with more features like
// customer accounts, database integration, administration section,
// online customer orderstatus section and more, OR
// if you simply want to legally remove the logo & links and
// continue to use the freebert.com Free PHP Shopping Cart
// you may do so by buying a domain license for the freebert.com
// Deluxe PHP SQL Shopping Cart Script. For details go to:
// http://www.freebert.com/Products/DeluxePHPSQLShoppingCart/ 
//////////////////////////////////////////////////////////////////////
?>
Return current item: Free PHP Shopping Cart