FOSSBilling \ Exception
Product not found FOSSBilling\Exception thrown with message "Product not found" Stacktrace: #7 FOSSBilling\Exception in /home/wowzahos/domains/app.wowzahosting.com/public_html/modules/Product/Api/Guest.php:82 #6 Box\Mod\Product\Api\Guest:get in /home/wowzahos/domains/app.wowzahosting.com/public_html/library/Api/Handler.php:113 #5 Api_Handler:__call in /home/wowzahos/domains/app.wowzahosting.com/public_html/modules/Order/Controller/Client.php:46 #4 Box\Mod\Order\Controller\Client:get_configure_product_by_slug in [internal]:0 #3 ReflectionMethod:invokeArgs in /home/wowzahos/domains/app.wowzahosting.com/public_html/library/Box/App.php:268 #2 Box_App:executeShared in /home/wowzahos/domains/app.wowzahosting.com/public_html/library/Box/App.php:399 #1 Box_App:processRequest in /home/wowzahos/domains/app.wowzahosting.com/public_html/library/Box/App.php:183 #0 Box_App:run in /home/wowzahos/domains/app.wowzahosting.com/public_html/index.php:115
Stack frames (8)
7
FOSSBilling\Exception
/modules/Product/Api/Guest.php:82
6
Box\Mod\Product\Api\Guest get
/library/Api/Handler.php:113
5
Api_Handler __call
/modules/Order/Controller/Client.php:46
4
Box\Mod\Order\Controller\Client get_configure_product_by_slug
[internal]:0
3
ReflectionMethod invokeArgs
/library/Box/App.php:268
2
Box_App executeShared
/library/Box/App.php:399
1
Box_App processRequest
/library/Box/App.php:183
0
Box_App run
/index.php:115
/home/wowzahos/domains/app.wowzahosting.com/public_html/modules/Product/Api/Guest.php
     * @throws \FOSSBilling\Exception
     */
    public function get($data)
    {
        if (!isset($data['id']) && !isset($data['slug'])) {
            throw new \FOSSBilling\Exception('Product ID or slug is missing');
        }
 
        $id = $data['id'] ?? null;
        $slug = $data['slug'] ?? null;
 
        $service = $this->getService();
        if ($id) {
            $model = $service->findOneActiveById((int) $id);
        } else {
            $model = $service->findOneActiveBySlug($slug);
        }
 
        if (!$model instanceof \Model_Product) {
            throw new \FOSSBilling\Exception('Product not found');
        }
 
        return $service->toApiArray($model);
    }
 
    /**
     * Get paginated list of product categories.
     *
     * @return array
     */
    public function category_get_list($data)
    {
        $data['status'] = 'enabled';
        $service = $this->getService();
 
        [$sql, $params] = $service->getProductCategorySearchQuery($data);
        $pager = $this->getDi()['pager']->getPaginatedResultSet($sql, $params, PaginationOptions::fromArray($data));
 
        foreach ($pager['list'] as $key => $item) {
            $category = $this->getDi()['db']->getExistingModelById('ProductCategory', $item['id'], 'Product category not found');
Arguments
  1. "Product not found"
    
/home/wowzahos/domains/app.wowzahosting.com/public_html/library/Api/Handler.php
        $api->setDi($this->di);
        $api->setMod($bb_mod);
        $api->setIdentity($this->identity);
        $api->setIp($this->getDi()['request']->getClientIp());
        if ($bb_mod->hasService()) {
            $api->setService($this->getDi()['mod_service']($mod));
        }
 
        if (!method_exists($api, $method_name) || !is_callable([$api, $method_name])) {
            $reflector = new ReflectionClass($api);
            if (!$reflector->hasMethod('__call')) {
                throw new FOSSBilling\Exception(':type API call :method does not exist in module :module', [':type' => ucfirst((string) $this->type), ':method' => $method_name, ':module' => $mod], 740);
            }
        }
 
        $data = is_array($arguments) ? $arguments : [];
 
        $this->validateRequiredParams($api, $method_name, $data);
 
        return $api->{$method_name}($arguments);
    }
 
    /**
     * Validate required parameters for an API method using attributes.
     *
     * @param Api_Abstract $api         The API instance
     * @param string       $method_name The method name
     * @param array        $data        The data array passed to the method
     *
     * @throws FOSSBilling\InformationException If required parameters are missing
     */
    public function validateRequiredParams(Api_Abstract $api, string $method_name, array $data): void
    {
        try {
            $reflection = new ReflectionMethod($api, $method_name);
        } catch (ReflectionException) {
            // Method doesn't exist, skip validation
            return;
        }
 
/home/wowzahos/domains/app.wowzahosting.com/public_html/modules/Order/Controller/Client.php
    }
 
    public function register(\Box_App &$app): void
    {
        $app->get('/order', 'get_products', [], static::class);
        $app->get('/order/service', 'get_orders', [], static::class);
        $app->get('/order/:id', 'get_configure_product', ['id' => '[0-9]+'], static::class);
        $app->get('/order/:slug', 'get_configure_product_by_slug', ['slug' => '[a-z0-9-]+'], static::class);
        $app->get('/order/service/manage/:id', 'get_order', ['id' => '[0-9]+'], static::class);
    }
 
    public function get_products(\Box_App $app): string
    {
        return $app->render('mod_order_index');
    }
 
    public function get_configure_product_by_slug(\Box_App $app, $slug): string
    {
        $api = $this->di['api_guest'];
        $product = $api->product_get(['slug' => $slug]);
        $tpl = 'mod_service' . $product['type'] . '_order';
        if ($api->system_template_exists(['file' => $tpl . '.html.twig'])) {
            return $app->render($tpl, ['product' => $product]);
        }
 
        return $app->render('mod_order_product', ['product' => $product]);
    }
 
    public function get_configure_product(\Box_App $app, $id): string
    {
        $api = $this->di['api_guest'];
        $product = $api->product_get(['id' => $id]);
        $tpl = 'mod_service' . $product['type'] . '_order';
        if ($api->system_template_exists(['file' => $tpl . '.html.twig'])) {
            return $app->render($tpl, ['product' => $product]);
        }
 
        return $app->render('mod_order_product', ['product' => $product]);
    }
 
[internal]
/home/wowzahos/domains/app.wowzahosting.com/public_html/library/Box/App.php
 
        $timeCollector->startMeasure('executeShared', 'Reflecting module controller (shared mapping)');
        $class = new $classname();
        if ($class instanceof InjectionAwareInterface) {
            $class->setDi($this->di);
        }
        $reflection = new ReflectionMethod($class::class, $methodName);
        $args = [];
        $args[] = $this; // first param always app instance
 
        foreach ($reflection->getParameters() as $param) {
            if (isset($params[$param->name])) {
                $args[$param->name] = $params[$param->name];
            } elseif ($param->isDefaultValueAvailable()) {
                $args[$param->name] = $param->getDefaultValue();
            }
        }
        $timeCollector->stopMeasure('executeShared');
 
        return $reflection->invokeArgs($class, $args);
    }
 
    protected function execute($methodName, $params, $classname = null): mixed
    {
        /** @var TimeDataCollector $timeCollector */
        $timeCollector = $this->debugBar->getCollector('time');
 
        $timeCollector->startMeasure('execute', 'Reflecting module controller');
 
        $reflection = new ReflectionMethod(static::class, $methodName);
        $args = [];
 
        foreach ($reflection->getParameters() as $param) {
            if (isset($params[$param->name])) {
                $args[$param->name] = $params[$param->name];
            } elseif ($param->isDefaultValueAvailable()) {
                $args[$param->name] = $param->getDefaultValue();
            }
        }
 
/home/wowzahos/domains/app.wowzahosting.com/public_html/library/Box/App.php
 
                    return $apiController->renderJson(null, $exc);
                }
 
                return $this->renderResponse('mod_system_maintenance', [], 503);
            }
        }
 
        /** @var TimeDataCollector $timeCollector */
        $timeCollector = $this->debugBar->getCollector('time');
 
        $timeCollector->startMeasure('sharedMapping', 'Checking shared mappings');
        $sharedCount = count($this->shared);
        for ($i = 0; $i < $sharedCount; ++$i) {
            $mapping = $this->shared[$i];
            $url = new Box_UrlHelper($mapping[0], $mapping[1], $mapping[3], $this->url, $this->getRequest()->getMethod());
            if ($url->match) {
                $timeCollector->stopMeasure('sharedMapping');
 
                return $this->normalizeResponse($this->executeShared($mapping[4], $mapping[2], $url->params));
            }
        }
        $timeCollector->stopMeasure('sharedMapping');
 
        // this class mappings
        $timeCollector->startMeasure('mapping', 'Checking mappings');
        $mappingsCount = count($this->mappings);
        for ($i = 0; $i < $mappingsCount; ++$i) {
            $mapping = $this->mappings[$i];
            $url = new Box_UrlHelper($mapping[0], $mapping[1], $mapping[3], $this->url, $this->getRequest()->getMethod());
            if ($url->match) {
                $timeCollector->stopMeasure('mapping');
 
                return $this->normalizeResponse($this->execute($mapping[2], $url->params));
            }
        }
        $timeCollector->stopMeasure('mapping');
 
        $e = new FOSSBilling\InformationException('Page :url not found', [':url' => $this->url], 404);
 
