• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP LogPagSeguro类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中LogPagSeguro的典型用法代码示例。如果您正苦于以下问题:PHP LogPagSeguro类的具体用法?PHP LogPagSeguro怎么用?PHP LogPagSeguro使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了LogPagSeguro类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: checkTransaction

 /**
  * Returns a transaction from a notification code
  * 
  * @param PagSeguroCredentials $credentials
  * @param String $notificationCode
  * @throws PagSeguroServiceException
  * @throws Exception
  * @return a transaction
  * @see PagSeguroTransaction
  */
 public static function checkTransaction(PagSeguroCredentials $credentials, $notificationCode)
 {
     LogPagSeguro::info("PagSeguroNotificationService.CheckTransaction(notificationCode={$notificationCode}) - begin");
     $connectionData = new PagSeguroConnectionData($credentials, self::serviceName);
     try {
         $connection = new PagSeguroHttpConnection();
         $connection->get(self::buildTransactionNotificationUrl($connectionData, $notificationCode), $connectionData->getServiceTimeout(), $connectionData->getCharset());
         $httpStatus = new PagSeguroHttpStatus($connection->getStatus());
         switch ($httpStatus->getType()) {
             case 'OK':
                 // parses the transaction
                 $transaction = PagSeguroTransactionParser::readTransaction($connection->getResponse());
                 LogPagSeguro::info("PagSeguroNotificationService.CheckTransaction(notificationCode={$notificationCode}) - end " . $transaction->toString() . ")");
                 break;
             case 'BAD_REQUEST':
                 $errors = PagSeguroTransactionParser::readErrors($connection->getResponse());
                 $e = new PagSeguroServiceException($httpStatus, $errors);
                 LogPagSeguro::info("PagSeguroNotificationService.CheckTransaction(notificationCode={$notificationCode}) - error " . $e->getOneLineMessage());
                 throw $e;
                 break;
             default:
                 $e = new PagSeguroServiceException($httpStatus);
                 LogPagSeguro::info("PagSeguroNotificationService.CheckTransaction(notificationCode={$notificationCode}) - error " . $e->getOneLineMessage());
                 throw $e;
                 break;
         }
         return isset($transaction) ? $transaction : null;
     } catch (PagSeguroServiceException $e) {
         throw $e;
     } catch (Exception $e) {
         LogPagSeguro::error("Exception: " . $e->getMessage());
         throw $e;
     }
 }
开发者ID:muratgoktuna,项目名称:joomla-payments,代码行数:44,代码来源:PagSeguroNotificationService.class.php


示例2: createRequest

 /**
  * @param PagSeguroCredentials $credentials
  * @param $transactionCode
  * @throws Exception
  * @throws PagSeguroServiceException
  */
 public static function createRequest(PagSeguroCredentials $credentials, $transactionCode)
 {
     LogPagSeguro::info("PagSeguroCancelService.Register(" . $transactionCode . ") - begin");
     $connectionData = new PagSeguroConnectionData($credentials, self::SERVICE_NAME);
     try {
         $connection = new PagSeguroHttpConnection();
         $connection->post(self::buildCancelURL($connectionData, $transactionCode), array(), $connectionData->getServiceTimeout(), $connectionData->getCharset());
         $httpStatus = new PagSeguroHttpStatus($connection->getStatus());
         switch ($httpStatus->getType()) {
             case 'OK':
                 $result = PagSeguroCancelParser::readSuccessXml($connection->getResponse());
                 LogPagSeguro::info("PagSeguroCancelService.createRequest(" . $result . ") - end ");
                 break;
             case 'BAD_REQUEST':
                 $errors = PagSeguroCancelParser::readErrors($connection->getResponse());
                 $err = new PagSeguroServiceException($httpStatus, $errors);
                 LogPagSeguro::error("PagSeguroCancelService.createRequest() - error " . $err->getOneLineMessage());
                 throw $err;
                 break;
             default:
                 $err = new PagSeguroServiceException($httpStatus);
                 LogPagSeguro::error("PagSeguroCancelService.createRequest() - error " . $err->getOneLineMessage());
                 throw $err;
                 break;
         }
         return isset($result) ? $result : false;
     } catch (PagSeguroServiceException $err) {
         throw $err;
     } catch (Exception $err) {
         LogPagSeguro::error("Exception: " . $err->getMessage());
         throw $err;
     }
 }
开发者ID:cabrerabywaters,项目名称:magentoSunshine,代码行数:39,代码来源:PagSeguroCancelService.class.php


