diff --git a/src/lib/appwrite/subscription-types.ts b/src/lib/appwrite/subscription-types.ts index b75819c..917edec 100644 --- a/src/lib/appwrite/subscription-types.ts +++ b/src/lib/appwrite/subscription-types.ts @@ -15,6 +15,10 @@ export const DISCOUNT_CODES: Record = { export function validateDiscountCode(code: string): number | null { const normalized = code.trim().toUpperCase(); + // NEXT_PUBLIC_DEV_DISCOUNT_CODE: forces price to 1 TL for testing + // Set in Coolify env vars — remove when done testing + const devCode = process.env.NEXT_PUBLIC_DEV_DISCOUNT_CODE?.trim().toUpperCase(); + if (devCode && normalized === devCode) return 1; return DISCOUNT_CODES[normalized] ?? null; }