public function checkHandlerRequest()
    {
        $ip = $this->getIp();
        if (!isset($_GET['method'])) {
            throw new InvalidArgumentException('Method is null');
        }

        if (!isset($_GET['params'])) {
            throw new InvalidArgumentException('Params is null');
        }

        list($method, $params) = array($_GET['method'], $_GET['params']);

        if (!in_array($method, $this->supportedPartnerMethods)) {
            throw new UnexpectedValueException('Method is not supported');
        }

        if (!isset($params['signature']) || $params['signature'] != $this->getSignature($params, $method)) {
            throw new InvalidArgumentException('Wrong signature');
        }

        /**
         * IP address check
         * @link http://help.unitpay.ru/article/67-ip-addresses
         */
        if (!in_array($ip, $this->supportedUnitpayIp)) {
            throw new InvalidArgumentException('IP address Error');
        }

        return true;
    }
public function checkHandlerRequest()
    {
        $ip = $this->getIp();
        if (!isset($_GET['method'])) {
            throw new InvalidArgumentException('Method is null');
        }

        if (!isset($_GET['params'])) {
            throw new InvalidArgumentException('Params is null');
        }

        list($method, $params) = array($_GET['method'], $_GET['params']);

        if (!in_array($method, $this->supportedPartnerMethods)) {
            throw new UnexpectedValueException('Method is not supported');
        }

        if (!isset($params['signature']) || $params['signature'] != $this->getSignature($params, $method)) {
            throw new InvalidArgumentException('Wrong signature');
        }

        /**
         * IP address check
         * @link http://help.unitpay.ru/article/67-ip-addresses
         */
        if (!in_array($ip, $this->supportedUnitpayIp)) {
            throw new InvalidArgumentException('IP address Error');
        }

        return true;
    }
public function checkHandlerRequest ( ) { $ ip = $ this -> getIp ( ) ; if ( ! isset ( $ _GET [ 'method' ] ) ) { throw new InvalidArgumentException ( 'Method is null' ) ; } if ( ! isset ( $ _GET [ 'params' ] ) ) { throw new InvalidArgumentException ( 'Params is null' ) ; } list ( $ method , $ params ) = array ( $ _GET [ 'method' ] , $ _GET [ 'params' ] ) ; if ( ! in_array ( $ method , $ this -> supportedPartnerMethods ) ) { throw new UnexpectedValueException ( 'Method is not supported' ) ; } if ( ! isset ( $ params [ 'signature' ] ) || $ params [ 'signature' ] != $ this -> getSignature ( $ params , $ method ) ) { throw new InvalidArgumentException ( 'Wrong signature' ) ; } /**
         * IP address check
         * @link http://help.unitpay.ru/article/67-ip-addresses
         */ if ( ! in_array ( $ ip , $ this -> supportedUnitpayIp ) ) { throw new InvalidArgumentException ( 'IP address Error' ) ; } return true ; }
Check request on handler from UnitPay

@return bool

@throws InvalidArgumentException
@throws UnexpectedValueException
Check request on handler from UnitPay