fixed paddle request form

This commit is contained in:
Codex Agent
2025-12-23 15:22:46 +01:00
parent 3dd07ae2b2
commit 6fcb5bd929
2 changed files with 6 additions and 1 deletions

View File

@@ -20,6 +20,10 @@ class PaddleCustomerPortalService
);
}
if ($payload === []) {
$payload = (object) [];
}
return $this->client->post("/customers/{$customerId}/portal-sessions", $payload);
}
}

View File

@@ -36,7 +36,8 @@ class BillingPortalTest extends TenantTestCase
$path = parse_url($request->url(), PHP_URL_PATH);
return $request->hasHeader('Paddle-Version', '1')
&& $path === '/customers/cus_123/portal-sessions';
&& $path === '/customers/cus_123/portal-sessions'
&& $request->body() === '{}';
});
$this->assertDatabaseHas('tenants', [