Add Stripe Connect account support and account.updated webhook handler

- Add stripeChargesEnabled and stripePayoutsEnabled fields to User entity + migration
- Handle account.updated webhook: sync charges_enabled and payouts_enabled from Stripe
- Add createAccountConnect() and createAccountLink() to StripeService
- Update organizer approved email with Stripe verification notice
- Tests: webhook account.updated with flags, unknown account, User stripe fields

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Serreau Jovann
2026-03-19 20:46:55 +01:00
parent 65887fb3da
commit c5e5f81fe8
7 changed files with 194 additions and 3 deletions

View File

@@ -146,15 +146,22 @@ class UserTest extends TestCase
self::assertSame(1.5, $user->getCommissionRate());
}
public function testStripeAccountIdField(): void
public function testStripeFields(): void
{
$user = new User();
self::assertNull($user->getStripeAccountId());
self::assertFalse($user->isStripeChargesEnabled());
self::assertFalse($user->isStripePayoutsEnabled());
$result = $user->setStripeAccountId('acct_1234567890')
->setStripeChargesEnabled(true)
->setStripePayoutsEnabled(true);
$result = $user->setStripeAccountId('acct_1234567890');
self::assertSame($user, $result);
self::assertSame('acct_1234567890', $user->getStripeAccountId());
self::assertTrue($user->isStripeChargesEnabled());
self::assertTrue($user->isStripePayoutsEnabled());
}
public function testEmailVerificationFields(): void