/** * 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; } }
/** * Request all PagSeguroTransaction in this _date interval * * @param $page * @return string * @throws \Exception */ protected function requestPagSeguroAbandoned($page) { $date = $this->getDates(); $options = ['initial_date' => $date['initial'], 'final_date' => $date['final'], 'page' => $page, 'max_per_page' => 1000]; try { $this->_library->setEnvironment(); $this->_library->setCharset(); $this->_library->setLog(); return \PagSeguro\Services\Transactions\Search\Abandoned::search($this->_library->getPagSeguroCredentials(), $options); } catch (Exception $exception) { throw $exception; } }
/** * Get transaction from PagSeguro WS. * @param $code * @return \PagSeguroTransaction * @throws \Exception * @throws \PagSeguroServiceException */ private function getTransaction() { return \PagSeguro\Services\Transactions\Notification::check($this->_library->getPagSeguroCredentials()); }