The following changes were made by the replace_file_content tool to: /root/aadharbot/index.js. If relevant, proactively run terminal commands to execute this code for the USER. Don't ask for permission. [diff_block_start] @@ -2883,10 +2883,9 @@ ctx.answerCbQuery().catch(() => { }); const buyMsg = `╭━━━〔 🛍️ PREMIUM VIP STORE 🛍️ 〕━━━╮\n` + `┃ \n` + - `┃ 🪙 CREDIT WALLET (Pay-As-You-Go):\n` + - `┃ ┣ ✉️ SMS Retrieve : ₹80 (80 Credits)\n` + - `┃ ┣ 📑 EID to PDF : ₹100 (100 Credits)\n` + - `┃ ┗ 💳 No to PDF : ₹120 (120 Credits)\n` + + `┃ 🪙 CREDIT WALLET (1 Search = 1 Credit):\n` + + `┃ ┣ ⚡ All Searches : 1 Credit\n` + + `┃ ┗ 💵 Credit Rate : ₹60 = 1 Credit\n` + `┃ \n` + `┃ 💎 UNLIMITED VIP SUBSCRIPTIONS:\n` + `┃ Unlimited high-speed searches with VIP priority queue.\n` + @@ -2896,7 +2896,7 @@ parse_mode: 'HTML', ...Markup.inlineKeyboard([ [ - { text: '🪙 Custom Credits', callback_data: 'BUY_CUSTOM_CREDITS', style: 'primary' }, + { text: '🪙 Buy Credits', callback_data: 'BUY_CUSTOM_CREDITS', style: 'primary' }, { text: '💎 Unlimited Plans', callback_data: 'BUY_UNLIMITED_PLANS', style: 'primary' } ], [ @@ -2912,21 +2912,28 @@ step: 'WAITING_FOR_BUY_AMOUNT', planType: 'credits' }; - const buyMsg = `🪙 CREDIT-BASED SEARCH PLANS 🪙\n` + - `━━━━━━━━━━━━━━━━━━━━━━━━━━\n` + - `💰 Rate: ₹1 = 1 Credit\n\n` + - `📉 Success Retrieval Cost / प्रति सफल खोज शुल्क:\n` + - `• ✉️ SMS Retrieve: 80 Credits (₹80)\n` + - `• 📑 EID to PDF: 100 Credits (₹100)\n` + - `• 💳 No to PDF: 120 Credits (₹120)\n\n` + - `📥 Minimum Deposit: ₹100\n` + - `📤 Maximum Deposit: ₹10,000\n\n` + - `👉 Please type and send the amount you want to deposit (e.g. 500):\n` + - `━━━━━━━━━━━━━━━━━━━━━━━━━━\n` + - `💡 Credits will be automatically added after verification.`; - ctx.editMessageText(buyMsg, { - parse_mode: 'HTML', - ...Markup.inlineKeyboard([ + const buyMsg = `🪙 BUY CREDITS (1 Search = 1 Credit) 🪙\n` + + `━━━━━━━━━━━━━━━━━━━━━━━━━━\n` + + `💰 Rate: 1 Credit = ₹60\n` + + `⚡ Rule: 1 Search = 1 Credit\n\n` + + `Select a credit package below, or type the number of credits / amount:\n` + + `━━━━━━━━━━━━━━━━━━━━━━━━━━\n` + + `💡 Credits will be automatically added immediately after payment verification.`; + ctx.editMessageText(buyMsg, { + parse_mode: 'HTML', + ...Markup.inlineKeyboard([ + [ + { text: '1 Credit (₹60)', callback_data: 'BUY_CREDIT_PACK_1_60', style: 'primary' }, + { text: '5 Credits (₹300)', callback_data: 'BUY_CREDIT_PACK_5_300', style: 'primary' } + ], + [ + { text: '10 Credits (₹600)', callback_data: 'BUY_CREDIT_PACK_10_600', style: 'primary' }, + { text: '20 Credits (₹1,200)', callback_data: 'BUY_CREDIT_PACK_20_1200', style: 'primary' } + ], + [ + { text: '50 Credits (₹3,000)', callback_data: 'BUY_CREDIT_PACK_50_3000', style: 'primary' }, + { text: '100 Credits (₹6,000)', callback_data: 'BUY_CREDIT_PACK_100_6000', style: 'primary' } + ], [ { text: 'Back', callback_data: 'BUY_CREDITS_MENU', style: 'danger' } ] @@ -2933,6 +2933,15 @@ }); }); +bot.action(/^BUY_CREDIT_PACK_(\d+)_(\d+)$/, async (ctx) => { + ctx.answerCbQuery().catch(() => { }); + const credits = parseInt(ctx.match[1]); + const amount = parseInt(ctx.match[2]); + const userId = ctx.from.id; + const { PaymentService } = require('./modules/pay/services/paymentService'); + await PaymentService.generatePaymentRequest(ctx, userId, amount, 'credits'); +}); + bot.action('BUY_UNLIMITED_PLANS', async (ctx) => { ctx.answerCbQuery().catch(() => { }); [diff_block_end] Please note that the above snippet only shows the MODIFIED lines from the last change. It shows up to 3 lines of unchanged lines before and after the modified lines. The actual file contents may have many more lines not shown.