mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-12 22:22:32 +01:00
Fixes for trials in subscriptions
This commit is contained in:
parent
e682017cf4
commit
9db0159b06
@ -425,8 +425,8 @@ class BillingPortalPurchase extends Component
|
||||
return $this->subscription->service()->startTrial([
|
||||
'email' => $this->email ?? $this->contact->email,
|
||||
'quantity' => $this->quantity,
|
||||
'contact_id' => $this->contact->id,
|
||||
'client_id' => $this->contact->client->id,
|
||||
'contact_id' => $this->contact->hashed_id,
|
||||
'client_id' => $this->contact->client->hashed_id,
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -230,9 +230,9 @@ class SubscriptionService
|
||||
- we then return the user to either a predefined user endpoint, OR we return the user to the recurring invoice page.
|
||||
*/
|
||||
public function startTrial(array $data)
|
||||
{nlog($data);
|
||||
{
|
||||
// Redirects from here work just fine. Livewire will respect it.
|
||||
$client_contact = ClientContact::find($data['contact_id']);
|
||||
$client_contact = ClientContact::find($this->decodePrimaryKey($data['contact_id']));
|
||||
|
||||
if (!$this->subscription->trial_enabled) {
|
||||
return new \Exception("Trials are disabled for this product");
|
||||
|
Loading…
Reference in New Issue
Block a user