Add Stripe integration: webhook controller, service, sync command, Connect account

- Create StripeService: webhook sync, signature verification, save secret to .env.local
- Create StripeWebhookController with signature verification (400 on invalid)
- Create stripe:sync command to auto-create webhook endpoint via Stripe API
- Webhook listens to all events (configurable later)
- Save webhook secret automatically to .env.local on creation
- Add stripeAccountId field to User entity for Stripe Connect + migration
- Tests: StripeServiceTest (5), StripeWebhookControllerTest (2), StripeSyncCommandTest (1), UserTest updated

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Serreau Jovann
2026-03-19 20:37:16 +01:00
parent 100ff96c70
commit 65887fb3da
9 changed files with 331 additions and 0 deletions

View File

@@ -146,6 +146,17 @@ class UserTest extends TestCase
self::assertSame(1.5, $user->getCommissionRate());
}
public function testStripeAccountIdField(): void
{
$user = new User();
self::assertNull($user->getStripeAccountId());
$result = $user->setStripeAccountId('acct_1234567890');
self::assertSame($user, $result);
self::assertSame('acct_1234567890', $user->getStripeAccountId());
}
public function testEmailVerificationFields(): void
{
$user = new User();