Merged in feat/SW-659-payment-send-query-params (pull request #727)
feat(SW-659): Receive query params from Planet callbacks * feat(SW-659): read confirmation number from url and update callback url if dev * fix(SW-659): moved callback url into env variable Approved-by: Simon.Emanuelsson
This commit is contained in:
4
env/client.ts
vendored
4
env/client.ts
vendored
@@ -5,10 +5,14 @@ export const env = createEnv({
|
||||
client: {
|
||||
NEXT_PUBLIC_NODE_ENV: z.enum(["development", "test", "production"]),
|
||||
NEXT_PUBLIC_PORT: z.string().default("3000"),
|
||||
NEXT_PUBLIC_PAYMENT_CALLBACK_URL: z
|
||||
.string()
|
||||
.default("/api/web/payment-callback"),
|
||||
},
|
||||
emptyStringAsUndefined: true,
|
||||
runtimeEnv: {
|
||||
NEXT_PUBLIC_NODE_ENV: process.env.NODE_ENV,
|
||||
NEXT_PUBLIC_PORT: process.env.NEXT_PUBLIC_PORT,
|
||||
NEXT_PUBLIC_PAYMENT_CALLBACK_URL: `${process.env.NODE_ENV === "development" ? `http://localhost:${process.env.NEXT_PUBLIC_PORT}` : ""}/api/web/payment-callback`,
|
||||
},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user