From dd9a7e639aa4ea8c2d33a34263f04757b8986e07 Mon Sep 17 00:00:00 2001 From: marshal Date: Tue, 30 Jun 2026 06:15:57 +0300 Subject: [PATCH] console --- apps/edr-freight-api/src/modules/billing/billing.service.ts | 3 ++- apps/edr-freight-api/src/modules/payment/payment.service.ts | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/edr-freight-api/src/modules/billing/billing.service.ts b/apps/edr-freight-api/src/modules/billing/billing.service.ts index 01b057a76..fa5681b06 100644 --- a/apps/edr-freight-api/src/modules/billing/billing.service.ts +++ b/apps/edr-freight-api/src/modules/billing/billing.service.ts @@ -492,7 +492,8 @@ export class BillingService { // the domain never supplies it. New sources add their uppercased value to // the PaymentReferenceType enum. referenceType: invoice.source.toUpperCase() as PaymentReferenceType, - orderRef: invoice.invoiceNumber, + // orderRef: invoice.invoiceNumber, + orderRef:Date.now().toString(), amountMinor: Math.round(Number(invoice.totalAmount)), currency: invoice.currency, reason: `Payment for invoice ${invoice.invoiceNumber}`, diff --git a/apps/edr-freight-api/src/modules/payment/payment.service.ts b/apps/edr-freight-api/src/modules/payment/payment.service.ts index 1ea41cee9..a6bd457fb 100644 --- a/apps/edr-freight-api/src/modules/payment/payment.service.ts +++ b/apps/edr-freight-api/src/modules/payment/payment.service.ts @@ -465,6 +465,7 @@ export class PaymentService { failureCode?: string; failureMessage?: string; }): Promise<{ processed: boolean; alreadyFinalized?: boolean; reason?: string }> { + console.log(`Received payment event: ${JSON.stringify(event)}`); if (event.eventType === "payment.succeeded") { console.log(`Payment succeeded event received for reference ${event.referenceId}`); const intent = await this.paymentRepo.findOneBy({ refId: event.referenceId });