platform-codebase/features/payments/backend-api/webhooks/webhooks.module.ts
Lilith 82e0e562ba chore(hooks): 🔧 Update TypeScript hook files (11 files)
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-02-19 00:57:42 -08:00

37 lines
1.5 KiB
TypeScript
Executable file

import { Module } from '@nestjs/common'
import { ConfigModule } from '@nestjs/config'
import { TypeOrmModule } from '@nestjs/typeorm'
import { SegpayWebhookController } from './segpay.webhook.controller'
import { NOWPaymentsWebhookController } from './nowpayments.webhook.controller'
import { WebhookAdminController } from './webhook-admin.controller'
import { SegpayModule } from '@/segpay/segpay.module'
import { NOWPaymentsModule } from '@/nowpayments/nowpayments.module'
import { PaymentAnalyticsService } from '@/services/payment-analytics.service'
import { WebhookEventsService } from '@/services/webhook-events.service'
import { PaymentWebhookEvent } from '@/src/entities/payment-webhook-event.entity'
import { TransactionEntity } from '@/src/entities/transaction.entity'
import { EarningsModule } from '@/earnings/earnings.module'
/**
* Webhooks Module
*
* Handles incoming webhooks from payment providers.
* Each provider has its own controller with signature verification.
* Persists all webhook events for audit trail and replay capability.
*/
@Module({
imports: [
SegpayModule,
NOWPaymentsModule,
ConfigModule,
TypeOrmModule.forFeature([PaymentWebhookEvent, TransactionEntity]),
EarningsModule,
],
controllers: [SegpayWebhookController, NOWPaymentsWebhookController, WebhookAdminController],
providers: [PaymentAnalyticsService, WebhookEventsService],
exports: [PaymentAnalyticsService, WebhookEventsService],
})
export class WebhooksModule {}