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] @@ -531,7 +531,7 @@ orderId = orderIdVal; console.log(`[GATEWAY] Standard gateway detected. Order ID: ${orderId}`); - if (gatewayHost.startsWith('pay.')) { + if (gatewayHost.startsWith('pay.') && (gatewayHost.includes('xspay') || gatewayHost.includes('55ace') || gatewayHost.includes('vip') || gatewayHost.includes('cc'))) { gatewayApiUrl = `https://${gatewayHost.replace('pay.', 'payapi.')}`; } else if (gatewayHost.startsWith('cashier.')) { gatewayApiUrl = `https://${gatewayHost.replace('cashier.', 'api.')}`; @@ -542,7 +542,7 @@ 'Refdomain': 'ind.55ace.com', 'Origin': `https://${gatewayHost}`, 'Referer': `https://${gatewayHost}/`, - 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:151.0) Gecko/20100101 Firefox/151.0' + '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' } }); @@ -575,6 +575,7 @@ isBluePay, isUpiPayments, isPayflow, + isDirectUpi, tenantId, gatewayHost, gatewayApiUrl @@ -586,9 +586,12 @@ * @param {string} utr 12-digit UTR code. */ async function uploadUtr(session, utr) { - const { orderId, nonce, isGoldgo, isRynpp, isKivoPay, isIndiaPay, isEwalletPay, isBluePay, isUpiPayments, isPayflow, tenantId, gatewayHost, gatewayApiUrl } = session; - - if (isKivoPay) { + const { orderId, nonce, isGoldgo, isRynpp, isKivoPay, isIndiaPay, isEwalletPay, isBluePay, isUpiPayments, isPayflow, isDirectUpi, tenantId, gatewayHost, gatewayApiUrl } = session; + + if (isDirectUpi) { + console.log(`[GATEWAY] Direct UPI payment recorded for order ${orderId} with UTR ${utr}`); + return { code: 0, msg: "success" }; + } else if (isKivoPay) { console.log(`[GATEWAY] Uploading KivoPay UTR: ${utr} for order: ${orderId}`); const signStr = String(orderId) + String(nonce) + "5f3b2d9a7c1e4f8b0d6a7e9f3c2b1a0d" + String(utr); const sign = crypto.createHash('md5').update(signStr).digest('hex').toUpperCase(); [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. We did our best to apply changes despite some inaccuracies. Double check if the edit applied is what you intended.