0% found this document useful (0 votes)
2 views

Script_mapi

This document is a JSP (JavaServer Pages) file that includes various imports related to fraud management and application processing. It contains HTML and CSS styles for modal dialogs and form elements, as well as Java code for handling application data and user sessions. The code appears to be part of a web application that manages ownership profiles and KYC (Know Your Customer) checks for partners and merchants.

Uploaded by

Vi Rex
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Script_mapi

This document is a JSP (JavaServer Pages) file that includes various imports related to fraud management and application processing. It contains HTML and CSS styles for modal dialogs and form elements, as well as Java code for handling application data and user sessions. The code appears to be part of a web application that manages ownership profiles and KYC (Know Your Customer) checks for partners and merchants.

Uploaded by

Vi Rex
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 12

<%--

Created by IntelliJ IDEA.


User: Admin
Date: 9/13/2019
Time: 6:21 PM
To change this template use File | Settings | File Templates.
--%>
<%@ page import="com.dao.ApplicationManagerDAO" %>
<%@ page import="com.enums.ApplicationManagerTypes" %>
<%@ page import="com.fraud.FraudSystemAccountService" %>
<%@ page import="com.fraud.FraudSystemService" %>
<%@ page import="com.fraud.FraudTransaction" %>
<%@ page import="com.fraud.dao.FraudDAO" %>
<%@ page import="com.fraud.vo.FSAccountMappingVo" %>
<%@ page import="com.fraud.vo.FSPartnerMappingVO" %>
<%@ page import="com.manager.ApplicationManager" %>
<%@ page import="com.manager.vo.FraudKycRequestVO" %>
<%@ page import="com.manager.vo.PartnerDetailsVO" %>
<%@ page import="com.manager.vo.fraudruleconfVOs.FraudSystemAccountVO" %>
<%@ page import="com.partner.dao.PartnerDAO" %>
<%@ page import="com.partner.utils.PartnerFunctions" %>
<%@ page import="com.pz.Functions" %>
<%@ page import="com.pz.LoadProperties" %>
<%@ page import="com.salesforce.SalesForceDAO" %>
<%@ page import="com.utils.AppFunctionUtil" %>
<%@ page import="com.vo.applicationManagerVOs.*"%>
<%@ page import="merchant_java.CommonPopulateApplication" %>
<%@ page import="org.apache.commons.lang.StringUtils" %>
<%@ page import="org.owasp.esapi.ESAPI" %>
<%@ page import="org.owasp.esapi.User" %>
<%@ page import="org.owasp.esapi.ValidationErrorList" %>
<%@ page import="java.io.File" %>
<%@ page import="java.io.FileInputStream" %>
<%@ page import="java.io.IOException" %>
<%@ page import="java.io.InputStream" %>
<%@ page import="java.net.URLEncoder" %>
<%@ page import="java.nio.file.Files" %>
<%@ page import="java.nio.file.InvalidPathException" %>
<%@ page import="java.nio.file.Paths" %>
<%@ page import="java.util.*" %>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-
scale=1, user-scalable=no">
<%--<link rel="stylesheet" href="/merchant/transactionCSS/css/main.css">
<script type="text/javascript"
src="/merchant/transactionCSS/js/jquery.js"></script>
<script type="text/javascript"
src="/merchant/transactionCSS/js/creditly.js"></script>--%>
<%--
Created by IntelliJ IDEA.
User: Sagar
Date: 4/26/13
Time: 1:48 PM
To change this template use File | Settings | File Templates.
--%>

<%@ page contentType="text/html;charset=UTF-8" language="java" %>


<%!
private AppFunctionUtil commonFunctionUtil= new AppFunctionUtil();
%>
<%!private Functions functions = new Functions();%>

<style>
#myImg {
border-radius: 5px;
cursor: pointer;
transition: 0.3s;
}

#myImg:hover {opacity: 0.7;}

/* The Modal (background) */


.cust-modal {
display: none; /* Hidden by default */
position: fixed; /* Stay in place */
z-index: 8; /* Sit on top */
padding-top: 100px; /* Location of the box */
/*left: 407px;*/
top: 56px;
width: 50%; /* Full width */
/*height: 90%; *//* Full height */
overflow: hidden; /* Enable scroll if needed */
background-color: rgb(0,0,0); /* Fallback color */
background-color: rgba(0,0,0,0.9); /* Black w/ opacity */
}

