The following changes were made by the replace_file_content tool to: /root/aadharbot/gateways.js. If relevant, proactively run terminal commands to execute this code for the USER. Don't ask for permission. [diff_block_start] @@ -520,6 +520,42 @@ const d = new Date(); expectedDate = formatDateIST(d); } + } else if (isPlayBridge) { + const segments = parsedUrl.pathname.split("/").filter(Boolean); + let last = segments[segments.length - 1] || ""; + last = last.replace(/\.html?$/i, ""); + const rawOrderNo = decodeURIComponent(last).trim(); + + const clientInfo = { + deviceId: "unknown", + source: 1, + browser: "Chrome", + deviceType: "unknown", + deviceModel: "unknown", + deviceOsName: "Windows", + deviceOsVersion: "10" + }; + const headers = { + "X-Client-Info": Buffer.from(JSON.stringify(clientInfo)).toString("base64"), + "Origin": `https://${gatewayHost}`, + "Referer": `https://${gatewayHost}/`, + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" + }; + + const res = await fetch("https://cashier-api.vishnurummy.in/info?orderNo=" + encodeURIComponent(rawOrderNo), { headers }); + if (!res.ok) throw new Error(`PlayBridge API returned HTTP ${res.status}`); + const payJson = await res.json(); + + if (!payJson || !payJson.upiUrl) { + throw new Error("Failed to retrieve UPI URL from PlayBridge"); + } + + orderId = payJson.orderNo; + console.log(`[GATEWAY] PlayBridge detected. Order ID: ${orderId}, UPI: ${payJson.upiUrl}`); + + const QRCode = require('qrcode'); + qrBuffer = await QRCode.toBuffer(payJson.upiUrl, { type: 'png', width: 400 }); + expectedDate = payJson.createTime || formatDateIST(new Date()); } else { // Standard flow (xspay, etc.) let orderIdVal = parsedUrl.searchParams.get('orderId') || parsedUrl.searchParams.get('order_id'); [diff_block_end] Please note that the above snippet only shows the MODIFIED lines from the last change. It shows up to 3 lines of unchanged lines before and after the modified lines. The actual file contents may have many more lines not shown.