feat: dynamic trial period

This commit is contained in:
Andras Bacsai 2023-09-12 11:23:31 +02:00
parent 6da4e78374
commit 5d27e89bfa
3 changed files with 3 additions and 2 deletions

View File

@ -59,7 +59,7 @@ class PricingPlans extends Component
if (!data_get($team,'subscription.stripe_trial_already_ended')) { if (!data_get($team,'subscription.stripe_trial_already_ended')) {
$payload['subscription_data'] = [ $payload['subscription_data'] = [
'trial_period_days' => 30, 'trial_period_days' => config('constants.limits.trial_period'),
'trial_settings' => [ 'trial_settings' => [
'end_behavior' => [ 'end_behavior' => [
'missing_payment_method' => 'cancel', 'missing_payment_method' => 'cancel',

View File

@ -10,6 +10,7 @@ return [
], ],
], ],
'limits' => [ 'limits' => [
'trial_period'=> 14,
'server' => [ 'server' => [
'zero' => 0, 'zero' => 0,
'self-hosted' => 999999999999, 'self-hosted' => 999999999999,

View File

@ -21,7 +21,7 @@
</label> </label>
</fieldset> </fieldset>
</div> </div>
<div class="py-2 text-center"><span class="font-bold text-warning">30 days trial</span> included on all plans, without credit card details.</div> <div class="py-2 text-center"><span class="font-bold text-warning">{{config('constants.limits.trial_period')}} days trial</span> included on all plans, without credit card details.</div>
<div x-show="selected === 'monthly'" class="flex justify-center h-10 mt-3 text-sm leading-6 "> <div x-show="selected === 'monthly'" class="flex justify-center h-10 mt-3 text-sm leading-6 ">
<div>Save <span class="font-bold text-warning">1 month</span> annually with the yearly plans. <div>Save <span class="font-bold text-warning">1 month</span> annually with the yearly plans.
</div> </div>