示例3: getSession

 public static function getSession($credentials)
 {
     $connectionData = new PagSeguroConnectionData($credentials, 'sessionService');
     $url = self::buildSessionURL($connectionData) . "?" . $connectionData->getCredentialsUrlQuery();
     try {
         $connection = new PagSeguroHttpConnection();
         $connection->post($url, array(), $connectionData->getServiceTimeout(), $connectionData->getCharset());
         $httpStatus = new PagSeguroHttpStatus($connection->getStatus());
         switch ($httpStatus->getType()) {
             case 'OK':
                 $session = PagSeguroSessionParser::readResult($connection->getResponse());
                 return $session->getId();
                 LogPagSeguro::info("PagSeguroSessionService.getSession()(" . $session->toString() . ") - end {1}");
                 break;
             case 'BAD_REQUEST':
                 $errors = PagSeguroSessionParser::readErrors($connection->getStatus());
                 $e = new PagSeguroServiceException($httpStatus, $errors);
                 LogPagSeguro::error("PagSeguroSessionService.getSession() - error " . $e->getOneLineMessage());
                 throw $e;
                 break;
             default:
                 $e = new PagSeguroServiceException($httpStatus);
                 LogPagSeguro::error("PagSeguroSessionService.getSession() - error " . $e->getOneLineMessage());
                 throw $e;
                 break;
         }
     } catch (PagSeguroServiceException $e) {
         throw $e;
     } catch (Exception $e) {
         LogPagSeguro::error("Exception: " . $e->getMessage());
         throw $e;
     }
 }
开发者ID:caina,项目名称:pando,代码行数:33,代码来源:PagSeguroSessionService.class.php


示例4: createCheckoutRequest

 public static function createCheckoutRequest(Credentials $credentials, PaymentRequest $paymentRequest)
 {
     LogPagSeguro::info("PaymentService.Register(" . $paymentRequest->toString() . ") - begin");
     $connectionData = new PagSeguroConnectionData($credentials, self::serviceName);
     try {
         $connection = new HttpConnection();
         $connection->post(self::buildCheckoutRequestUrl($connectionData), PaymentParser::getData($paymentRequest), $connectionData->getServiceTimeout(), $connectionData->getCharset());
         $httpStatus = new HttpStatus($connection->getStatus());
         switch ($httpStatus->getType()) {
             case 'OK':
                 $PaymentParserData = PaymentParser::readSuccessXml($connection->getResponse());
                 $paymentUrl = self::buildCheckoutUrl($connectionData, $PaymentParserData->getCode());
                 LogPagSeguro::info("PaymentService.Register(" . $paymentRequest->toString() . ") - end {1}" . $PaymentParserData->getCode());
                 break;
             case 'BAD_REQUEST':
                 $errors = PaymentParser::readErrors($connection->getResponse());
                 $e = new PagSeguroServiceException($httpStatus, $errors);
                 LogPagSeguro::error("PaymentService.Register(" . $paymentRequest->toString() . ") - error " . $e->getOneLineMessage());
                 throw $e;
                 break;
             default:
                 $e = new PagSeguroServiceException($httpStatus);
                 LogPagSeguro::error("PaymentService.Register(" . $paymentRequest->toString() . ") - error " . $e->getOneLineMessage());
                 throw $e;
                 break;
         }
         return isset($paymentUrl) ? $paymentUrl : false;
     } catch (PagSeguroServiceException $e) {
         throw $e;
     } catch (Exception $e) {
         LogPagSeguro::error("Exception: " . $e->getMessage());
         throw $e;
     }
 }
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:34,代码来源:PaymentService.class.php


示例5: __construct

 private function __construct()
 {
     self::$path = dirname(__FILE__);
     PagSeguroAutoloader::init();
     self::$resources = PagSeguroResources::init();
     self::$config = PagSeguroConfig::init();
     self::$log = LogPagSeguro::init();
 }
开发者ID:ronal2do,项目名称:openshift-wordpress-developer-quickstart,代码行数:8,代码来源:PagSeguroLibrary.php


示例6: printLog

 private static function printLog($strType = null)
 {
     $count = 4;
     echo "<h2>Receive notifications</h2>";
     if ($strType) {
         echo "<h4>notifcationType: {$strType}</h4>";
     }
     echo "<p>Last <strong>{$count}</strong> items in <strong>log file:</strong></p><hr>";
     echo LogPagSeguro::getHtml($count);
 }
开发者ID:reginaldojunior,项目名称:winners,代码行数:10,代码来源:notificationListener.php


