fixed paddle request form
This commit is contained in:
@@ -20,6 +20,10 @@ class PaddleCustomerPortalService
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($payload === []) {
|
||||||
|
$payload = (object) [];
|
||||||
|
}
|
||||||
|
|
||||||
return $this->client->post("/customers/{$customerId}/portal-sessions", $payload);
|
return $this->client->post("/customers/{$customerId}/portal-sessions", $payload);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,7 +36,8 @@ class BillingPortalTest extends TenantTestCase
|
|||||||
$path = parse_url($request->url(), PHP_URL_PATH);
|
$path = parse_url($request->url(), PHP_URL_PATH);
|
||||||
|
|
||||||
return $request->hasHeader('Paddle-Version', '1')
|
return $request->hasHeader('Paddle-Version', '1')
|
||||||
&& $path === '/customers/cus_123/portal-sessions';
|
&& $path === '/customers/cus_123/portal-sessions'
|
||||||
|
&& $request->body() === '{}';
|
||||||
});
|
});
|
||||||
|
|
||||||
$this->assertDatabaseHas('tenants', [
|
$this->assertDatabaseHas('tenants', [
|
||||||
|
|||||||
Reference in New Issue
Block a user