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:
@@ -1,5 +1,5 @@
|
||||
import { type PaymentProvider } from '@prisma/client';
|
||||
import { type DomainEvent } from '@modules/shared/domain/domain-event';
|
||||
import { type DomainEvent } from '@modules/shared';
|
||||
|
||||
export class PaymentCompletedEvent implements DomainEvent {
|
||||
readonly eventName = 'payment.completed';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { type PaymentProvider, type PaymentType } from '@prisma/client';
|
||||
import { type DomainEvent } from '@modules/shared/domain/domain-event';
|
||||
import { type DomainEvent } from '@modules/shared';
|
||||
|
||||
export class PaymentCreatedEvent implements DomainEvent {
|
||||
readonly eventName = 'payment.created';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { type PaymentProvider } from '@prisma/client';
|
||||
import { type DomainEvent } from '@modules/shared/domain/domain-event';
|
||||
import { type DomainEvent } from '@modules/shared';
|
||||
|
||||
export class PaymentFailedEvent implements DomainEvent {
|
||||
readonly eventName = 'payment.failed';
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { Result } from '@modules/shared/domain/result';
|
||||
import { ValueObject } from '@modules/shared/domain/value-object';
|
||||
import { Result, ValueObject } from '@modules/shared';
|
||||
|
||||
interface MoneyProps {
|
||||
amountVND: bigint;
|
||||
|
||||
Reference in New Issue
Block a user