/** * @param PagSeguroCredentials $credentials * @param $notificationCode * @return null|PagSeguroParserData * @throws Exception * @throws PagSeguroServiceException */ public static function findByNotification(PagSeguroCredentials $credentials, $notificationCode) { LogPagSeguro::info("PagSeguroPreApprovalService.FindByNotification({$notificationCode}) - begin"); self::$connectionData = new PagSeguroConnectionData($credentials, self::SERVICE_NAME); try { $connection = new PagSeguroHttpConnection(); $connection->get(self::buildFindByNotificationUrl(self::$connectionData, $notificationCode), self::$connectionData->getServiceTimeout(), self::$connectionData->getCharset()); self::$service = "FindByNotification"; return self::getResult($connection, $notificationCode); } catch (PagSeguroServiceException $err) { //Logging LogPagSeguro::error("PagSeguroServiceException: " . $err->getMessage()); //Exception throw $err; } catch (Exception $err) { //Logging LogPagSeguro::error("Exception: " . $err->getMessage()); //Exception throw $err; } }