fixed api url for portal sessions
This commit is contained in:
@@ -12,9 +12,7 @@ class PaddleCustomerPortalService
|
||||
*/
|
||||
public function createSession(string $customerId, array $options = []): array
|
||||
{
|
||||
$payload = [
|
||||
'customer_id' => $customerId,
|
||||
];
|
||||
$payload = [];
|
||||
|
||||
if (! empty($options['subscription_ids'])) {
|
||||
$payload['subscription_ids'] = array_values(
|
||||
@@ -22,6 +20,6 @@ class PaddleCustomerPortalService
|
||||
);
|
||||
}
|
||||
|
||||
return $this->client->post('/customer-portal-sessions', $payload);
|
||||
return $this->client->post("/customers/{$customerId}/portal-sessions", $payload);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user