ayushyadav7970824760/goldensellingstore_botPublic · Bot Template

AIThis Telegram store bot lets customers browse digital products and plans, apply coupons, add funds via UPI, and receive purchased keys. It includes a full admin panel for managing products, reordering items, setting reseller prices, viewing and removing key stock, configuring UPI payment details and update links, and checking user balances. Co-admins and resellers are supported, and support tickets are forwarded to the admin.

Commercedigital_storeadmin_panelupi_paymentsresellercouponskey_stock
ProfileTelegram
146 commands0 envUpdated 2d agoCreated Sep 5, 2026
Back to folder

commands/_onPressQR.js

javascript · 59 lines

Raw
1/**#command2name: /onPressQR3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12try {13  if (!content) {14    Bot.sendMessage("⚠️ <b>Gateway Error:</b> No response from server. Try again.", { parse_mode: "HTML" });15    return;16  }17 18  var res = (typeof content === "object") ? content : JSON.parse(content);19 20  if (res.status === "success" && res.data) {21    var orderId = res.data.order_id;22    var qrUrl = res.data.qr_url;23    var qrAmount = res.data.amount;24    var expireTime = res.data.expires_at_ist;25 26    User.setProperty("pending_order_id", orderId, "string");27 28    var caption = "🦆 <tg-emoji emoji-id='5893431652578758294'>💰</tg-emoji> <b>PAYMENT GATEWAY</b>\n" +29                  "━━━━━━━━━━━━━━━━━━━━━━\n" +30                  "🌈 <b>Amount: ₹" + qrAmount + "</b>\n" +31                  "📲 <i>Scan QR & Complete Payment</i>\n" +32                  "⏳ <b>Expire Time:</b> " + expireTime + "\n\n" +33                  "✅ <i>After Payment Click Verify Payment Button</i>\n" +34                  "━━━━━━━━━━━━━━━━━━━━━━\n" +35                  "🌐 <tg-emoji emoji-id='6192553546102085729'>🤖</tg-emoji> <i>Auto Verification System Powered</i>";36 37    Api.sendPhoto({38      photo: qrUrl,39      caption: caption,40      parse_mode: "HTML",41      reply_markup: JSON.stringify({42        inline_keyboard: [43          [44            { text: "✅ Verify Payment", callback_data: "/check", style: "success", icon_custom_emoji_id: "5330237710655306682" }45          ],46          [47            { text: "❌ Cancel / Back", callback_data: "/cancel_order", style: "danger" }48          ]49        ]50      })51    });52 53  } else {54    Bot.sendMessage("⚠️ <b>Failed to generate QR:</b> " + (res.message || "Unknown error"), { parse_mode: "HTML" });55  }56 57} catch (err) {58  Bot.sendMessage("⚠️ <b>Exception:</b> " + err.message, { parse_mode: "HTML" });59}