//$merchant = 'paypal';
		if ($dm->expired) {
			$mainframe->enqueueMessage('PayPal IPN for DOCman Trial version has expired, visit <a href="http://motov.net/downloads/paypal-paid-downloads/paypal-ipn-for-docman-3-2-5-stable/download/doc_download">this link</a> to obtain a full version.','error');
			$dm->sendExpiredEmail();
			$mainframe->redirect('index.php');
		}
		//echo $merchant;
		//$jhtml = new JHTML;
		$js = '
		  jQuery(function() {
		    document.dmp_order_form.submit();
		  })();
		';
		$document->addScriptDeclaration($js);
		$dm_id = JRequest::getVar('id',null,null,'int');
		$tmp = $dm->makeBlankOrder($dm_id,JRequest::getVar('mode'));
		$order_id = $tmp['id'];
		$key = $tmp['key'];
		switch ($merchant) {
			case "paypal":
				include_once('paypal.php');
				break;
			case "moneybookers":
				include_once('moneybookers.php');
				break;
			case "google checkout":
				include_once('googleCheckout.php');
				break;
			case "netcash.co.za":
				include_once('netcash.php');
				break;