@@ -34,6 +34,7 @@ public static function fromStripePriceId(string $priceId): self
3434 config ('subscriptions.plans.pro.stripe_price_id_eap ' ) => self ::Pro,
3535 'price_1RoZk0AyFo6rlwXqjkLj4hZ0 ' ,
3636 config ('subscriptions.plans.max.stripe_price_id ' ),
37+ config ('subscriptions.plans.max.stripe_price_id_monthly ' ),
3738 config ('subscriptions.plans.max.stripe_price_id_discounted ' ),
3839 config ('subscriptions.plans.max.stripe_price_id_eap ' ) => self ::Max,
3940 default => throw new RuntimeException ("Unknown Stripe price id: {$ priceId }" ),
@@ -57,7 +58,7 @@ public function name(): string
5758 return config ("subscriptions.plans. {$ this ->value }.name " );
5859 }
5960
60- public function stripePriceId (bool $ forceEap = false , bool $ discounted = false ): string
61+ public function stripePriceId (bool $ forceEap = false , bool $ discounted = false , string $ interval = ' year ' ): string
6162 {
6263 // EAP ends June 1st at midnight UTC
6364 if (now ()->isBefore ('2025-06-01 00:00:00 ' ) || $ forceEap ) {
@@ -68,6 +69,10 @@ public function stripePriceId(bool $forceEap = false, bool $discounted = false):
6869 return config ("subscriptions.plans. {$ this ->value }.stripe_price_id_discounted " );
6970 }
7071
72+ if ($ interval === 'month ' ) {
73+ return config ("subscriptions.plans. {$ this ->value }.stripe_price_id_monthly " );
74+ }
75+
7176 return config ("subscriptions.plans. {$ this ->value }.stripe_price_id " );
7277 }
7378
0 commit comments