diff --git a/backend/src/wallet/wallet.service.ts b/backend/src/wallet/wallet.service.ts index e56a157..cb90fb3 100644 --- a/backend/src/wallet/wallet.service.ts +++ b/backend/src/wallet/wallet.service.ts @@ -261,6 +261,15 @@ export class WalletService { throw new BadRequestException('Invalid Midtrans notification signature.'); } + const merchantId = String(payload.merchant_id || ''); + if (orderId.startsWith('payment_notif_test_') && merchantId === process.env.MIDTRANS_MERCHANT_ID) { + return { + received: true, + status: 'test_notification', + providerOrderId: orderId, + }; + } + const paymentOrder = await this.prisma.paymentOrder.findUnique({ where: { providerOrderId: orderId }, });