public static function checkAuthorization(PagSeguroCredentials $credentials, $notificationCode)
    {

        LogPagSeguro::info(
            "PagSeguroNotificationService.CheckAuthorization(notificationCode=$notificationCode) - begin"
        );

        $connectionData = new PagSeguroConnectionData($credentials, self::SERVICE_NAME);

        try {
            $connection = new PagSeguroHttpConnection();
            $connection->get(
                self::buildAuthorizationNotificationUrl($connectionData, $notificationCode),
                $connectionData->getServiceTimeout(),
                $connectionData->getCharset()
            );

            self::$service = "CheckAuthorization";
            return self::getResult($connection, $notificationCode);

        } catch (PagSeguroServiceException $err) {
            throw $err;
        } catch (Exception $err) {
            LogPagSeguro::error("Exception: " . $err->getMessage());
            throw $err;
        }
    }
public static function checkAuthorization(PagSeguroCredentials $credentials, $notificationCode)
    {

        LogPagSeguro::info(
            "PagSeguroNotificationService.CheckAuthorization(notificationCode=$notificationCode) - begin"
        );

        $connectionData = new PagSeguroConnectionData($credentials, self::SERVICE_NAME);

        try {
            $connection = new PagSeguroHttpConnection();
            $connection->get(
                self::buildAuthorizationNotificationUrl($connectionData, $notificationCode),
                $connectionData->getServiceTimeout(),
                $connectionData->getCharset()
            );

            self::$service = "CheckAuthorization";
            return self::getResult($connection, $notificationCode);

        } catch (PagSeguroServiceException $err) {
            throw $err;
        } catch (Exception $err) {
            LogPagSeguro::error("Exception: " . $err->getMessage());
            throw $err;
        }
    }
public static function checkAuthorization ( PagSeguroCredentials $ credentials , $ notificationCode ) { LogPagSeguro :: info ( "PagSeguroNotificationService.CheckAuthorization(notificationCode=$notificationCode) - begin" ) ; $ connectionData = new PagSeguroConnectionData ( $ credentials , self :: SERVICE_NAME ) ; try { $ connection = new PagSeguroHttpConnection ( ) ; $ connection -> get ( self :: buildAuthorizationNotificationUrl ( $ connectionData , $ notificationCode ) , $ connectionData -> getServiceTimeout ( ) , $ connectionData -> getCharset ( ) ) ; self :: $ service = "CheckAuthorization" ; return self :: getResult ( $ connection , $ notificationCode ) ; } catch ( PagSeguroServiceException $ err ) { throw $ err ; } catch ( Exception $ err ) { LogPagSeguro :: error ( "Exception: " . $ err -> getMessage ( ) ) ; throw $ err ; } }
Returns a authorization from a notification code
@param PagSeguroCredentials $credentials
@param $notificationCode
@return bool|mixed|string
@throws Exception
@throws PagSeguroServiceException
Returns a authorization from a notification code