Add Lemon Squeezy Billing System

This commit is contained in:
giancarlo
2024-04-01 21:43:18 +08:00
parent 84a4b45bcd
commit 8784a40a69
59 changed files with 424 additions and 74 deletions

View File

@@ -0,0 +1,14 @@
import { z } from 'zod';
export const getLemonSqueezyEnv = () =>
z
.object({
secretKey: z.string().min(1),
webhooksSecret: z.string().min(1),
storeId: z.number().positive(),
})
.parse({
secretKey: process.env.LEMON_SQUEEZY_SECRET_KEY,
webhooksSecret: process.env.LEMON_SQUEEZY_WEBHOOK_SECRET,
storeId: process.env.LEMON_SQUEEZY_STORE_ID,
});