# STEP 26 — GST Billing Production License Integration

This release connects the Laravel GST Billing application to the central License Server.

## Installer

Open `/install.php` after uploading the application. The installer activates the purchase code against:

- `/api_activate.php`
- product slug: `gst-billing-pro`

It writes the license values into `.env` and creates a local license state cache.

## Runtime protection

The `VerifySoftwareLicense` middleware checks the license through the heartbeat API. A successful verification is cached for 24 hours. If the license server is temporarily unreachable, the last successful verification can continue for up to 72 hours. Explicit expired/revoked/suspended/product-mismatch/activation failures are not bypassed.

## Production requirements

- PHP 8.2+
- cURL
- OpenSSL
- HTTPS
- Writable `storage/`
- Writable `.env` only during installation/configuration
- Document root pointed to `public/`

## Final smoke test

1. Activate a real test Purchase Code.
2. Confirm the activation appears in License Server > Licenses > Domains.
3. Login to GST Billing.
4. Confirm normal dashboard access.
5. Force/trigger heartbeat and confirm `last_seen_at` changes.
6. Deactivate the domain from the License Server/customer flow.
7. Confirm the GST Billing application blocks access after the next verification.
8. Reactivate and confirm access returns.
9. Test an expired/revoked license.
10. Test temporary License Server outage and confirm the grace period behavior.
