Esempio n. 1
0
 /**
  * @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;
     }
 }
Esempio n. 2
0
 /**
  * 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;
     }
 }
Esempio n. 3
0
 /**
  * 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'));
 }