mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-27 00:52:50 +00:00
console
This commit is contained in:
@@ -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}`,
|
||||
|
||||
@@ -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 });
|
||||
|
||||
Reference in New Issue
Block a user