/* Modal Content (image) */


.cust-modal-content {
margin: auto;
display: block;
width:100%;
max-width: 300px;
}

/* Caption of Modal Image */


#caption {
margin: auto;
display: block;
width: 80%;
max-width: 700px;
text-align: center;
color: #ccc;
padding: 10px 0;
height: 150px;
}

/* Add Animation */
.cust-modal-content, #caption {
-webkit-animation-name: zoom;
-webkit-animation-duration: 0.6s;
animation-name: zoom;
animation-duration: 0.6s;
}

@-webkit-keyframes zoom {
from {-webkit-transform:scale(0)}
to {-webkit-transform:scale(1)}
}

@keyframes zoom {
from {transform:scale(0)}
to {transform:scale(1)}
}

/* The Close Button */


.close {
position: absolute;
top: 15px;
right: 35px;
color: #f1f1f1;
font-size: 40px;
font-weight: bold;
transition: 0.3s;
}

.close:hover,
.close:focus {
color: #bbb;
text-decoration: none;
cursor: pointer;
}

/* 100% Image Width on Smaller Screens */


@media only screen and (max-width: 700px){
.modal-content {
width: 100%;
}
}

</style>
<style>
/*#manualCheck {
padding-top: 131px !important;
}*/
/* Important part */
.KYcChecks,.ruleCheck
{
position: inherit !important;
opacity: 1 !important;
pointer-events: inherit !important;
}
.kycRuleDialog{
overflow-y: initial !important
}
.kycRuleCheck{
min-height: 500px;
overflow-y: auto;
background-color: lightgrey;
position: absolute;
top: -229px;
height: 15;
width: 500px;

}
.kycRuleFooter{
border-top: 1px solid #000000 !important;
}

.modal-title
{
display:none;
}
.modal-backdrop{position:fixed;top:0;right:0;left:0;;z-index: 111;width:
100vw;height: 100vh;background-color:#000}
.modal-backdrop.show{filter:alpha(opacity=50);opacity:.5}
</style>

<style type="text/css">
.input-group .form-control:first-child, .input-group-addon:first-child, .input-
group-btn:first-child>.btn, .input-group-btn:first-child>.btn-group>.btn, .input-
group-btn:first-child>.dropdown-toggle, .input-group-btn:last-child>.btn:not(:last-
child):not(.dropdown-toggle), .input-group-btn:last-child>.btn-group:not(:last-
child)>.btn{
top: 0;
left: 0;
}

.file-input-wrapper{
color: transparent;
cursor: default;
margin-top: -20px;
}

.file-input-wrapper:hover{
color: transparent;
cursor: default;
}

.file-input-name{
/* float: left;*/
margin-top: 15px;
margin-bottom: 15px;
display: inherit;
}
.glyphicon{display: none;}

#mainname{text-align: left;}

@media (max-width: 640px){

#mainname{text-align: center;}
}

/*.input-group .form-control:first-child{display: none;}*/

.table#myTable>thead>tr>th, .table#myTable>tbody>tr>th, .table#myTable>tfoot>tr


>th, .table#myTable>thead>tr>td {
color: #ffffff;
}

@media (max-width: 640px) {

.mobile_hide {
display: none ;
}

table#myTable tbody:nth-child(odd) {
background: #cacaca;
}

table#myTable tbody:nth-child(even) {
background: #ffffff;
}

table tr:nth-child(odd) {
background: inherit;
}

.eroroText {
color: #FF0000;
text-valign: center;
font-family: "Open Sans","Helvetica Neue",Helvetica,Arial,sans-serif;
font-size: 15px;
font-weight: normal;
}
</style>
<style type="text/css">
.Table_manual
{
display: table;
width:100%;
}
.Title_manual
{
display: table-caption;
text-align: center;
font-weight: bold;
font-size: larger;
border-bottom: 1px solid #bbb;
background: lightgrey;
text-align: left;
}
.Heading_manual
{
display: table-row;
font-weight: bold;
text-align: center;
border-top: 1px solid #bbb;
border-bottom: 1px solid #bbb;
background: grey;
text-align: left;
}
.Row_manual
{
display: table-row;
}
.Cell_manual
{
display: table-cell;
border: solid;
border-width: thin;
padding-left: 5px;
padding-right: 5px;
border-top: 1px solid #bbb;
border-bottom: 1px solid #bbb;
background: lightgrey;
text-align: left;
}
</style>

