public function isIdentified(VendorInterface $vendor)
    {

        $this->resetRestClient();

        $this->restClient->getConfig()->setPath(
            'request.options/headers/php-auth-user',
            $this->login
        );

        $this->restClient->getConfig()->setPath(
            'request.options/headers/php-auth-pw',
            $this->password
        );

        if (!empty($vendor->getHiPayId())) {
            $this->restClient->getConfig()->setPath(
                'request.options/headers/php-auth-subaccount-id',
                $vendor->getHiPayId()
            );
        }

        $command = $this->restClient->getCommand(
            'GetUserAccount',
            array()
        );

        $result = $this->executeRest($command);

        return $result['identified'] == 1 ? true : false;
    }
public function isIdentified(VendorInterface $vendor)
    {

        $this->resetRestClient();

        $this->restClient->getConfig()->setPath(
            'request.options/headers/php-auth-user',
            $this->login
        );

        $this->restClient->getConfig()->setPath(
            'request.options/headers/php-auth-pw',
            $this->password
        );

        if (!empty($vendor->getHiPayId())) {
            $this->restClient->getConfig()->setPath(
                'request.options/headers/php-auth-subaccount-id',
                $vendor->getHiPayId()
            );
        }

        $command = $this->restClient->getCommand(
            'GetUserAccount',
            array()
        );

        $result = $this->executeRest($command);

        return $result['identified'] == 1 ? true : false;
    }
public function isIdentified ( VendorInterface $ vendor ) { $ this -> resetRestClient ( ) ; $ this -> restClient -> getConfig ( ) -> setPath ( 'request.options/headers/php-auth-user' , $ this -> login ) ; $ this -> restClient -> getConfig ( ) -> setPath ( 'request.options/headers/php-auth-pw' , $ this -> password ) ; if ( ! empty ( $ vendor -> getHiPayId ( ) ) ) { $ this -> restClient -> getConfig ( ) -> setPath ( 'request.options/headers/php-auth-subaccount-id' , $ vendor -> getHiPayId ( ) ) ; } $ command = $ this -> restClient -> getCommand ( 'GetUserAccount' , array ( ) ) ; $ result = $ this -> executeRest ( $ command ) ; return $ result [ 'identified' ] == 1 ? true : false ; }
Return the identified status of the account.

@param VendorInterface $vendor
@return bool
@throws Exception
Return the identified status of the account .