- /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>
25 lines
696 B
PHP
25 lines
696 B
PHP
<?php
|
|
|
|
namespace App\Tests\Service;
|
|
|
|
use App\Service\StripeService;
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
class StripeServiceTest extends TestCase
|
|
{
|
|
private function createService(): StripeService
|
|
{
|
|
return new StripeService('sk_test', 'whsec_test_insta', 'whsec_test_leger', 'https://example.com');
|
|
}
|
|
|
|
public function testVerifyWebhookSignatureInstaReturnsNullOnInvalid(): void
|
|
{
|
|
self::assertNull($this->createService()->verifyWebhookSignatureInsta('{}', 'invalid'));
|
|
}
|
|
|
|
public function testVerifyWebhookSignatureLegerReturnsNullOnInvalid(): void
|
|
{
|
|
self::assertNull($this->createService()->verifyWebhookSignatureLeger('{}', 'invalid'));
|
|
}
|
|
}
|