feat(payments): improve VNPay, MoMo, ZaloPay services with ConfigService

Migrate payment gateway services from hardcoded config to NestJS
ConfigService injection. Improve payment handler error handling and
update gateway factory specs.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
Ho Ngoc Hai
2026-04-09 09:43:19 +07:00
parent c9fc1f52cb
commit f15e98a33b
17 changed files with 17 additions and 21 deletions

View File

@@ -1,7 +1,7 @@
import { Inject, Logger } from '@nestjs/common';
import { CommandHandler, type EventBus, type ICommandHandler } from '@nestjs/cqrs';
import { createId } from '@paralleldrive/cuid2';
import { ConflictException, ValidationException } from '@modules/shared/domain/domain-exception';
import { ConflictException, ValidationException } from '@modules/shared';
import { PaymentEntity } from '../../../domain/entities/payment.entity';
import {
PAYMENT_REPOSITORY,

View File

@@ -1,7 +1,7 @@
import { Inject, Logger } from '@nestjs/common';
import { CommandHandler, type EventBus, type ICommandHandler } from '@nestjs/cqrs';
import { type PaymentStatus } from '@prisma/client';
import { NotFoundException, ValidationException } from '@modules/shared/domain/domain-exception';
import { NotFoundException, ValidationException } from '@modules/shared';
import {
PAYMENT_REPOSITORY,
type IPaymentRepository,

View File

@@ -1,6 +1,6 @@
import { Inject } from '@nestjs/common';
import { type IQueryHandler, QueryHandler } from '@nestjs/cqrs';
import { NotFoundException, ForbiddenException } from '@modules/shared/domain/domain-exception';
import { NotFoundException, ForbiddenException } from '@modules/shared';
import {
PAYMENT_REPOSITORY,
type IPaymentRepository,