indrajitghosh20006/Igstore_01botPublic Β· Bot Template
AIThe bot provides an admin interface for a digital store, allowing the owner or coβadmins to add balances, products, plans, and categories. It supports payment workflows via UPI and Binance Pay, automatically generating QR codes and handling manual approval of deposits. The code patches inline keyboards to use premium emoji icons and includes helper functions for user and bot properties. Overall, it serves as a commerce management tool for a Telegram-based storefront.
Commercestoreadminbalanceproductplancategory
170 commands0 envUpdated 7h agoCreated Oct 30, 2026
commands/_check_buy.js
javascript Β· 50 lines
1/**#command2name: /check_buy3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12/**#command13name: /check_buy14answer:15keyboard:16parse_mode: markdown17aliases:18allow_only_group: false19need_reply: false20case_insensitive: false21is_web: 022#command**/23 24try {25 var orderId = User.getProperty("buy_pending_order_id");26 var apiKey = String(Bot.getProperty("gramupi_api_key") || "").trim();27 var opts = (typeof options !== "undefined" && options) ? options : {};28 var attempt = Number(opts.verify_attempt || 0);29 if (!orderId) return;30 if (Bot.getProperty("paid_order_" + orderId) || Bot.getProperty("claimed_topup_" + orderId)) return;31 // Keep checking every 3 seconds while this order is still pending.32 if (attempt < 95) {33 try {34 Bot.run({ command: "/check_buy", run_after: 3, label: "gram_buy_verify_" + orderId,35 options: { verify_attempt: attempt + 1, is_background: true } });36 } catch (scheduleErr) {}37 }38 if (!apiKey) {39 Bot.sendMessage("β Gram UPI Gateway API Key configured nahi hai. Admin Panel β Set Payment ( UPI + Gram UPI Gateway ) se set karein.");40 return;41 }42 if (!(opts.is_background) && request && request.message && request.message.message_id) {43 try { Api.editMessageCaption({chat_id: chat.chatid, message_id: request.message.message_id,44 caption: "β³ <b>Gram UPI Gateway payment verify ho raha hai...</b>", parse_mode: "HTML"}); } catch (editErr) {}45 }46 var verifyUrl = "https://gateway.anujbots.in/autoverify.php?api_key=" + encodeURIComponent(String(apiKey)) + "&order_id=" + encodeURIComponent(orderId) + "&cb=" + new Date().getTime();47 HTTP.get({url: verifyUrl, success: "/onBuyCheck", error: "/onBuyCheck"});48} catch (err) {49 Bot.sendMessage("β οΈ <b>Error:</b> " + err.message, {parse_mode:"HTML"});50}