Add Frontdesk Pro wallet renewal scheduling.
Deploy Ladill Frontdesk / deploy (push) Successful in 58s

Monthly auto-renew charges due organizations from the Ladill wallet and downgrades after grace when payment fails.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-06-30 01:07:21 +00:00
co-authored by Cursor
parent fa3a691d8f
commit 1f6df54d8c
6 changed files with 144 additions and 1 deletions
+22
View File
@@ -86,6 +86,28 @@ class FrontdeskProTest extends TestCase
$this->assertSame('pro', $this->organization->fresh()->settings['plan']);
}
public function test_pro_renew_extends_subscription_when_wallet_charges(): void
{
$this->organization->update([
'settings' => [
'onboarded' => true,
'plan' => 'pro',
'auto_renew' => true,
'plan_expires_at' => now()->subDay()->toIso8601String(),
],
]);
Http::fake([
'billing.test/debit' => Http::response(['ok' => true]),
]);
$this->artisan('frontdesk:pro-renew')->assertSuccessful();
$settings = $this->organization->fresh()->settings;
$this->assertSame('pro', $settings['plan']);
$this->assertTrue(now()->parse($settings['plan_expires_at'])->isFuture());
}
public function test_pro_sidebar_shows_active_label_after_upgrade(): void
{
$this->organization->update([