From e76955eaa484de46685756c9fee5fffb755c9a3c Mon Sep 17 00:00:00 2001 From: isaacclad Date: Mon, 8 Jun 2026 10:45:12 +0000 Subject: [PATCH] Reduce Transfer storage price to GHS 0.15 per GB per month. Updates config default, env examples, and removes hardcoded GHS 1.00 copy on the dashboard. Co-authored-by: Cursor --- .env.example | 2 +- DEPLOY.md | 2 +- app/Http/Controllers/Qr/AccountController.php | 2 +- app/Http/Controllers/Qr/AfiaController.php | 2 +- app/Http/Controllers/Transfer/FilesController.php | 2 +- app/Http/Controllers/Transfer/OverviewController.php | 2 +- app/Http/Controllers/Transfer/TransferController.php | 2 +- app/Models/Transfer.php | 2 +- app/Services/Afia/AfiaService.php | 2 +- config/transfer.php | 2 +- deploy/shared.env.example | 2 +- resources/views/transfer/dashboard.blade.php | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.env.example b/.env.example index 2abee16..a11d44f 100644 --- a/.env.example +++ b/.env.example @@ -37,7 +37,7 @@ BILLING_API_KEY_TRANSFER= IDENTITY_API_URL=https://ladill.com/api IDENTITY_API_KEY_TRANSFER= -TRANSFER_PRICE_PER_GB_MONTH=1.00 +TRANSFER_PRICE_PER_GB_MONTH=0.15 TRANSFER_MAX_FILE_BYTES=524288000 TRANSFER_MAX_FILES=20 TRANSFER_DEFAULT_RETENTION_DAYS=30 diff --git a/DEPLOY.md b/DEPLOY.md index 863f794..5238652 100644 --- a/DEPLOY.md +++ b/DEPLOY.md @@ -2,7 +2,7 @@ Standalone app for **secure file sharing** at `transfer.ladill.com` — upload files, get a QR code + share link, control retention, track downloads. Storage bills at -**GHS 1.00/GB/month** from the platform UserWallet. +**GHS 0.15/GB/month** from the platform UserWallet. Public scans stay at `ladill.com/q/`. The platform forwards transfer codes to this app (`TransferQrForwarder` on the monolith). diff --git a/app/Http/Controllers/Qr/AccountController.php b/app/Http/Controllers/Qr/AccountController.php index fe37f1a..b5b3865 100644 --- a/app/Http/Controllers/Qr/AccountController.php +++ b/app/Http/Controllers/Qr/AccountController.php @@ -61,7 +61,7 @@ class AccountController extends Controller $storageBytes = (int) $activeTransfers->sum('storage_bytes'); $storageGb = round($storageBytes / (1024 * 1024 * 1024), 2); - $pricePerGb = (float) config('transfer.price_per_gb_month', 1.0); + $pricePerGb = (float) config('transfer.price_per_gb_month', 0.15); $monthlyTotalGhs = round($activeTransfers->sum(fn (Transfer $transfer) => $transfer->monthlyCostGhs()), 2); return view('qr.account.billing', [ diff --git a/app/Http/Controllers/Qr/AfiaController.php b/app/Http/Controllers/Qr/AfiaController.php index d542a99..c1fcbc6 100644 --- a/app/Http/Controllers/Qr/AfiaController.php +++ b/app/Http/Controllers/Qr/AfiaController.php @@ -70,7 +70,7 @@ class AfiaController extends Controller ->whereNotNull('expires_at') ->whereBetween('expires_at', [now(), now()->addDays(7)]) ->count(), - 'storage_price_per_gb_month_ghs' => number_format((float) config('transfer.price_per_gb_month', 1.0), 2), + 'storage_price_per_gb_month_ghs' => number_format((float) config('transfer.price_per_gb_month', 0.15), 2), ]; if ($account->public_id) { diff --git a/app/Http/Controllers/Transfer/FilesController.php b/app/Http/Controllers/Transfer/FilesController.php index 5d2337b..230b01a 100644 --- a/app/Http/Controllers/Transfer/FilesController.php +++ b/app/Http/Controllers/Transfer/FilesController.php @@ -31,7 +31,7 @@ class FilesController extends Controller 'files' => $files, 'storageBytes' => (int) $storageBytes, 'storageGb' => round($storageBytes / (1024 * 1024 * 1024), 2), - 'pricePerGb' => (float) config('transfer.price_per_gb_month', 1.0), + 'pricePerGb' => (float) config('transfer.price_per_gb_month', 0.15), ]); } } diff --git a/app/Http/Controllers/Transfer/OverviewController.php b/app/Http/Controllers/Transfer/OverviewController.php index f74f1c5..47b436b 100644 --- a/app/Http/Controllers/Transfer/OverviewController.php +++ b/app/Http/Controllers/Transfer/OverviewController.php @@ -61,7 +61,7 @@ class OverviewController extends Controller } $storageGb = round($storageBytes / (1024 * 1024 * 1024), 2); - $monthlyEstimateGhs = round($storageGb * (float) config('transfer.price_per_gb_month', 1.0), 2); + $monthlyEstimateGhs = round($storageGb * (float) config('transfer.price_per_gb_month', 0.15), 2); return view('transfer.dashboard', [ 'activeCount' => $activeCount, diff --git a/app/Http/Controllers/Transfer/TransferController.php b/app/Http/Controllers/Transfer/TransferController.php index bfdaca2..25889a1 100644 --- a/app/Http/Controllers/Transfer/TransferController.php +++ b/app/Http/Controllers/Transfer/TransferController.php @@ -42,7 +42,7 @@ class TransferController extends Controller return view('transfer.transfers.create', [ 'defaultRetentionDays' => (int) config('transfer.default_retention_days', 30), 'maxFiles' => (int) config('transfer.max_files_per_transfer', 20), - 'pricePerGb' => (float) config('transfer.price_per_gb_month', 1.0), + 'pricePerGb' => (float) config('transfer.price_per_gb_month', 0.15), ]); } diff --git a/app/Models/Transfer.php b/app/Models/Transfer.php index f000b09..de3dbaa 100644 --- a/app/Models/Transfer.php +++ b/app/Models/Transfer.php @@ -79,6 +79,6 @@ class Transfer extends Model public function monthlyCostGhs(): float { - return round($this->storageGb() * (float) config('transfer.price_per_gb_month', 1.0), 2); + return round($this->storageGb() * (float) config('transfer.price_per_gb_month', 0.15), 2); } } diff --git a/app/Services/Afia/AfiaService.php b/app/Services/Afia/AfiaService.php index ff2a7ec..049eb4f 100644 --- a/app/Services/Afia/AfiaService.php +++ b/app/Services/Afia/AfiaService.php @@ -96,7 +96,7 @@ class AfiaService private function transferSystemPrompt(string $ctx): string { - $pricePerGb = number_format((float) config('transfer.price_per_gb_month', 1.0), 2); + $pricePerGb = number_format((float) config('transfer.price_per_gb_month', 0.15), 2); return << (float) env('TRANSFER_PRICE_PER_GB_MONTH', 1.0), + 'price_per_gb_month' => (float) env('TRANSFER_PRICE_PER_GB_MONTH', 0.15), // Max single-file upload size (bytes). Default 500 MB. 'max_file_bytes' => (int) env('TRANSFER_MAX_FILE_BYTES', 524288000), diff --git a/deploy/shared.env.example b/deploy/shared.env.example index 7a51c66..62bd8f3 100644 --- a/deploy/shared.env.example +++ b/deploy/shared.env.example @@ -37,7 +37,7 @@ BILLING_API_KEY_TRANSFER= IDENTITY_API_URL=https://ladill.com/api IDENTITY_API_KEY_TRANSFER= -TRANSFER_PRICE_PER_GB_MONTH=1.00 +TRANSFER_PRICE_PER_GB_MONTH=0.15 TRANSFER_MAX_FILE_BYTES=524288000 TRANSFER_MAX_FILES=20 TRANSFER_DEFAULT_RETENTION_DAYS=30 diff --git a/resources/views/transfer/dashboard.blade.php b/resources/views/transfer/dashboard.blade.php index e51f64f..d92fcb6 100644 --- a/resources/views/transfer/dashboard.blade.php +++ b/resources/views/transfer/dashboard.blade.php @@ -58,7 +58,7 @@

Wallet balance

{{ $fmt($balanceMinor) }}

-

Storage is billed at GHS 1.00 per GB per month from your Ladill wallet.

+

Storage is billed at GHS {{ number_format((float) config('transfer.price_per_gb_month', 0.15), 2) }} per GB per month from your Ladill wallet.