コード例 #1
0
ファイル: Checkout.php プロジェクト: pagseguro/magento2
 /**
  * @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;
     }
 }
コード例 #2
0
ファイル: Cancellation.php プロジェクト: pagseguro/magento2
 /**
  * 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;
     }
 }
コード例 #3
0
ファイル: Library.php プロジェクト: pagseguro/magento2
 /**
  * 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'));
 }