<?php session_start();
@set_time_limit(300);		//added to make sure emails are sent out from smtp if used

//#############################################################################
//Add in common confirm details
require_once("../config.php");
require_once("../ipncommon/com_ipnfunctions.php");
require_once("../ipncommon/com_processes.php");
//#############################################################################


//#############################################################################
//Format the received post data for display purposes
$req_format = format_post($_POST);

//Get the required posted variables and place into an array
$cmd = $_POST['txn_type'];

if ($cmd == "cart") {	//This is a cart selection
    $paypal 		= create_local_variables_cart();
    $paypal_cart 	= create_local_variables_cart_items();				
} else {	//This is single item selection
    $paypal = create_local_variables();   
}	

$result = fsockpost( "https://ipnpb.paypal.com/cgi-bin/webscr", $_POST );

//#############################################################################
//Add in common confirm details
require_once("../ipncommon/com_confirm.php");
//#############################################################################

?>