Bestellen auf Rechnung

This commit is contained in:
Moritz Utcke
2025-02-17 20:46:27 +11:00
parent 7f6430f20f
commit 9951179b2a
16 changed files with 198 additions and 80 deletions

View File

@@ -37,7 +37,7 @@ export const PUT = defineApiRoute({
})
),
output: z.object({
checkout_url: z.string(),
checkout_url: z.string().optional(),
uid: UUidWithPrefix,
}),
headers: authorizationHeaders,
@@ -113,6 +113,10 @@ export const PUT = defineApiRoute({
});
}
if (bezahlmethode === Enums.Bezahlmethoden.rechnung) {
return { uid: rechnung.uid }
}
// Wir erstellen eine Mollie Payment Referenz.
const payment = await mollieClient.payments.create({
amount: {