feat: yıllık abonelik (varsayılan) — Stripe yıllık fiyatlar + periyot checkout'a geçiyor
This commit is contained in:
+1
-1
@@ -757,7 +757,7 @@ const server = http.createServer(async (req, res) => {
|
||||
if (!user) return json(res, 401, { success: false, error: 'oturum yok' });
|
||||
try {
|
||||
const body = await readBody(req);
|
||||
const out = await createCheckoutSession({ planId: body.planId, email: user.email });
|
||||
const out = await createCheckoutSession({ planId: body.planId, email: user.email, periyot: body.periyot === 'aylik' ? 'aylik' : 'yillik' });
|
||||
return json(res, 200, { success: true, ...out });
|
||||
} catch (e) {
|
||||
return json(res, billingConfigured() ? 400 : 503, { success: false, error: e.message });
|
||||
|
||||
Reference in New Issue
Block a user