function __construct($file) { PagSeguroLibrary::init(); $this->pg = new PagSeguroPaymentRequest(); $this->init($file); $this->moeda = "BRL"; $this->itens = array(); $this->pg->setCurrency($this->getMoeda()); }
private function addClass($class) { foreach (self::$dirs as $key => $dir) { $file = PagSeguroLibrary::getPath() . DIRECTORY_SEPARATOR . $dir . DIRECTORY_SEPARATOR . $class . '.class.php'; if (file_exists($file) && is_file($file)) { require_once $file; } } }
private function __construct() { define('ALLOW_PAGSEGURO_CONFIG', true); require_once PagSeguroLibrary::getPath() . DIRECTORY_SEPARATOR . "config" . DIRECTORY_SEPARATOR . "PagSeguroConfig.php"; $varName = self::VARNAME; if (isset(${$varName})) { self::$data = ${$varName}; unset(${$varName}); } else { throw new Exception("Config is undefined."); } }
private function __construct() { define('ALLOW_PAGSEGURO_RESOURCES', true); require_once PagSeguroLibrary::getPath() . DIRECTORY_SEPARATOR . "resources" . DIRECTORY_SEPARATOR . "PagSeguroResources.php"; $varName = self::VAR_NAME; if (isset(${$varName})) { self::$data = ${$varName}; unset(${$varName}); } else { throw new Exception("Resources is undefined."); } }
public static final function getPath() { return self::$path; } public static final function getModuleVersion() { return self::$module_version; } public static final function setModuleVersion($version) { self::$module_version = $version; } public static final function getPHPVersion() { return self::$php_version = phpversion(); } public static final function setPHPVersion($version) { self::$php_version = $version; } public static final function getCMSVersion() { return self::$cms_version; } public static final function setCMSVersion($version) { self::$cms_version = $version; } } PagSeguroLibrary::init();