Example #1
0
 /**
  * Build a URL for recovery a PagSeguroTransaction
  *
  * @param string $recoveryCode
  * @return URI
  */
 private function abandonedRecoveryUrl($recoveryCode)
 {
     if (strtolower($this->_library->getEnvironment()) == "sandbox") {
         return 'https://sandbox.pagseguro.uol.com.br/checkout/v2/resume.html?r=' . $recoveryCode;
     }
     return 'https://pagseguro.uol.com.br/checkout/v2/resume.html?r=' . $recoveryCode;
 }
Example #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;
     }
 }