Accept Midtrans dashboard notification tests
This commit is contained in:
@ -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 },
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user