/home/wowzahos/domains/app.wowzahosting.com/public_html/library/Box/App.php
 
    public function run(): Response
    {
        /** @var TimeDataCollector $timeCollector */
        $timeCollector = $this->debugBar->getCollector('time');
 
        try {
            $timeCollector->startMeasure('registerModule', 'Registering module routes');
            $this->registerModule();
            $timeCollector->stopMeasure('registerModule');
 
            $timeCollector->startMeasure('init', 'Initializing the app');
            $this->init();
            $timeCollector->stopMeasure('init');
 
            $timeCollector->startMeasure('checkperm', 'Checking access to module');
            $this->checkPermission();
            $timeCollector->stopMeasure('checkperm');
 
            return $this->processRequest();
        } catch (AuthenticationRequiredException $e) {
            if ($e->getArea() === 'admin') {
                $this->di['set_return_uri'];
 
                return new RedirectResponse($this->di['url']->adminLink('staff/login'));
            }
 
            $this->di['set_return_uri'];
 
            return new RedirectResponse($this->di['url']->link('login'));
        } catch (EmailValidationRequiredException) {
            return new RedirectResponse($this->di['url']->link('client/profile'));
        } catch (HttpResponseException $e) {
            return $e->getResponse();
        }
    }
 
    /**
     * @param string $path
     */
