Browse Source

Conditionally initialize Stripe

pull/4013/head
Thomas Kaul 10 months ago
parent
commit
0e78baa758
  1. 14
      apps/api/src/app/subscription/subscription.service.ts

14
apps/api/src/app/subscription/subscription.service.ts

@ -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…
Cancel
Save