Skip to content

Deployment and account acceptance

Deploy the independent application to dtone.fluxr.co.za with PHP 8.4, PostgreSQL, HTTPS and a persistent queue/cache. Attach docs.dtone.fluxr.co.za to the same application. The app build generates public/docs, which Laravel serves on that hostname. See How the docs are built. Consumer migrations and DT Shop retail changes are separate work.

Installation

sh
composer install --no-dev --prefer-dist --optimize-autoloader
cp .env.example .env
php artisan key:generate
# Configure PostgreSQL and deployment-specific values securely.
php artisan migrate --force
php artisan dtone:setup
php artisan dtone:setup --admin-email=staff@example.com
npm ci
npm run build
php artisan optimize

The second setup command securely prompts for a new administrator password. It never prints a password. Re-running setup preserves existing account/vendor controls. There is no default production login. Keep .env, the application key, DT One credentials and webhook secrets outside source control.

Minimum environment settings

For an existing Laravel Cloud installation, keep its APP_KEY, application URL and attached database settings. Set APP_ENV=production and keep APP_DEBUG=false. DT One uses the live API endpoint, fixed in code. DTONE_ENVIRONMENT is no longer used.

Supply the DT One API username and password, callback URL and token, the two Turnstile keys, and your mail provider settings. The callback and login sections below explain their setup. Keep SESSION_ENCRYPT=true and DTONE_PRODUCTION_PURCHASES_ENABLED=false during setup.

The application already defaults to database queues, cache and sessions, with a 960-second queue retry-after. The provider uses production, account main and currency ZAR. There is no need to repeat these defaults in Cloud. Set DTONE_CURRENCY only if the funded account uses another currency, and DTONE_ACCOUNT_KEY only if the initialized account has another key. Limits, pricing and balance-alert recipients belong in the dashboard.

Advanced overrides remain available in config/dtone.php: confirmation grace is 60 seconds, reversal watch is 14 days, cost tolerance is 0.01, and catalogue retention is 0.8. The docs hostname defaults to docs.dtone.fluxr.co.za. Leave these defaults unless there is a specific operational reason to change them. The acceptance reference is needed only at the release gate below.

Login security

Set TURNSTILE_SITE_KEY and TURNSTILE_SECRET_KEY in the deployment environment using the Fluxr Cloudflare Turnstile widget. Add dtone.fluxr.co.za to its allowed hostnames and set APP_URL=https://dtone.fluxr.co.za. Rebuild the configuration cache after changing these values.

The dashboard verifies challenges server-side, including the hostname and dtone-login action. Failed, expired or unavailable verification blocks login; every attempt resets the widget. Both keys absent leave ordinary Filament login available for local setup. Supplying only one key blocks login until configuration is complete. Configure both keys before exposing the production dashboard.

Processes

Run separate supervised worker groups so a full catalogue import cannot delay balance polling or purchases:

sh
php artisan queue:work --queue=monitoring --timeout=90 --tries=1
php artisan queue:work --queue=purchases,reconciliation --timeout=90 --tries=1
php artisan queue:work --queue=webhooks,notifications,default --timeout=90 --tries=1
php artisan queue:work --queue=catalogue --timeout=900 --tries=1

Queue retry-after is 960 seconds, longer than the catalogue timeout. Durable financial claims remain authoritative even if a queue message is delivered twice. Restart workers after deploying code. Schedule php artisan schedule:run every minute using the host scheduler; only one scheduler should own the schedules, or use shared locks.

Use an actual mail transport for production. Monitor failed jobs, queue age, catalogue imports, balance freshness and scheduler/worker heartbeats. Serve only the Laravel public directory. Set APP_DEBUG=false, protect logs and database backups, and restrict dashboard staff access.

Callback configuration

Set DTONE_CALLBACK_URL=https://dtone.fluxr.co.za/api/v1/provider/callback and generate a secret DTONE_CALLBACK_TOKEN using 32 random bytes encoded as lowercase hex. Store the token in the environment secret manager. The gateway appends it to the callback URL; do not append it manually. Redact callback paths from proxy/access logs. Token rotation must allow for callbacks on already submitted transactions; reconciliation remains available if an old token is rejected.

Apply the new catalogue snapshot, exchange-rate and callback-marker migrations before restarting workers. For existing foreign-currency installations, publish account rates in Operations before issuing new quotes; vendor pricing rates are no longer authoritative. Production readiness checks the shared rate and secret callback configuration.

Existing unused sandbox-labelled accounts are migrated to production and remain paused. Accounts with catalogue, pricing, exchange-rate or transaction history block the migration rather than relabelling test data as live data. Preserve those records and provision a separate live account before deploying. Run migrations before starting the new workers.

Release gate

Keep DTONE_PRODUCTION_PURCHASES_ENABLED=false while configuring:

  • The correct provider environment, funded account identity, currency and credentials.
  • A complete account catalogue and verified product-family/identifier contracts.
  • Published account exchange rates for non-ZAR costs, followed by published prices for each active vendor; Jambo Talk remains inactive initially.
  • Positive daily/transaction/velocity limits and staff balance recipients.
  • Supervised workers, scheduler, mail, authenticated reconciliation and callback delivery.
  • Vendor webhook signatures, token scopes and PIN/eSIM retrieval permissions.

Run php artisan dtone:readiness. This is read-only and never enables purchasing. Record the account-specific acceptance reference in DTONE_ACCEPTANCE_REFERENCE only after acceptance is actually complete. Production admission requires this reference, the explicit production switch, PostgreSQL and durable queue/cache drivers. Resume account and vendor purchasing explicitly with an audit reason.

A configured reference is an operator attestation, not automated proof of provider acceptance. Live purchase proof requires a separate controlled release step. Do not migrate USSD, the Fluxr app or Jambo Talk, and do not reset DT Shop retail adjustments, as part of this application deployment.

Fluxr DT One API. Customer wallets and payment collection stay with your platform.