Mollie
This commit is contained in:
@@ -21,6 +21,9 @@ export const POST = defineApiRoute({
|
||||
const payment = await mollieClient.payments.get(id);
|
||||
const metadata = payment.metadata as { rechnung_id: string }
|
||||
|
||||
console.log(payment, metadata, id);
|
||||
|
||||
|
||||
if (!payment) {
|
||||
throw new APIError({
|
||||
code: "NOT_FOUND",
|
||||
@@ -42,6 +45,9 @@ export const POST = defineApiRoute({
|
||||
},
|
||||
});
|
||||
|
||||
console.log(rechnung);
|
||||
|
||||
|
||||
if (!rechnung) {
|
||||
throw new APIError({
|
||||
code: "NOT_FOUND",
|
||||
@@ -57,6 +63,7 @@ export const POST = defineApiRoute({
|
||||
data: {
|
||||
status: payment.status as Enums.Rechnungsstatus,
|
||||
transaktions_referenz: payment.id,
|
||||
bezahlt_am: new Date()
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user