{"File":"/root/aadharbot/modules/pay/controllers/paymentController.js","LineNumber":71,"LineContent":" const userRes = await pool.query('SELECT credits FROM users WHERE telegram_id = $1', [userId]);"} {"File":"/root/aadharbot/modules/pay/controllers/paymentController.js","LineNumber":73,"LineContent":" const currentCredits = Number(userRes.rows[0].credits || 0);"} {"File":"/root/aadharbot/modules/pay/controllers/paymentController.js","LineNumber":88,"LineContent":" `UPDATE users SET credits = credits - $1, plan_type = 'unlimited', plan_expires_at = $2, plan_started_at = NOW(), updated_at = NOW() WHERE telegram_id = $3`,"} {"File":"/root/aadharbot/modules/pay/controllers/paymentController.js","LineNumber":164,"LineContent":" `\u003cblockquote\u003e💰 \u003cb\u003eStatus:\u003c/b\u003e Verification is in progress. Once confirmed by the gateway, your credits will be updated automatically.\\n\\n` +"} {"File":"/root/aadharbot/modules/pay/controllers/paymentController.js","LineNumber":203,"LineContent":" return ctx.reply(`💎 \u003cb\u003eCustom Amount\u003c/b\u003e\\n\\nFor amounts above ₹20,000, please directly DM our admin \u003cb\u003e@EverythingBypass\u003c/b\u003e to arrange the payment and credits.\\n\\n👉 \u003ca href=\"https://t.me/EverythingBypass\"\u003eClick here to contact @EverythingBypass\u003c/a\u003e`, {"} {"File":"/root/aadharbot/modules/pay/controllers/paymentController.js","LineNumber":208,"LineContent":" await PaymentService.generatePaymentRequest(ctx, userId, amount, session.planType || 'credits');"} {"File":"/root/aadharbot/modules/pay/services/paymentService.js","LineNumber":102,"LineContent":"async function generatePaymentRequest(ctx, userId, amount, planType = 'credits', preExistingLoadMsg = null) {"} {"File":"/root/aadharbot/modules/pay/services/paymentService.js","LineNumber":445,"LineContent":" `📦 \u003cb\u003ePlan:\u003c/b\u003e \u003ccode\u003e${planType || 'credits'}\u003c/code\u003e\\n` +"} {"File":"/root/aadharbot/modules/pay/services/paymentService.js","LineNumber":486,"LineContent":" const loadingMsg = await ctx.reply(`⏳ \u003cb\u003eSubmitting UTR for verification... Please wait.\u003c/b\u003e\\n\\n\u003ci\u003eAapka payment receive hote hi credits automatically add ho jayenge. Please is window ko cancel na karein.\u003c/i\u003e`, { parse_mode: 'HTML' });"} {"File":"/root/aadharbot/modules/pay/services/paymentService.js","LineNumber":560,"LineContent":" `🗂️ \u003cb\u003ePlan Type:\u003c/b\u003e \u003ccode\u003e${session.planType || 'credits'}\u003c/code\u003e\\n` +"} {"File":"/root/aadharbot/modules/pay/services/paymentService.js","LineNumber":675,"LineContent":"function addPendingPayment(userId, orderId, serialNumber, expectedAmount, depositDate, planType = 'credits', utr = null, supportMsgId = null) {"} {"File":"/root/aadharbot/modules/pay/services/paymentService.js","LineNumber":792,"LineContent":" const planType = payment.planType || 'credits';"} {"File":"/root/aadharbot/modules/pay/services/paymentService.js","LineNumber":805,"LineContent":" if (planType !== 'credits' \u0026\u0026 planDurations[planType]) {"} {"File":"/root/aadharbot/modules/pay/services/paymentService.js","LineNumber":819,"LineContent":" db[payment.userId] = { name: 'User', credits: 0 };"} {"File":"/root/aadharbot/modules/pay/services/paymentService.js","LineNumber":827,"LineContent":" `INSERT INTO users (telegram_id, name, credits, plan_type, plan_expires_at, plan_started_at, created_at, updated_at) "} {"File":"/root/aadharbot/modules/pay/services/paymentService.js","LineNumber":838,"LineContent":" const creditsToAdd = Math.floor(expectedAmount);"} {"File":"/root/aadharbot/modules/pay/services/paymentService.js","LineNumber":846,"LineContent":" db[payment.userId] = { name: 'User', credits: 0 };"} {"File":"/root/aadharbot/modules/pay/services/paymentService.js","LineNumber":848,"LineContent":" db[payment.userId].credits = (db[payment.userId].credits || 0) + creditsToAdd;"} {"File":"/root/aadharbot/modules/pay/services/paymentService.js","LineNumber":849,"LineContent":" db[payment.userId].plan_type = 'credits';"} {"File":"/root/aadharbot/modules/pay/services/paymentService.js","LineNumber":852,"LineContent":" finalCredits = db[payment.userId].credits;"} {"File":"/root/aadharbot/modules/pay/services/paymentService.js","LineNumber":855,"LineContent":" `INSERT INTO users (telegram_id, name, credits, plan_type, plan_expires_at, created_at, updated_at) "} {"File":"/root/aadharbot/modules/pay/services/paymentService.js","LineNumber":856,"LineContent":" VALUES ($1, 'User', $2, 'credits', NULL, NOW(), NOW()) "} {"File":"/root/aadharbot/modules/pay/services/paymentService.js","LineNumber":858,"LineContent":" DO UPDATE SET credits = users.credits + EXCLUDED.credits, plan_type = 'credits', plan_expires_at = NULL"} {"File":"/root/aadharbot/modules/pay/services/paymentService.js","LineNumber":859,"LineContent":" RETURNING credits`,"} {"File":"/root/aadharbot/modules/pay/services/paymentService.js","LineNumber":860,"LineContent":" [payment.userId, creditsToAdd]"} {"File":"/root/aadharbot/modules/pay/services/paymentService.js","LineNumber":862,"LineContent":" finalCredits = dbRes.rows[0].credits;"} {"File":"/root/aadharbot/modules/pay/services/paymentService.js","LineNumber":908,"LineContent":" `🗂️ \u003cb\u003ePlan Type:\u003c/b\u003e \u003ccode\u003e${payment.planType || 'credits'}\u003c/code\u003e\\n` +"}