/** * Alert the requiriement invalid, of cURL, version of PHP, SPL or DOM. */ public function alertRequeriments() { $requirements = PagSeguroConfig::validateRequirements(); $required = array(); foreach ($requirements as $key => $value) { if ($value != '') { $required[] = $value; } } if (!empty($required)) { $message = $helper = Mage::helper('pagseguro')->__("Requerimentos para o sistema funcionar:"); foreach ($required as $value) { $message .= "<br />" . $value; } Mage::getSingleton('core/session')->addError($message); } }
private function validatePagSeguroRequirements() { $condional = true; foreach (PagSeguroConfig::validateRequirements() as $value) { if (!Tools::isEmpty($value)) { $condional = false; $this->errors[] = Tools::displayError($value); } } if (!$condional) { $this->html = $this->displayError(implode('<br />', $this->errors)); } return $condional; }