fixed paddle api client

This commit is contained in:
Codex Agent
2025-12-23 15:00:52 +01:00
parent 1d2c2da915
commit beb36c68ae
2 changed files with 3 additions and 0 deletions

View File

@@ -70,6 +70,7 @@ class PaddleClient
$headers = [
'User-Agent' => sprintf('FotospielApp/%s PaddleClient', app()->version()),
'Paddle-Environment' => Str::lower($environment) === 'sandbox' ? 'sandbox' : 'production',
'Paddle-Version' => '1',
];
return $this->http

View File

@@ -32,6 +32,8 @@ class BillingPortalTest extends TenantTestCase
$response->assertOk();
$response->assertJsonPath('url', 'https://portal.example/overview');
Http::assertSent(fn (Request $request) => $request->hasHeader('Paddle-Version', '1'));
$this->assertDatabaseHas('tenants', [
'id' => $this->tenant->id,
'paddle_customer_id' => 'cus_123',