The command exited with code 0. Output: 102: const isDirectUpi = parsedUrl.searchParams.has('pa') || requestUrl.startsWith('upi://') || gatewayHost.includes('honeycombpro.io'); 103- const isGoldgo = gatewayHost.includes('goldgo.cc') || gatewayHost.includes('goldgo68.com') || gatewayHost.includes('goldgo'); 104- const isRynpp = gatewayHost.includes('rynpp.net'); 105- const isKivoPay = gatewayHost.includes('kivopay.top') || gatewayHost.includes('kivopay.com'); 106- const isIndiaPay = gatewayHost.includes('india-pay.net'); 107- const isEwalletPay = gatewayHost.includes('ewallet-pay.com'); 108- const isBluePay = gatewayHost.includes('blue-pay.vip'); 109- const isUpiPayments = gatewayHost.includes('upi-payments.com') || gatewayHost.includes('plan2wtion.com'); 110- const isZippay = gatewayHost.includes('zippay') || gatewayHost.includes('nine99pay'); 111- const isPayflow = gatewayHost.includes('payflowinr.com') || gatewayHost.includes('payflow'); 112- const isPlayBridge = gatewayHost.includes('play-bridge.in') || gatewayHost.includes('play-bridge') || gatewayHost.includes('vishnurummy'); 113- const isSsbasePay = gatewayHost.includes('ssbase.net') || parsedUrl.pathname.includes('airpay'); 114- const isCashwaysPay = gatewayHost.includes('cashways.net') || gatewayHost.includes('eazypaytech'); 115- const isBifrostPay = gatewayHost.includes('bifrost-pay.com') || gatewayHost.includes('bifrost'); 116- const isXmdhPay = gatewayHost.includes('xmdh.link') || gatewayHost.includes('xmdh') || parsedUrl.pathname.includes('checkoutPage'); 117- const isCoinPay = gatewayHost.includes('coinsll.com') || gatewayHost.includes('coinpay'); 118- 119- let orderId = null; 120- let nonce = null; 121- let tenantId = null; 122- let gatewayApiUrl = `https://${gatewayHost}`; 123- let qrBuffer = null; 124- let expectedDate = null; 125- 126: if (isDirectUpi) { 127- let upiUrl = requestUrl.startsWith('upi://') ? requestUrl : ('upi://pay' + parsedUrl.search); 128- if (!upiUrl.startsWith('upi://pay?')) { 129- upiUrl = upiUrl.replace(/^upi:\/\/[^?]*\?/, 'upi://pay?'); 130- } 131- orderId = parsedUrl.searchParams.get('tr') || parsedUrl.searchParams.get('tid') || parsedUrl.searchParams.get('orderId') || parsedUrl.searchParams.get('order_id') || ('UPI' + Date.now()); 132- console.log(`[GATEWAY] Direct UPI gateway detected (${gatewayHost}). Order ID: ${orderId}, UPI: ${upiUrl}`); 133- 134- const QRCode = require('qrcode'); 135- qrBuffer = await QRCode.toBuffer(upiUrl, { type: 'png', width: 400 }); 136- expectedDate = formatDateIST(new Date()); 137- } else if (isKivoPay) { 138- orderId = parsedUrl.searchParams.get('order_id'); 139- nonce = parsedUrl.searchParams.get('nonce'); 140- const timestamp = parsedUrl.searchParams.get('timestamp'); 141- console.log(`[GATEWAY] KivoPay detected. Order ID: ${orderId}, Nonce: ${nonce}`); 142- 143- const signStr = String(orderId) + String(nonce) + "5f3b2d9a7c1e4f8b0d6a7e9f3c2b1a0d"; 144- const sign = crypto.createHash('md5').update(signStr).digest('hex').toUpperCase(); 145- 146- const payRes = await fetch(`https://${gatewayHost}/api/v1/payin/payment`, { 147- method: 'POST', 148- headers: { 149- 'Content-Type': 'application/json', 150- 'Origin': `https://${gatewayHost}`, 151- 'Referer': `https://${gatewayHost}/`, 152- 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:151.0) Gecko/20100101 Firefox/151.0' 153- }, 154- body: JSON.stringify({ 155- orderId: orderId, 156- nonce: Number(nonce), -- 856: isDirectUpi, 857- isPlayBridge, 858- isSsbasePay, 859- isCashwaysPay, 860- isBifrostPay, 861- isXmdhPay, 862- isCoinPay, 863- tenantId, 864- gatewayHost, 865- gatewayApiUrl 866- }; 867-} 868- 869-/** 870- * Uploads the UTR to the designated gateway. 871- * @param {object} session Session state of the user. 872- * @param {string} utr 12-digit UTR code. 873- */ 874-async function uploadUtr(session, utr) { 875: const { orderId, nonce, isGoldgo, isRynpp, isKivoPay, isIndiaPay, isEwalletPay, isBluePay, isUpiPayments, isPayflow, isDirectUpi, isPlayBridge, isSsbasePay, isCashwaysPay, isBifrostPay, isXmdhPay, isCoinPay, tenantId, gatewayHost, gatewayApiUrl } = session; 876- 877: if (isDirectUpi || isPlayBridge || isSsbasePay || isCashwaysPay || isXmdhPay || isCoinPay) { 878- console.log(`[GATEWAY] Direct UPI / PlayBridge / SsbasePay / Cashways / XmdhPay / CoinPay payment recorded for order ${orderId} with UTR ${utr}`); 879- return { code: 0, msg: "success" }; 880- } else if (isKivoPay) { 881- console.log(`[GATEWAY] Uploading KivoPay UTR: ${utr} for order: ${orderId}`); 882- const signStr = String(orderId) + String(nonce) + "5f3b2d9a7c1e4f8b0d6a7e9f3c2b1a0d" + String(utr); 883- const sign = crypto.createHash('md5').update(signStr).digest('hex').toUpperCase(); 884- 885- const uploadRes = await fetch(`https://${gatewayHost}/api/v1/payin/utr/verify`, { 886- method: 'POST', 887- headers: { 888- 'Content-Type': 'application/json', 889- 'Origin': `https://${gatewayHost}`, 890- 'Referer': `https://${gatewayHost}/`, 891- 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:151.0) Gecko/20100101 Firefox/151.0' 892- }, 893- body: JSON.stringify({ 894- orderId: orderId, 895- nonce: Number(nonce), 896- utr: utr, 897- sign: sign 898- }) 899- }); 900- 901- if (!uploadRes.ok) throw new Error(`Upload UTR API returned HTTP ${uploadRes.status}`); 902- const uploadJson = await uploadRes.json(); 903- console.log(`[GATEWAY] KivoPay Upload UTR Response:`, JSON.stringify(uploadJson)); 904- if (uploadJson.code !== 0) throw new Error(uploadJson.msg || "Failed to submit UTR to KivoPay"); 905- return uploadJson; 906- } else if (isGoldgo) { 907- console.log(`[GATEWAY] Uploading Goldgo UTR: ${utr} for order: ${orderId}`);