/home/wowzahos/domains/app.wowzahosting.com/public_html/index.php
$timeCollector?->stopMeasure('translate');
 
// If HTTP error code has been passed, handle it.
if (!is_null($http_err_code)) {
    $http_err_code = intval($http_err_code);
    switch ($http_err_code) {
        case 404:
            $e = new FOSSBilling\Exception('Page :url not found', [':url' => $url], 404);
            $app->show404($e)->send();
 
            break;
        default:
            $e = new FOSSBilling\Exception('HTTP Error :err_code occurred while attempting to load :url', [':err_code' => $http_err_code, ':url' => $url], $http_err_code);
            (new Response($app->render('error', ['exception' => $e]), $http_err_code))->send();
    }
    exit;
}
 
// If no HTTP error passed, run the app.
$app->run()->send();
exit;
 

Environment & details:

Key Value
PHP Version
"8.3.31"
Error code
0
Instance ID
"e086f6af-ec56-43df-9336-7bd0493ea3c2"
empty
empty
empty
empty
empty
Key Value
PATH
"/usr/local/bin:/bin:/usr/bin"
HTTP_ACCEPT
"*/*"
HTTP_ACCEPT_ENCODING
"gzip, br, zstd, deflate"
HTTP_HOST
"app.wowzahosting.com"
HTTP_USER_AGENT
"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)"
DOCUMENT_ROOT
"/home/wowzahos/domains/app.wowzahosting.com/public_html"
REMOTE_ADDR
"216.73.216.217"
REMOTE_PORT
"13383"
SERVER_ADDR
"162.220.165.240"
SERVER_NAME
"app.wowzahosting.com"
SERVER_ADMIN
"webmaster@wowzahosting.com"
SERVER_PORT
"443"
REQUEST_SCHEME
"https"
REQUEST_URI
"/order/pro-bundle-4"
REDIRECT_URL
"/order/pro-bundle-4"
REDIRECT_REQUEST_METHOD
"GET"
HTTPS
"on"
HTTP_AUTHORIZATION
""
REDIRECT_STATUS
"200"
X_SPDY
"HTTP2"
SSL_PROTOCOL
"TLSv1.3"
SSL_CIPHER
"TLS_AES_256_GCM_SHA384"
SSL_CIPHER_USEKEYSIZE
"256"
SSL_CIPHER_ALGKEYSIZE
"256"
SCRIPT_FILENAME
"/home/wowzahos/domains/app.wowzahosting.com/public_html/index.php"
QUERY_STRING
""
SCRIPT_URI
"https://app.wowzahosting.com/order/pro-bundle-4"
SCRIPT_URL
"/order/pro-bundle-4"
SCRIPT_NAME
"/index.php"
SERVER_PROTOCOL
"HTTP/1.1"
SERVER_SOFTWARE
"LiteSpeed"
REQUEST_METHOD
"GET"
X-LSCACHE
"on"
PHP_SELF
"/index.php"
REQUEST_TIME_FLOAT
1781454711.6687
REQUEST_TIME
1781454711
empty
0. Whoops\Handler\PrettyPageHandler