<%
session.setAttribute("submit","kycCheck");
ResourceBundle RB= LoadProperties.getProperty("seamfixVerified");
int srno=1;

ApplicationManagerVO applicationManagerVO=null;
ApplicationManagerDAO applicationManagerDAO=new ApplicationManagerDAO();
String partnerid= (String) session.getAttribute("merchantid");
String roleNew=(String)session.getAttribute("rolenew");
OwnershipProfileVO ownershipProfileVO=null;
OwnershipProfileVO ownershipProfileVO1=null;
ValidationErrorList validationErrorList=null;
AppUploadLabelVO appUploadLabelVO=null;
Map<String,FileDetailsListVO> fileDetailsVOHashMap=null;
TreeMap<Integer,AppUploadLabelVO> uploadLabelVOList=new TreeMap();
//Map<String,AppUploadLabelVO> uploadLabelVOList1=new LinkedHashMap();

OwnershipProfileDetailsVO ownershipProfileDetailsVO_shareholder1 = new


OwnershipProfileDetailsVO();
OwnershipProfileDetailsVO ownershipProfileDetailsVO_shareholder2 = new
OwnershipProfileDetailsVO();
OwnershipProfileDetailsVO ownershipProfileDetailsVO_shareholder3 = new
OwnershipProfileDetailsVO();
OwnershipProfileDetailsVO ownershipProfileDetailsVO_shareholder4= new
OwnershipProfileDetailsVO();
OwnershipProfileDetailsVO ownershipProfileDetailsVO_director1 = new
OwnershipProfileDetailsVO();
OwnershipProfileDetailsVO ownershipProfileDetailsVO_director2 = new
OwnershipProfileDetailsVO();
OwnershipProfileDetailsVO ownershipProfileDetailsVO_director3 = new
OwnershipProfileDetailsVO();
OwnershipProfileDetailsVO ownershipProfileDetailsVO_director4 = new
OwnershipProfileDetailsVO();

/*list.add("Memorandum Article of Association");


list.add("Certificate of Incorporation");
list.add("Share Certificate");
list.add("Processing history for last 6 months");
list.add("Business License/Commercial License");
list.add("Bank statement of company for last 3 months");
list.add("Bank reference letter for company");
list.add("Proof of Identity of owner");
list.add("Proof of address");
list.add("Cross Corporate Guarantee");*/

String file1="";
String file2="";
String file3="";
String file4="";
PartnerDAO partnerDAO2 = new PartnerDAO();
String doc_mapping_id1=null;
String doc_mapping_id2=null;
String doc_mapping_id3=null;
String doc_mapping_id4=null;
String templateid="";
String companyType="";
PartnerDAO partnerDAO = new PartnerDAO();

if(functions.isValueNull(request.getParameter("templateid")))
{
templateid = request.getParameter("templateid");
}

if(functions.isValueNull(request.getParameter("companyType")))
{
companyType = request.getParameter("companyType");
}

/* if
(functions.isValueNull(partnerDAO.getcompanytype(applicationManagerVO.getMemberId()
)))
{
companyType =
partnerDAO.getcompanytype(applicationManagerVO.getMemberId());

String templateCompanyType =
partnerDAO.getTemplateCompanyTypeTempid(companyType,partnerid);

if(functions.isValueNull(templateCompanyType)) {
//companyType1 = templateCompanyType;
AppMafTemplateVO appMafTemplateVO =
partnerDAO.getTemplate(templateCompanyType);
templateid = templateCompanyType;
}
else
{
if(!functions.isValueNull(request.getParameter("companyType")))
{
companyType ="";
}
}
}*/

String memberid1 = request.getParameter("memberid1") != null ?


