feat: subscription upgrade-only flow, discount codes, proration, enterprise inquiry form, payment history invoices page, fix mobile sidebar close on navigate
This commit is contained in:
@@ -26,7 +26,10 @@ export async function POST(req: Request): Promise<Response> {
|
||||
return new Response("FAILED", { status: 400 });
|
||||
}
|
||||
try {
|
||||
await activatePlanInDb(tenantId, plan, "paytr", period);
|
||||
// totalAmount kuruş cinsinden gelir → TRY'ye çevir
|
||||
const amountTRY = Math.round(Number(totalAmount) / 100);
|
||||
const orderId = merchantOid;
|
||||
await activatePlanInDb(tenantId, plan, "paytr", period, { amount: amountTRY, orderId });
|
||||
} catch (e) {
|
||||
console.error("[paytr-callback]", e);
|
||||
return new Response("FAILED", { status: 500 });
|
||||
|
||||
Reference in New Issue
Block a user