fixed paddle api client
This commit is contained in:
@@ -70,6 +70,7 @@ class PaddleClient
|
|||||||
$headers = [
|
$headers = [
|
||||||
'User-Agent' => sprintf('FotospielApp/%s PaddleClient', app()->version()),
|
'User-Agent' => sprintf('FotospielApp/%s PaddleClient', app()->version()),
|
||||||
'Paddle-Environment' => Str::lower($environment) === 'sandbox' ? 'sandbox' : 'production',
|
'Paddle-Environment' => Str::lower($environment) === 'sandbox' ? 'sandbox' : 'production',
|
||||||
|
'Paddle-Version' => '1',
|
||||||
];
|
];
|
||||||
|
|
||||||
return $this->http
|
return $this->http
|
||||||
|
|||||||
@@ -32,6 +32,8 @@ class BillingPortalTest extends TenantTestCase
|
|||||||
$response->assertOk();
|
$response->assertOk();
|
||||||
$response->assertJsonPath('url', 'https://portal.example/overview');
|
$response->assertJsonPath('url', 'https://portal.example/overview');
|
||||||
|
|
||||||
|
Http::assertSent(fn (Request $request) => $request->hasHeader('Paddle-Version', '1'));
|
||||||
|
|
||||||
$this->assertDatabaseHas('tenants', [
|
$this->assertDatabaseHas('tenants', [
|
||||||
'id' => $this->tenant->id,
|
'id' => $this->tenant->id,
|
||||||
'paddle_customer_id' => 'cus_123',
|
'paddle_customer_id' => 'cus_123',
|
||||||
|
|||||||
Reference in New Issue
Block a user