Bugfix/handle missing Stripe api key exception (#4013)
* Conditionally initialize Stripe
This commit is contained in:
parent
de74d5c3d6
commit
b2aa31f4ba
@ -28,12 +28,14 @@ export class SubscriptionService {
|
||||
private readonly prismaService: PrismaService,
|
||||
private readonly propertyService: PropertyService
|
||||
) {
|
||||
this.stripe = new Stripe(
|
||||
this.configurationService.get('STRIPE_SECRET_KEY'),
|
||||
{
|
||||
apiVersion: '2024-09-30.acacia'
|
||||
}
|
||||
);
|
||||
if (this.configurationService.get('ENABLE_FEATURE_SUBSCRIPTION')) {
|
||||
this.stripe = new Stripe(
|
||||
this.configurationService.get('STRIPE_SECRET_KEY'),
|
||||
{
|
||||
apiVersion: '2024-09-30.acacia'
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public async createCheckoutSession({
|
||||
|
Loading…
x
Reference in New Issue
Block a user