示例7: __construct

 private function __construct()
 {
     self::$path = dirname(__FILE__);
     if (function_exists('spl_autoload_register')) {
         require_once "loader" . DIRECTORY_SEPARATOR . "PagSeguroAutoLoader.class.php";
         PagSeguroAutoloader::init();
     } else {
         require_once "loader" . DIRECTORY_SEPARATOR . "PagSeguroAutoLoader.php";
     }
     self::$resources = PagSeguroResources::init();
     self::$config = PagSeguroConfig::init();
     self::$log = LogPagSeguro::init();
 }
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:13,代码来源:PagSeguroLibrary.php


示例8: __construct

 public function __construct()
 {
     if (self::verifyDependencies()) {
         if (self::$library == null) {
             self::$path = dirname(__FILE__);
             PagSeguroAutoloader::init();
             self::$resources = PagSeguroResources::init();
             self::$config = PagSeguroConfig::init();
             self::$log = LogPagSeguro::init();
             self::$library = $this;
         }
     }
     return self::$library;
 }
开发者ID:houstonfernandes,项目名称:pagseguro-codeigniter,代码行数:14,代码来源:pagsegurolibrary.php


示例9: getRetorno

 public static function getRetorno($code, $type)
 {
     $this->ci->log_message('error', $code . '|' . $type);
     if ($code && $type) {
         $notificationType = new PagSeguroNotificationType($type);
         $strType = $notificationType->getTypeFromValue();
         switch ($strType) {
             case 'TRANSACTION':
                 return self::transactionNotification($code);
                 break;
             default:
                 LogPagSeguro::error("Unknown notification type [" . $notificationType->getValue() . "]");
                 show_error('PagSeguroLibrary: Unknown notification type [' . $notificationType->getValue() . ']');
                 break;
         }
     } else {
         LogPagSeguro::error("Invalid notification parameters.");
         show_error('PagSeguroLibrary: Invalid notification parameters.');
     }
 }
开发者ID:rcalderini,项目名称:pagseguro-codeigniter,代码行数:20,代码来源:pagseguro.php


示例10: main

 public static function main()
 {
     $code = self::verifyData($_POST['notificationCode']);
     $type = self::verifyData($_POST['notificationtype']);
     if ($code && $type) {
         $notificationType = new NotificationType($type);
         $strType = $notificationType->getTypeFromValue();
         switch ($strType) {
             case 'TRANSACTION':
                 self::TransactionNotification($code);
                 break;
             default:
                 LogPagSeguro::error("Tipo de notificação não reconhecido [" . $notificationType->getValue() . "]");
         }
         self::saveLog($strType);
     } else {
         LogPagSeguro::error("Os parâmetros de notificação (notificationCode e notificationType) não foram recebidos.");
         self::saveLog();
     }
 }
开发者ID:nataliajulieta,项目名称:old,代码行数:20,代码来源:notification.php


示例11: getInstallments

 public static function getInstallments($credentials, $session, $amount, $cardBrand)
 {
     $connectionData = new PagSeguroConnectionData($credentials, 'installmentService');
     $url = self::buildInstallmentURL($connectionData) . "?sessionId=" . $session . "&amount=" . $amount . "&creditCardBrand=" . $cardBrand;
     LogPagSeguro::info("PagSeguroInstallmentService.getInstallments(" . $amount . "," . $cardBrand . ") - begin");
     try {
         $connection = new PagSeguroHttpConnection();
         $connection->get($url, $connectionData->getServiceTimeout(), $connectionData->getCharset());
         $httpStatus = new PagSeguroHttpStatus($connection->getStatus());
         switch ($httpStatus->getType()) {
             case 'OK':
                 $installments = PagSeguroInstallmentParser::readInstallments($connection->getResponse());
                 if (is_array($installments)) {
                     LogPagSeguro::info("PagSeguroInstallmentService.getInstallments() - end {1}");
                 } else {
                     LogPagSeguro::info("PagSeguroInstallmentService.getInstallments() - error" . $installments->message);
                     throw new Exception($installments->message);
                 }
                 break;
             case 'BAD_REQUEST':
                 $errors = PagSeguroInstallmentParser::readErrors($connection->getResponse());
                 $e = new PagSeguroServiceException($httpStatus, $errors);
                 LogPagSeguro::error("PagSeguroInstallmentService.getInstallments() - error " . $e->getOneLineMessage());
                 throw $e;
                 break;
             default:
                 $e = new PagSeguroServiceException($httpStatus);
                 LogPagSeguro::error("PagSeguroInstallmentService.getInstallments() - error " . $e->getOneLineMessage());
                 throw $e;
                 break;
         }
         return isset($installments) ? $installments : false;
     } catch (PagSeguroServiceException $e) {
         throw $e;
     } catch (Exception $e) {
         LogPagSeguro::error("Exception: " . $e->getMessage());
         throw $e;
     }
 }
