The following changes were made by the replace_file_content tool to: /root/aadharbot/index.js. If relevant, proactively run terminal commands to execute this code for the USER. Don't ask for permission. [diff_block_start] @@ -4341,37 +4341,39 @@ } // Save order to pending payments for background daemon tracking - let expectedDate = null; - if (orderId.startsWith('G')) { - const tsMatch = orderId.match(/^G(\d{10})/); - if (tsMatch) { - const d = new Date(Number(tsMatch[1]) * 1000); - expectedDate = formatDateIST(d); - } - } else if (orderId.startsWith('P') && orderId.length > 20) { - const d = new Date(); - expectedDate = formatDateIST(d); - } else if (orderId.startsWith('PIN')) { - const match = orderId.match(/^PIN(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})/); - if (match) { - const [_, yyyy, mm, dd, hh, min] = match; - expectedDate = `${yyyy}-${mm}-${dd} ${hh}:${min}:00`; - } - } else if (orderId.startsWith('IC')) { - const match = orderId.match(/^IC(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/); - if (match) { - const [_, yy, mm, dd, hh, min, ss] = match; - expectedDate = `20${yy}-${mm}-${dd} ${hh}:${min}:${ss}`; - } - } else if (orderId.length === 22 && orderId.startsWith('21')) { - // upi-payments.com / plan2wtion.com (e.g. 2177952114845622121240) - const d = new Date(); - expectedDate = formatDateIST(d); - } else { - const match = orderId.match(/^UM(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/); - if (match) { - const [_, yy, mm, dd, hh, min, ss] = match; - expectedDate = `20${yy}-${mm}-${dd} ${hh}:${min}:${ss}`; + let expectedDate = session.expectedDate || null; + if (!expectedDate) { + if (orderId.startsWith('G')) { + const tsMatch = orderId.match(/^G(\d{10})/); + if (tsMatch) { + const d = new Date(Number(tsMatch[1]) * 1000); + expectedDate = formatDateIST(d); + } + } else if (orderId.startsWith('P') && orderId.length > 20) { + const d = new Date(); + expectedDate = formatDateIST(d); + } else if (orderId.startsWith('PIN')) { + const match = orderId.match(/^PIN(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})/); + if (match) { + const [_, yyyy, mm, dd, hh, min] = match; + expectedDate = `${yyyy}-${mm}-${dd} ${hh}:${min}:00`; + } + } else if (orderId.startsWith('IC')) { + const match = orderId.match(/^IC(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/); + if (match) { + const [_, yy, mm, dd, hh, min, ss] = match; + expectedDate = `20${yy}-${mm}-${dd} ${hh}:${min}:${ss}`; + } + } else if (orderId.length === 22 && orderId.startsWith('21')) { + // upi-payments.com / plan2wtion.com (e.g. 2177952114845622121240) + const d = new Date(); + expectedDate = formatDateIST(d); + } else { + const match = orderId.match(/^UM(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/); + if (match) { + const [_, yy, mm, dd, hh, min, ss] = match; + expectedDate = `20${yy}-${mm}-${dd} ${hh}:${min}:${ss}`; + } } } // --- Support Group UTR Notification --- [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.