SBI Mandate
An error occurred while processing the template.
The following has evaluated to null or missing: ==> request.getParameter("encdata") [in template "20097#20123#1988020" at line 1, column 19] ---- Tip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign param1 = request.getParameter... [in template "20097#20123#1988020" at line 1, column 1] ----
1<#assign param1 = request.getParameter("encdata")>
2<div id="loaderSBI" style="text-align: center">
3<img src="https://www.edelweisstokio.in/documents/d/guest/loader" alt="Loading "/>
4</div>
5<div id="resultDivS" style="display:none;">
6<div class="edto-renew-success-wrapper">
7 <div class="container">
8 <div id="sbiSuccess" class="renew-bloc-wrapper">
9 <h1 class="fontbold fs28 text-center pb-3">Your Request is Successfully Registered</h1>
10 <h5 class="fs16 text-center pb-3 textsub-title">Dear Customer, Your SBI Mandate Request Has Been Successfully Registered. Thank You!</h5>
11 </div>
12 </div>
13 </div>
14</div>
15
16<div id="resultDivF" style="display:none;">
17<div class="edto-renew-success-wrapper">
18 <div class="container">
19 <div id="sbiFail" class="renew-bloc-wrapper">
20 <h1 class="fontbold fs28 text-center pb-3">Your Request is Failed</h1>
21 <h5 class="fs16 text-center pb-3 textsub-title">Dear Customer, Your SBI Mandate Request Has Been Failed.</h5></div>
22 </div>
23 </div>
24 </div>
25</div>
26
27 <script type="text/javascript">
28 $(document).ready(function () {
29 var encodedEncData=encodeURIComponent('${param1}');
30 console.log("encodedData"+ encodedEncData);
31 var apiEndpoint = 'https://onlineapi.edelweisslife.in/api/v1/SBIMandate/mandateresponse?encdata='+encodedEncData;
32console.log('API Endpoint:', apiEndpoint);
33 // Make an AJAX request to the API
34 $.ajax({
35 url: apiEndpoint,
36 method: 'POST',
37 dataType: 'json',
38 success: function (data) {
39 // Handle the API response data
40 console.log('API Response:', data);
41
42 // Access specific values from the response
43 var apiValue = data.status;
44 var error = data.errors;
45 if(apiValue || apiValue=='true'){
46 $('#loaderSBI').hide();
47 $('#resultDivS').show();
48 $('#resultDivF').hide();
49 }else if(error[0].indexOf("Mandate is already processed") != -1){
50 $('#loaderSBI').hide();
51 $('#resultDivS').show();
52 $('#resultDivF').hide();
53 }else{
54 $('#loaderSBI').hide();
55 $('#resultDivS').hide();
56 $('#resultDivF').show();
57 }
58 // Use the value as needed
59 console.log('Value from API:', apiValue);
60 },
61 error: function (error) {
62 // Handle errors
63 console.error('Error fetching data from API:', error);
64
65 $('#loaderSBI').hide();
66 $('#resultDivS').hide();
67 $('#resultDivF').show();
68
69 }
70 });
71 });
72
73
74</script>