开发者ID:esilvajr,项目名称:magento,代码行数:39,代码来源:PagSeguroInstallmentService.class.php


示例12: getResult

 /**
  * @param $connection
  * @return null|PagSeguroParserData
  * @throws PagSeguroServiceException
  */
 private function getResult($connection)
 {
     $httpStatus = new PagSeguroHttpStatus($connection->getStatus());
     switch ($httpStatus->getType()) {
         case 'OK':
             $cancel = PagSeguroCancelParser::readSuccessXml($connection->getResponse());
             LogPagSeguro::info("PagSeguroCancelService.createRequest(" . $cancel . ") - end ");
             break;
         case 'BAD_REQUEST':
             $errors = PagSeguroCancelParser::readErrors($connection->getResponse());
             $err = new PagSeguroServiceException($httpStatus, $errors);
             LogPagSeguro::error("PagSeguroCancelService.createRequest() - error " . $err->getOneLineMessage());
             throw $err;
             break;
         default:
             $err = new PagSeguroServiceException($httpStatus);
             LogPagSeguro::error("PagSeguroCancelService.createRequest() - error " . $err->getOneLineMessage());
             throw $err;
             break;
     }
     return isset($cancel) ? $cancel : false;
 }
开发者ID:songinfo,项目名称:php,代码行数:27,代码来源:PagSeguroCancelService.class.php


示例13: createLog

 private function createLog()
 {
     /*** Retrieving configurated default charset */
     PagSeguroConfig::setApplicationCharset(Configuration::get('PAGSEGURO_CHARSET'));
     /*** Retrieving configurated default log info */
     if (Configuration::get('PAGSEGURO_LOG_ACTIVE')) {
         PagSeguroConfig::activeLog(_PS_ROOT_DIR_ . Configuration::get('PAGSEGURO_LOG_FILELOCATION'));
     }
     LogPagSeguro::info("PagSeguroAbandoned.Search( 'Pesquisa de transações abandonadas realizada em " . date("d/m/Y H:i") . ".')");
 }
开发者ID:franklindias,项目名称:prestashop,代码行数:10,代码来源:PagSeguroAbandonedOrder.php


示例14: activeLog

 public static function activeLog($fileName = null)
 {
     self::setData('log', 'active', true);
     self::setData('log', 'fileLocation', $fileName ? $fileName : '');
     LogPagSeguro::reLoad();
 }
开发者ID:vrenkanal,项目名称:php,代码行数:6,代码来源:PagSeguroConfig.class.php


示例15: createLog

 public function createLog($type, $dados)
 {
     /*** Retrieving configurated default charset */
     PagSeguroConfig::setApplicationCharset(Configuration::get('PAGSEGURO_CHARSET'));
     /*** Retrieving configurated default log info */
     if (Configuration::get('PAGSEGURO_LOG_ACTIVE')) {
         PagSeguroConfig::activeLog(_PS_ROOT_DIR_ . Configuration::get('PAGSEGURO_LOG_FILELOCATION'));
     }
     switch ($type) {
         case 'search':
             LogPagSeguro::info("PagSeguroConciliation.Search( 'Pesquisa de conciliação realizada em " . date("d/m/Y H:i") . " em um intervalo de " . $dados['days'] . " dias.')");
             break;
         default:
             LogPagSeguro::info("PagSeguroConciliation.Register( 'Alteração de Status da compra '" . $dados['idOrder'] . "' para o Status '" . $dados['newStatus'] . "(" . $dados['newIdStatus'] . ")' - '" . date("d/m/Y H:i") . "') - end");
             break;
     }
 }
开发者ID:kennedimalheiros,项目名称:prestashop,代码行数:17,代码来源:conciliation.php


