/** * @return string * @throws \Exception */ private function getPagSeguroPaymentJs() { if (\PagSeguro\Configuration\Configure::getEnvironment()->getEnvironment() == 'sandbox') { return \UOL\PagSeguro\Helper\Library::SANDBOX_JS; } else { return \UOL\PagSeguro\Helper\Library::STANDARD_JS; } }
/** * Request a PagSeguro Cancel * * @param $config * @return \PagSeguro\Parsers\Cancel\Response * @throws \Exception */ private function requestCancel($config) { \PagSeguro\Configuration\Configure::setEnvironment($this->_library->getEnvironment()); try { return \PagSeguro\Services\Transactions\Cancel::create($this->_library->getPagSeguroCredentials(), $config->pagseguro_id); } catch (\Exception $exception) { throw $exception; } }
/** * Set the log and log location configured in the PagSeguro module */ public function setLog() { \PagSeguro\Configuration\Configure::setLog($this->_scopeConfig->getValue('payment/pagseguro/log'), $this->_scopeConfig->getValue('payment/pagseguro/log_file')); }