Split Stripe webhooks into 2 endpoints: insta (payments) and leger (Connect)

- /stripe/webhook → /webhooks/stripe/insta (paiements, payouts, disputes, subscriptions)
- /stripe/webhook/connect → /webhooks/stripe/leger (gestion comptes Connect)
- Rename env vars: STRIPE_WEBHOOK_SECRET → STRIPE_WEBHOOK_SECRET_INSTA,
  STRIPE_WEBHOOK_SECRET_CONNECT → STRIPE_WEBHOOK_SECRET_LEGER
- Update StripeService, CsrfProtectionSubscriber, vault, env files and all tests

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Serreau Jovann
2026-04-01 14:07:49 +02:00
parent 1c559263a8
commit 381acd603e
10 changed files with 236 additions and 236 deletions

View File

@@ -9,16 +9,16 @@ class StripeServiceTest extends TestCase
{
private function createService(): StripeService
{
return new StripeService('sk_test', 'whsec_test', 'whsec_connect_test', 'https://example.com');
return new StripeService('sk_test', 'whsec_test_insta', 'whsec_test_leger', 'https://example.com');
}
public function testVerifyWebhookSignatureReturnsNullOnInvalid(): void
public function testVerifyWebhookSignatureInstaReturnsNullOnInvalid(): void
{
self::assertNull($this->createService()->verifyWebhookSignature('{}', 'invalid'));
self::assertNull($this->createService()->verifyWebhookSignatureInsta('{}', 'invalid'));
}
public function testVerifyConnectWebhookSignatureReturnsNullOnInvalid(): void
public function testVerifyWebhookSignatureLegerReturnsNullOnInvalid(): void
{
self::assertNull($this->createService()->verifyConnectWebhookSignature('{}', 'invalid'));
self::assertNull($this->createService()->verifyWebhookSignatureLeger('{}', 'invalid'));
}
}