diff --git a/server/src/routes/user-payments.js b/server/src/routes/user-payments.js index 9d89bc4..643d661 100644 --- a/server/src/routes/user-payments.js +++ b/server/src/routes/user-payments.js @@ -49,7 +49,8 @@ export async function registerUserPaymentRoutes(fastify) { } const idempotencyKey = `${id}-${Date.now()}` - const returnUrl = `${process.env.CLIENT_PUBLIC_URL || 'http://127.0.0.1:5173'}/me/orders/${id}?paid=1` + const clientUrl = (process.env.CLIENT_PUBLIC_URL || 'http://127.0.0.1:5173').replace(/\/$/, '') + const returnUrl = `${clientUrl}/me/orders/${id}?paid=1` const clientIp = request.ip const amount = {