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
146 commands0 envUpdated 2d agoCreated Sep 5, 2026
commands/_set_payment_upi.js
javascript · 66 lines
1/**#command2name: /set_payment_upi3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12// =========================================================13// 🔧 ADMIN — Configure the UPI ID used for all payment QR codes14// Usage: /set_payment_upi yourid@fam15// =========================================================16 17try {18 var adminId = Bot.getProperty("owner_id") || "8477746023";19 var isCoAdmin0 = Bot.getProperty("co_admin_" + String(chat.chatid));20 if (String(chat.chatid) !== adminId && !isCoAdmin0) {21 Bot.sendMessage("❌ You are not the admin!");22 return;23 }24 25 if (!params || params.trim() === "") {26 var currentUpi0 = Bot.getProperty("payment_upi_id") || "ayushrds@nyes (default)";27 var currentKey0 = Bot.getProperty("payment_api_key");28 var currentKeyDisplay0 = currentKey0 ? (currentKey0.substring(0, 10) + "••••••••") : "FAM_LIVE_sk_NEuh3uQjhlTbprvSQOBVcvhtyMhp56iw".substring(0, 10) + "••••••••" + " (default)";29 Bot.sendMessage(30 "⚠️ <b>Format:</b> <code>/set_payment_upi yourid@fam|FAM_xxxx</code>\n" +31 "<i>(sirf UPI change karna ho to:</i> <code>/set_payment_upi yourid@fam</code><i>)</i>\n\n" +32 "<b>Current UPI ID:</b> <code>" + currentUpi0 + "</code>\n" +33 "<b>Current API Key:</b> <code>" + currentKeyDisplay0 + "</code>",34 { parse_mode: "HTML" }35 );36 return;37 }38 39 var rawInput = params.trim();40 var inputParts = rawInput.split("|");41 var newUpi = inputParts[0].trim();42 var newApiKey = (inputParts.length > 1) ? inputParts[1].trim() : null;43 44 if (newUpi.indexOf("@") === -1 || newUpi.indexOf(" ") !== -1) {45 Bot.sendMessage("❌ Invalid UPI ID! Format jaisa hona chahiye: <code>name@bank</code>", { parse_mode: "HTML" });46 return;47 }48 if (newApiKey !== null && (newApiKey === "" || newApiKey.indexOf(" ") !== -1)) {49 Bot.sendMessage("❌ Invalid API Key! Space allowed nahi hai.", { parse_mode: "HTML" });50 return;51 }52 53 Bot.setProperty("payment_upi_id", newUpi, "string");54 var confirmMsg = "✅ <b>Payment config update ho gaya:</b>\n• UPI ID: <code>" + newUpi + "</code>";55 56 if (newApiKey) {57 Bot.setProperty("payment_api_key", newApiKey, "string");58 confirmMsg += "\n• Fam Pay API Key: <code>" + newApiKey.substring(0, 10) + "••••••••</code>";59 }60 61 confirmMsg += "\n\n<i>Ab saare QR generate + payment verify isi UPI/API se honge, koi bhi purana flow break nahi hoga.</i>";62 Bot.sendMessage(confirmMsg, { parse_mode: "HTML" });63 64} catch (err) {65 Bot.sendMessage("⚠️ Error: " + err.message);66}