indrajitghosh20006/Igstore_01botPublic Β· Bot Template

ProfileTelegram

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 8h agoCreated Oct 30, 2026
Back to folder

commands/_set_payment_upi.js

javascript Β· 34 lines

Raw
1/**#command2name: /set_payment_upi3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12try {13  var adminId = Bot.getProperty("owner_id") || "7839151435";14  if (String(user.telegramid) !== String(adminId)) return;15 16  var input = String(params || "").trim();17  if (!input) {18    Bot.sendMessage("⚠️ Format: <code>API_KEY</code>", {parse_mode:"HTML"});19    return;20  }21 22  // Accept API key directly; UPI ID is supplied by Gram UPI Gateway's order response.23  var apiKey = input.split("|").pop().trim();24  if (!apiKey) {25    Bot.sendMessage("❌ Invalid Gram UPI Gateway API key.", {parse_mode:"HTML"});26    return;27  }28  Bot.setProperty("gramupi_api_key", apiKey, "string");29  Bot.setProperty("payment_upi_id", null, "string");30  var maskedKey = String(apiKey).slice(0, 10) + "β€’β€’β€’β€’β€’β€’β€’β€’";31  Bot.sendMessage("βœ… <b>Gram UPI Gateway payment config updated!</b>\n\nπŸ” API Key: <code>" + maskedKey + "</code>\n\nUPI ID ΰ€…ΰ€¬ gateway response ΰ€Έΰ₯‡ automatically ΰ€²ΰ€Ώΰ€―ΰ€Ύ ΰ€œΰ€Ύΰ€ΰ€—ΰ€Ύ.", {parse_mode:"HTML"});32} catch (err) {33  Bot.sendMessage("⚠️ System Error: " + err.message);34}