wip: new pricing

This commit is contained in:
Andras Bacsai
2024-04-12 15:48:56 +02:00
parent 1581e0e439
commit 7b4d8a8f05
9 changed files with 212 additions and 70 deletions

View File

@@ -39,6 +39,12 @@ class PricingPlans extends Component
case 'ultimate-yearly':
$priceId = config('subscription.stripe_price_id_ultimate_yearly');
break;
case 'dynamic-monthly':
$priceId = config('subscription.stripe_price_id_dynamic_monthly');
break;
case 'dynamic-yearly':
$priceId = config('subscription.stripe_price_id_dynamic_yearly');
break;
default:
$priceId = config('subscription.stripe_price_id_basic_monthly');
break;
@@ -72,6 +78,13 @@ class PricingPlans extends Component
];
$payload['line_items'][0]['quantity'] = 10;
}
if (str($type)->contains('dynamic')) {
$payload['line_items'][0]['adjustable_quantity'] = [
'enabled' => true,
'minimum' => 2,
];
$payload['line_items'][0]['quantity'] = 2;
}
if (!data_get($team, 'subscription.stripe_trial_already_ended')) {
if (config('constants.limits.trial_period') > 0) {