Exemplo n.º 1
0
		else
		{
			if (is_array($k))
				$nk = strtoupper("{$k[0]}_{$k[1]}");
			else
				$nk = strtoupper("{$k}");

			CONFIG::$$nk = $v;
			define("CF_{$nk}", $v);
		}
	}
	
	unset($cfg);
			
	CONFIG::$IPNURL = CONFIG::$SITE_URL."/ipn.php";
	CONFIG::$PDTURL = CONFIG::$SITE_URL."/pdt.php";
	
	//
	// Init payment module factory
	//
	$PaymentModuleFactory = PaymentModuleFactory::GetInstance();
	$PaymentModuleFactory->SetModulesDirectory(MODULES_PATH."/payments");	
	
	try
	{
		$payment_modules = $PaymentModuleFactory->ListModules();
	}
	catch (Exception $e)
	{
		throw new ApplicationException($e->getMessage(), $e->getCode());
	}