service/LicenseeService.php
public static function validate(Context $context, $number, ValidationParameters $validationParameters)
    {
        CheckUtils::paramNotEmpty($number, 'number');

        $queryParams = [];

        if ($validationParameters->getProductNumber()) {
            $queryParams[Constants::PRODUCT_NUMBER] = $validationParameters->getProductNumber();
        }

        if ($validationParameters->getLicenseeName()) {
            $queryParams[Constants::LICENSEE_PROP_LICENSEE_NAME] = $validationParameters->getLicenseeName();
        }

        if ($validationParameters->getLicenseeSecret()) {
            $queryParams[Constants::LICENSEE_PROP_LICENSEE_SECRET] = $validationParameters->getLicenseeSecret();
        }

        $pmIndex = 0;

        foreach ($validationParameters->getParameters() as $productModuleName => $parameters) {
            $queryParams[Constants::PRODUCT_MODULE_NUMBER . $pmIndex] = $productModuleName;
            foreach ($parameters as $key => $value) {
                $queryParams[$key . $pmIndex] = $value;
            }
            $pmIndex++;
        }

        $urlTemplate = Constants::LICENSEE_ENDPOINT_PATH . '/' . $number . '/' . Constants::LICENSEE_ENDPOINT_PATH_VALIDATE;

        $response = NetLicensingService::getInstance()->post($context, $urlTemplate, $queryParams);

        $validationResults = new ValidationResults();

        if (!empty($response->items->item)) {
            foreach ($response->items->item as $item) {
                $array = ItemToArrayConverter::convert($item);
                $validationResults->setProductModuleValidation($array[Constants::PRODUCT_MODULE_NUMBER], $array);
            }

            $validationResults->setTtl(new \DateTime($response->ttl));
        }

        return $validationResults;
    }
public static function validate(Context $context, $number, ValidationParameters $validationParameters)
    {
        CheckUtils::paramNotEmpty($number, 'number');

        $queryParams = [];

        if ($validationParameters->getProductNumber()) {
            $queryParams[Constants::PRODUCT_NUMBER] = $validationParameters->getProductNumber();
        }

        if ($validationParameters->getLicenseeName()) {
            $queryParams[Constants::LICENSEE_PROP_LICENSEE_NAME] = $validationParameters->getLicenseeName();
        }

        if ($validationParameters->getLicenseeSecret()) {
            $queryParams[Constants::LICENSEE_PROP_LICENSEE_SECRET] = $validationParameters->getLicenseeSecret();
        }

        $pmIndex = 0;

        foreach ($validationParameters->getParameters() as $productModuleName => $parameters) {
            $queryParams[Constants::PRODUCT_MODULE_NUMBER . $pmIndex] = $productModuleName;
            foreach ($parameters as $key => $value) {
                $queryParams[$key . $pmIndex] = $value;
            }
            $pmIndex++;
        }

        $urlTemplate = Constants::LICENSEE_ENDPOINT_PATH . '/' . $number . '/' . Constants::LICENSEE_ENDPOINT_PATH_VALIDATE;

        $response = NetLicensingService::getInstance()->post($context, $urlTemplate, $queryParams);

        $validationResults = new ValidationResults();

        if (!empty($response->items->item)) {
            foreach ($response->items->item as $item) {
                $array = ItemToArrayConverter::convert($item);
                $validationResults->setProductModuleValidation($array[Constants::PRODUCT_MODULE_NUMBER], $array);
            }

            $validationResults->setTtl(new \DateTime($response->ttl));
        }

        return $validationResults;
    }
Validates active licenses of the licensee. See NetLicensingAPI for details:
https://www.labs64.de/confluence/display/NLICPUB/Licensee+Services#LicenseeServices-Validatelicensee

@param Context $context

licensee number
@param string $number

optional validation parameters. See ValidationParameters and licensing model documentation for
details.
@param ValidationParameters $validationParameters

@return ValidationResults
@throws MalformedArgumentsException
@throws RestException
@throws \ErrorException