request.getParameter("memberid1") :"";
String applicationId1 = request.getParameter("application_id1") != null ?
request.getParameter("application_id1") :"";
String newcall=request.getParameter("newcall");
String alternateName=request.getParameter("alternateName");
if (functions.isValueNull(alternateName)){
session.setAttribute(alternateName,"Pending");
}

session.setAttribute("newcall",newcall);

// Map<String, OwnershipProfileDetailsVO> ownershipProfileDetailsVOMap = new


HashMap();
if(session.getAttribute("applicationManagerVO")!=null)
{
applicationManagerVO= (ApplicationManagerVO)
session.getAttribute("applicationManagerVO");
session.setAttribute("applicationManagerVO",applicationManagerVO);
}

String companyName="";
String companyRegistration="";
String applicationID= "";
if(applicationManagerVO!=null) {
if (applicationManagerVO.getCompanyProfileVO() != null) {
if
(applicationManagerVO.getCompanyProfileVO().getCompanyProfile_addressVOMap() !=
null) {

if
(functions.isValueNull(applicationManagerVO.getCompanyProfileVO().getCompanyProfile
_addressVOMap().get(ApplicationManagerTypes.COMPANY).getCompany_name())) {
companyName =
applicationManagerVO.getCompanyProfileVO().getCompanyProfile_addressVOMap().get(App
licationManagerTypes.COMPANY).getCompany_name();
} else {
companyName = "Youverify";
}

if
(functions.isValueNull(applicationManagerVO.getCompanyProfileVO().getCompanyProfile
_addressVOMap().get(ApplicationManagerTypes.COMPANY).getRegistration_number())) {
companyRegistration =
applicationManagerVO.getCompanyProfileVO().getCompanyProfile_addressVOMap().get(App
licationManagerTypes.COMPANY).getRegistration_number();
} else {
companyRegistration = "RC1234567";
}

}
}
if (applicationManagerVO.getOwnershipProfileVO() != null) {
ownershipProfileVO = applicationManagerVO.getOwnershipProfileVO();

if (ownershipProfileVO.getOwnershipProfileDetailsVOMap() != null &&


ownershipProfileVO.getOwnershipProfileDetailsVOMap().size() > 0) {
ownershipProfileDetailsVO_shareholder1 =
ownershipProfileVO.getOwnershipProfileDetailsVOMap().get("SHAREHOLDER1");
ownershipProfileDetailsVO_shareholder2 =
ownershipProfileVO.getOwnershipProfileDetailsVOMap().get("SHAREHOLDER2");
ownershipProfileDetailsVO_shareholder3 =
ownershipProfileVO.getOwnershipProfileDetailsVOMap().get("SHAREHOLDER3");
ownershipProfileDetailsVO_shareholder4 =
ownershipProfileVO.getOwnershipProfileDetailsVOMap().get("SHAREHOLDER4");
ownershipProfileDetailsVO_director1 =
ownershipProfileVO.getOwnershipProfileDetailsVOMap().get("DIRECTOR1");
ownershipProfileDetailsVO_director2 =
ownershipProfileVO.getOwnershipProfileDetailsVOMap().get("DIRECTOR2");
ownershipProfileDetailsVO_director3 =
ownershipProfileVO.getOwnershipProfileDetailsVOMap().get("DIRECTOR3");
ownershipProfileDetailsVO_director4 =
ownershipProfileVO.getOwnershipProfileDetailsVOMap().get("DIRECTOR4");
}
}
}
if(applicationManagerVO!=null) {
if (applicationManagerVO.getMemberId()!= null) {
if ("admin".equals(roleNew)) {
String memberid = applicationManagerVO.getMemberId();
partnerid = applicationManagerDAO.getPartnerId(memberid);
}
}
}
User user = (User)session.getAttribute("ESAPIUserSessionKey");
String ctoken= null;
if(user!=null)
{
ctoken = user.getCSRFToken();

}
String fsid ="";
HashMap<String, FSAccountMappingVo> hashMap = null;
List<HashMap> gatewayList = new ArrayList<>();
FSPartnerMappingVO fsPartnerMappingVO = null;
String id_Doc_Check = "";
String add_Id_Doc_Check = "";
if (functions.isValueNull(partnerid)) {
FraudTransaction fraudTransaction = new FraudTransaction();
fsPartnerMappingVO = fraudTransaction.getPartnerDetailsFlag(partnerid);
if (fsPartnerMappingVO != null) {
id_Doc_Check = fsPartnerMappingVO.getIsID_DOC_Check();
add_Id_Doc_Check = fsPartnerMappingVO.getIsAdd_DOC_Check();
}
List<FSAccountMappingVo> fsAccountMappingVos =
fraudTransaction.getPartnerFsDetailsList(partnerid);
for (FSAccountMappingVo accountMappingVo : fsAccountMappingVos) {
hashMap = new HashMap<>();
if (accountMappingVo != null) {
FraudSystemAccountVO fraudSystemAccountVO =
FraudSystemAccountService.getFraudSystemAccount(accountMappingVo.getFsaccountid());
if (functions.isValueNull(accountMappingVo.getFsaccountid())){
fsid = accountMappingVo.getFsaccountid();}

if (fraudSystemAccountVO != null) {
String fsGateway =
FraudSystemService.getFSGateway(fraudSystemAccountVO.getFraudSystemId());
hashMap.put(fsGateway, accountMappingVo);
gatewayList.add(hashMap);
}

}
String seamfixverified = "";
String cac = "";
String idPal = "";
String one23Signed = "";
String isBvn_Full_Serivce = "";
String one23SignedBiometric="";
String idPalBiometric="";
String isBVNAddressService = "";
String isCAC_Check = "";
String isYouVerifyAddressService="";
if (gatewayList != null && gatewayList.size() != 0) {
for (HashMap<String, FSAccountMappingVo> map : gatewayList) {
for (String key : map.keySet()) {
if (key.equalsIgnoreCase("verified")) {
seamfixverified = key;
FSAccountMappingVo accountMappingVo = map.get(key);
if (accountMappingVo != null) {
isBvn_Full_Serivce =
accountMappingVo.getIsBvn_Full_Serivce();
isBVNAddressService =
accountMappingVo.getIsAddress_Service();
}
}
if (key.equalsIgnoreCase("youverify")) {
cac = key;
FSAccountMappingVo accountMappingVo = map.get(key);
if (accountMappingVo != null) {
isCAC_Check = accountMappingVo.getIsCAC_Check();

isYouVerifyAddressService=accountMappingVo.getIsAddress_Service();
}
}
if (key.equalsIgnoreCase("123Signed")) {
one23Signed = key;
FSAccountMappingVo accountMappingVo = map.get(key);
if (accountMappingVo != null) {
one23SignedBiometric =
accountMappingVo.getIsBiometricCheck();
}
}if (key.equalsIgnoreCase("idPal")) {
idPal = key;
FSAccountMappingVo accountMappingVo = map.get(key);
if (accountMappingVo != null) {
idPalBiometric = accountMappingVo.getIsBiometricCheck();
}
}
}
}
}

List<String> list = applicationManagerDAO.getCompanyDocumentList(partnerid);

if(applicationManagerVO!=null) {
if (applicationManagerVO.getFileDetailsVOs() != null) {
fileDetailsVOHashMap=
applicationManagerDAO.getApplicationUploadedFileDetail(applicationManagerVO.getMemb
erId());;

}
applicationID =
partnerDAO2.getApplicationId(applicationManagerVO.getMemberId());
System.out.println("apppppppppppppp"+applicationID);
ownershipProfileVO1 =
applicationManagerDAO.getOwnerCountDetails(applicationID);
Map<String,OwnershipProfileDetailsVO> ownerShipVo=
applicationManagerDAO.populateOwnershipProfileDetails(applicationID);

if (applicationManagerVO.getUploadLabelVOs() != null) {
uploadLabelVOList = applicationManagerVO.getUploadLabelVOs();

int counter = 100;


//ShareHolder Add Document
String numOfShare = ownershipProfileVO1.getNumOfShareholders();
String numOfDir = ownershipProfileVO1.getNumOfDirectors();
String numOfAuthorised =
ownershipProfileVO1.getNumOfAuthrisedSignatory();

if(ownershipProfileVO.getOwnershipProfileDetai

You might also like