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 });