From 12bed31f8d5fcafe4d957f17e928d729c9fefa63 Mon Sep 17 00:00:00 2001 From: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> Date: Mon, 24 May 2021 18:05:45 +0530 Subject: [PATCH] RAIN-2695 : Download receipt dynamic config issue fix (#38) --- egov-pdf/src/routes/payments.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/egov-pdf/src/routes/payments.js b/egov-pdf/src/routes/payments.js index 85ec200..76e381a 100644 --- a/egov-pdf/src/routes/payments.js +++ b/egov-pdf/src/routes/payments.js @@ -19,6 +19,7 @@ router.post( var tenantId = req.query.tenantId; var consumerCode = req.query.consumerCode; var bussinessService = req.query.bussinessService; + var receiptKey = req.query.pdfKey; var requestinfo = req.body; if (requestinfo == undefined) { return renderError(res, "requestinfo can not be null", 400); @@ -41,7 +42,7 @@ router.post( var payments = resProperty.data; if (payments && payments.Payments && payments.Payments.length > 0) { var pdfResponse; - var pdfkey = config.pdf.consolidated_receipt_template; + var pdfkey = receiptKey || config.pdf.consolidated_receipt_template; try { pdfResponse = await create_pdf( tenantId,