Fixes for trials in subscriptions

This commit is contained in:
David Bomba 2023-10-14 08:33:27 +11:00
parent 9d20c9b2fb
commit e682017cf4

View File

@ -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($this->decodePrimaryKey($data['contact_id']));
$client_contact = ClientContact::find($data['contact_id']);
if (!$this->subscription->trial_enabled) {
return new \Exception("Trials are disabled for this product");