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
This commit is contained in:
Morgan
2023-11-21 12:09:50 +00:00
committed by GitHub
parent ed2ce005c9
commit 00553e897b
@@ -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);
}
}