示例16: searchReturn

 /**
  * @param PagSeguroHttpConnection $connection
  * @param string $code
  * @return bool|mixed|string
  * @throws PagSeguroServiceException
  */
 private function searchReturn($connection, $parsers, $code)
 {
     $httpStatus = new PagSeguroHttpStatus($connection->getStatus());
     switch ($httpStatus->getType()) {
         case 'OK':
             LogPagSeguro::info(sprintf("PagSeguroNotificationService.%s(notificationCode={$code}) - end ", self::$logService) . $parsers->toString() . ")");
             break;
         case 'BAD_REQUEST':
             $errors = PagSeguroServiceParser::readErrors($connection->getResponse());
             $err = new PagSeguroServiceException($httpStatus, $errors);
             LogPagSeguro::info(sprintf("PagSeguroNotificationService.%s(notificationCode={$code}) - error ", self::$logService) . $err->getOneLineMessage());
             throw $err;
             break;
         default:
             $err = new PagSeguroServiceException($httpStatus);
             LogPagSeguro::info(sprintf("PagSeguroNotificationService.%s(notificationCode={$code}) - error ", self::$logService) . $err->getOneLineMessage());
             throw $err;
             break;
     }
     return isset($parsers) ? $parsers : null;
 }
开发者ID:caina,项目名称:pando,代码行数:27,代码来源:PagSeguroNotificationService.class.php


示例17: searchResult

 private function searchResult($connection, $initialDate = null, $finalDate = null)
 {
     $httpStatus = new PagSeguroHttpStatus($connection->getStatus());
     switch ($httpStatus->getType()) {
         case 'OK':
             $searchResult = PagSeguroTransactionParser::readSearchResult($connection->getResponse());
             LogPagSeguro::info(sprintf("PagSeguroTransactionSearchService.%s(initialDate=" . PagSeguroHelper::formatDate($initialDate) . ", finalDate=" . PagSeguroHelper::formatDate($finalDate) . ") - end ", self::$logService) . $searchResult->toString());
             break;
         case 'BAD_REQUEST':
             $errors = PagSeguroTransactionParser::readErrors($connection->getResponse());
             $err = new PagSeguroServiceException($httpStatus, $errors);
             LogPagSeguro::error(sprintf("PagSeguroTransactionSearchService.%s(initialDate=" . PagSeguroHelper::formatDate($initialDate) . ", finalDate=" . PagSeguroHelper::formatDate($finalDate) . ") - end ", self::$logService) . $err->getOneLineMessage());
             throw $err;
             break;
         default:
             $err = new PagSeguroServiceException($httpStatus);
             LogPagSeguro::error(sprintf("PagSeguroTransactionSearchService.%s(initialDate=" . PagSeguroHelper::formatDate($initialDate) . ", finalDate=" . PagSeguroHelper::formatDate($finalDate) . ") - end ", self::$logService) . $err->getOneLineMessage());
             throw $err;
             break;
     }
     return isset($searchResult) ? $searchResult : false;
 }
开发者ID:lucaspedroso26,项目名称:ipanema_eventos,代码行数:22,代码来源:PagSeguroTransactionSearchService.class.php


示例18: searchAbandoned

 /**
  * Search transactions abandoned associated with this set of credentials within a date range
  *
  * @param PagSeguroCredentials $credentials
  * @param String $initialDate
  * @param String $finalDate
  * @param integer $pageNumber
  * @param integer $maxPageResults
  * @return PagSeguroTransactionSearchResult a object of PagSeguroTransactionSearchResult class
  * @see PagSeguroTransactionSearchResult
  * @throws PagSeguroServiceException
  * @throws Exception
  */
 public static function searchAbandoned(PagSeguroCredentials $credentials, $pageNumber, $maxPageResults, $initialDate, $finalDate = null)
 {
     LogPagSeguro::info("PagSeguroTransactionSearchService.searchAbandoned(initialDate=" . PagSeguroHelper::formatDate($initialDate) . ", finalDate=" . PagSeguroHelper::formatDate($finalDate) . ") - begin");
     $connectionData = new PagSeguroConnectionData($credentials, self::SERVICE_NAME);
     $searchParams = array('initialDate' => PagSeguroHelper::formatDate($initialDate), 'pageNumber' => $pageNumber, 'maxPageResults' => $maxPageResults);
     $searchParams['finalDate'] = $finalDate ? PagSeguroHelper::formatDate($finalDate) : null;
     try {
         $connection = new PagSeguroHttpConnection();
         $connection->get(self::buildSearchUrlAbandoned($connectionData, $searchParams), $connectionData->getServiceTimeout(), $connectionData->getCharset());
         $httpStatus = new PagSeguroHttpStatus($connection->getStatus());
         switch ($httpStatus->getType()) {
             case 'OK':
                 $searchResult = PagSeguroTransactionParser::readSearchResult($connection->getResponse());
                 LogPagSeguro::info("PagSeguroTransactionSearchService.searchAbandoned(initialDate=" . PagSeguroHelper::formatDate($initialDate) . ", finalDate=" . PagSeguroHelper::formatDate($finalDate) . ") - end " . $searchResult->toString());
                 break;
             case 'BAD_REQUEST':
                 $errors = PagSeguroTransactionParser::readErrors($connection->getResponse());
                 $e = new PagSeguroServiceException($httpStatus, $errors);
                 LogPagSeguro::error("PagSeguroTransactionSearchService.searchAbandoned(initialDate=" . PagSeguroHelper::formatDate($initialDate) . ", finalDate=" . PagSeguroHelper::formatDate($finalDate) . ") - end " . $e->getOneLineMessage());
                 throw $e;
                 break;
             default:
                 $e = new PagSeguroServiceException($httpStatus);
                 LogPagSeguro::error("PagSeguroTransactionSearchService.searchAbandoned(initialDate=" . PagSeguroHelper::formatDate($initialDate) . ", finalDate=" . PagSeguroHelper::formatDate($finalDate) . ") - end " . $e->getOneLineMessage());
                 throw $e;
                 break;
         }
         return isset($searchResult) ? $searchResult : false;
     } catch (PagSeguroServiceException $e) {
         throw $e;
     } catch (Exception $e) {
         LogPagSeguro::error("Exception: " . $e->getMessage());
         throw $e;
     }
 }
