From 00553e897bca9b8a63b6854a3121f775a94b2564 Mon Sep 17 00:00:00 2001 From: Morgan <33722304+ThyMinimalDev@users.noreply.github.com> Date: Tue, 21 Nov 2023 14:09:50 +0200 Subject: [PATCH] fix: alby payment could not be created (#12460) * fix: alby payment could not be created * fixup! fix: alby payment could not be created * fixup! fixup! fix: alby payment could not be created --- packages/app-store/alby/lib/PaymentService.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/app-store/alby/lib/PaymentService.ts b/packages/app-store/alby/lib/PaymentService.ts index 9974f1aa25..71e9c3e851 100644 --- a/packages/app-store/alby/lib/PaymentService.ts +++ b/packages/app-store/alby/lib/PaymentService.ts @@ -72,7 +72,10 @@ export class PaymentService implements IAbstractPaymentService { amount: payment.amount, externalId: invoice.paymentRequest, currency: payment.currency, - data: Object.assign({}, { invoice }) as unknown as Prisma.InputJsonValue, + data: Object.assign( + {}, + { invoice: { ...invoice, isPaid: await invoice.isPaid() } } + ) as unknown as Prisma.InputJsonValue, fee: 0, refunded: false, success: false, @@ -84,7 +87,7 @@ export class PaymentService implements IAbstractPaymentService { } return paymentData; } catch (error) { - log.error("Alby: Payment could not be created", bookingId); + log.error("Alby: Payment could not be created", bookingId, JSON.stringify(error)); throw new Error(ErrorCode.PaymentCreationFailure); } }