kkapil9112/Hguuuuuv45botPublic · Bot Template

AITelegram commerce bot for an admin-managed digital store: admins create categories, products, time-based plans, stock entries and license keys, and can grant reseller roles or adjust user balances. End users can view their balance, start a deposit flow with an inline amount keypad, apply coupon codes, and navigate back to the store menu. It uses Bot properties for product/stock/coupon data and Libs.ResourcesLib for per-user balances.

Commercecommerceshopreselleradmin-panelbalanceproduct-management
ProfileTelegram
102 commands0 envUpdated 29d agoCreated Aug 7, 2026
Back to folder

commands/_check.js

javascript · 54 lines

Raw
1/**#command2name: /check3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12// =========================================================13// 🚀 MANUAL PAYMENT VERIFY TRIGGER COMMAND14// COMMAND: /check15// =========================================================16 17try {18  var order_id = params ? params.trim() : "";19 20  // Agar params direct na mile toh callback_query data se extract karein21  if (!order_id && request && request.callback_query) {22    var cbData = request.callback_query.data;23    order_id = cbData.replace("/check", "").replace("check", "").trim().split(" ")[0];24  }25 26  if (!order_id) {27    var queryId = request ? (request.id || (request.callback_query && request.callback_query.id)) : null;28    if (queryId) {29      Api.answerCallbackQuery({30        callback_query_id: queryId,31        text: "❌ Invalid or Missing Order ID!",32        show_alert: true33      });34    } else {35      Bot.sendMessage(36        "<blockquote><tg-emoji emoji-id='5875506366050734240'>➡️</tg-emoji> <b>Invalid or Missing Order ID!</b> Please try initiating the payment again.</blockquote>", 37        { parse_mode: "HTML" }38      );39    }40    return;41  }42 43  // Gateway API Details44  var api_key = "FAM_516d57f1c24c296c1d9538300cde92c21949681ac7bc5461"; 45  var uniqueTime = new Date().getTime(); // Anti-cache parameter46 47  HTTP.get({48    url: "https://fampay.anujbots.xyz/verify.php?order_id=" + encodeURIComponent(order_id) + "&api_key=" + api_key + "&cb=" + uniqueTime,49    success: "/onCheck"50  });51 52} catch (err) {53  Bot.sendMessage("⚠️ System Error: " + err.message);54}