Bill all meet sessions per participant instead of per hour.
Deploy Ladill Meet / deploy (push) Successful in 46s

Meetings and webinars now share GHS 0.30 per peak participant, with usage UI and plan quotas updated to match.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-07-01 18:28:35 +00:00
co-authored by Cursor
parent d0a3361f37
commit 5c1affcca5
8 changed files with 38 additions and 127 deletions
+5 -3
View File
@@ -25,7 +25,7 @@ class MeetBillingTest extends TestCase
]);
}
public function test_session_end_records_streaming_usage_and_debits_wallet(): void
public function test_session_end_charges_per_participant(): void
{
$this->fakeAffordableBilling();
@@ -53,17 +53,19 @@ class MeetBillingTest extends TestCase
'status' => 'ended',
'started_at' => now()->subHour(),
'ended_at' => now(),
'peak_participants' => 4,
]);
app(UsageMeteringService::class)->recordSessionUsage($session);
$this->assertDatabaseHas('meet_usage_records', [
'organization_id' => $organization->id,
'metric' => 'streaming_hours',
'metric' => 'participant_count',
'quantity' => 4,
]);
Http::assertSent(fn ($request) => str_contains($request->url(), '/debit')
&& ($request->data()['source'] ?? '') === 'meet_streaming');
&& ($request->data()['source'] ?? '') === 'meet_participants');
}
public function test_webinar_session_end_charges_per_participant(): void