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:
19
tests/Command/StripeSyncCommandTest.php
Normal file
19
tests/Command/StripeSyncCommandTest.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Tests\Command;
|
||||
|
||||
use App\Command\StripeSyncCommand;
|
||||
use App\Service\StripeService;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
class StripeSyncCommandTest extends TestCase
|
||||
{
|
||||
public function testCommandIsConfigured(): void
|
||||
{
|
||||
$stripeService = $this->createMock(StripeService::class);
|
||||
$command = new StripeSyncCommand($stripeService);
|
||||
|
||||
self::assertSame('stripe:sync', $command->getName());
|
||||
self::assertSame('Create or update the Stripe webhook endpoint', $command->getDescription());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user