diff --git a/src/@types/services.ts b/src/@types/services.ts index ccc23542..c1427cfb 100644 --- a/src/@types/services.ts +++ b/src/@types/services.ts @@ -11,7 +11,7 @@ export interface IPaymentsService { updateInvoice(invoice: Partial): Promise updateInvoiceStatus(invoice: Pick): Promise confirmInvoice( - invoice: Pick, + invoice: Pick, ): Promise sendInvoiceUpdateNotification(invoice: Invoice): Promise getPendingInvoices(): Promise diff --git a/src/controllers/callbacks/opennode-callback-controller.ts b/src/controllers/callbacks/opennode-callback-controller.ts index 7456ed45..f3755df0 100644 --- a/src/controllers/callbacks/opennode-callback-controller.ts +++ b/src/controllers/callbacks/opennode-callback-controller.ts @@ -51,6 +51,8 @@ export class OpenNodeCallbackController implements IController { try { await this.paymentsService.confirmInvoice({ id: invoice.id, + pubkey: invoice.pubkey, + status: updatedInvoice.status, amountPaid: updatedInvoice.amountRequested, confirmedAt: updatedInvoice.confirmedAt, }) diff --git a/src/controllers/callbacks/zebedee-callback-controller.ts b/src/controllers/callbacks/zebedee-callback-controller.ts index 7a4c24a8..869861d7 100644 --- a/src/controllers/callbacks/zebedee-callback-controller.ts +++ b/src/controllers/callbacks/zebedee-callback-controller.ts @@ -70,11 +70,14 @@ export class ZebedeeCallbackController implements IController { } invoice.amountPaid = invoice.amountRequested + invoice.status = updatedInvoice.status updatedInvoice.amountPaid = invoice.amountRequested try { await this.paymentsService.confirmInvoice({ id: invoice.id, + pubkey: invoice.pubkey, + status: invoice.status, confirmedAt: invoice.confirmedAt, amountPaid: invoice.amountRequested, })