Beispiel #1
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;
     }
 }
Beispiel #2
0
 /**
  * Set the environment configured in the PagSeguro module
  */
 public function setEnvironment()
 {
     \PagSeguro\Configuration\Configure::setEnvironment($this->_scopeConfig->getValue('payment/pagseguro/environment'));
 }