开发者ID:cbsistem,项目名称:PWD-Lib,代码行数:48,代码来源:PagSeguroTransactionSearchService.class.php


示例19: _doUpdateByNotification

 /**
  * Perform update by received PagSeguro notification
  * @param string $notificationCode
  */
 private function _doUpdateByNotification($notificationCode)
 {
     // getting configuration params data
     $paramsData = $this->_getParamsData();
     try {
         // getting credentials data
         $credentials = new PagSeguroAccountCredentials($paramsData['pagseguro_email'], $paramsData['pagseguro_token']);
         // getting transaction data object
         $transaction = PagSeguroNotificationService::checkTransaction($credentials, $notificationCode);
         // getting PagSeguro status number
         $statusPagSeguro = $transaction->getStatus()->getValue();
         // getting new order state
         $newStatus = $this->_getAssociatedStatus($paramsData, $statusPagSeguro);
         // getting status translation
         $statusTranslation = $this->_getStatusTranslation($statusPagSeguro);
         // performing update status
         if (!PagSeguroHelper::isEmpty($newStatus)) {
             $this->_updateOrderStatus($transaction->getReference(), $newStatus, $statusTranslation);
         }
     } catch (PagSeguroServiceException $e) {
         LogPagSeguro::error("Error trying get transaction [" . $e->getMessage() . "]");
     }
 }
开发者ID:saper,项目名称:organic-extensions,代码行数:27,代码来源:pagseguro.patch.php


示例20: searchAuthorizationsReturn

 /**
  * @param PagSeguroHttpConnection $connection
  * @return bool|mixed|string
  * @throws PagSeguroServiceException
  */
 private function searchAuthorizationsReturn($connection)
 {
     $httpStatus = new PagSeguroHttpStatus($connection->getStatus());
     switch ($httpStatus->getType()) {
         case 'OK':
             $authorization = PagSeguroAuthorizationParser::readSearchResult($connection->getResponse());
             LogPagSeguro::info("PagSeguroAuthorizationSearchService.searchAuthorizations() - end " . $authorization->toString());
             break;
         case 'BAD_REQUEST':
             $errors = PagSeguroAuthorizationParser::readErrors($connection->getResponse());
             $err = new PagSeguroServiceException($httpStatus, $errors);
             LogPagSeguro::error("PagSeguroAuthorizationSearchService.searchAuthorizations() - error " . $err->getOneLineMessage());
             throw $err;
             break;
         default:
             $err = new PagSeguroServiceException($httpStatus);
             LogPagSeguro::error("PagSeguroAuthorizationSearchService.searchAuthorizations() - error " . $err->getOneLineMessage());
             throw $err;
             break;
     }
     return isset($authorization) ? $authorization : false;
 }
开发者ID:esilvajr,项目名称:magento,代码行数:27,代码来源:PagSeguroAuthorizationSearchService.class.php



注:本文中的LogPagSeguro类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP LogPage类代码示例发布时间:2022-05-23
下一篇:
PHP LogModel类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap