@RequestMapping(value = "/refundpopup", method = RequestMethod.GET) public @ResponseBody ModelAndView refundPopup(HttpServletRequest request, ModelMap modelmap) { ModelAndView model = null; try { String tmid = request.getParameter("tid"); System.out.println("tmid==>" + tmid); List<TransationMonitoring> tmlist = paymentService.getTransationMonitoringValue(tmid); if (tmlist != null) { TransationMonitoring tm = tmlist.get(0); System.out.println(tm.getChargebackauthorizestatus()); String merid = tm.getMerchantid(); String txncurr = tm.getTxncurrency(); String setcurr = tm.getSettlecurrency(); List<Merchant> merlist = merchantService.getMerchantdetails(merid); List<CurrencyCode> txnlist = paymentService.getCurrencyName(txncurr); List<CurrencyCode> setlist = paymentService.getCurrencyName(setcurr); modelmap.addAttribute("merlist", merlist); modelmap.addAttribute("txnlist", txnlist); modelmap.addAttribute("setlist", setlist); } modelmap.addAttribute("tmlist", tmlist); model = new ModelAndView("uam/refundpopup"); } catch (Exception e) { e.printStackTrace(); } return model; }
@RequestMapping(value = "/saveadjustrefund", method = RequestMethod.GET) public ModelAndView saveAdjustRefund(HttpServletRequest request, ModelMap modelmap) { try { RefundAdjustment adj = new RefundAdjustment(); adj.setMerchantid(request.getParameter("hiddenmerid")); adj.setTxncode(Integer.parseInt(request.getParameter("hiddentxncode"))); System.out.println("hiddentxndate==>" + request.getParameter("hiddentxndate")); Date date = new Date(request.getParameter("hiddentxndate")); adj.setTxndate(date); adj.setCardnumber(Integer.parseInt(request.getParameter("hiddencardnumber"))); adj.setTxnrefno(request.getParameter("hiddentxnrefno")); adj.setTrackno(Integer.parseInt(request.getParameter("hiddentrackno"))); adj.setRespcode(Integer.parseInt(request.getParameter("hiddenrespcode"))); System.out.println("hiddencurrencyname==>" + request.getParameter("hiddencurrencyname")); adj.setTxncurrency(request.getParameter("hiddencurrencyname")); adj.setTxnamount(Integer.parseInt(request.getParameter("hiddentxnamount"))); adj.setTxnfees(Integer.parseInt(request.getParameter("hiddentxnfees"))); adj.setSettleamount(Integer.parseInt(request.getParameter("hiddensettleamount"))); adj.setChargebackstatus(request.getParameter("hiddenchargeback")); adj.setRefundamount(Integer.parseInt(request.getParameter("transamount"))); adj.setMerchentamounttype(request.getParameter("meramountstatus")); int id = paymentService.saveAdjustRefund(adj); } catch (Exception e) { e.printStackTrace(); } return null; }
@RequestMapping(value = "/{pagename}", method = RequestMethod.GET) public ModelAndView merchantpage( ModelMap modelmap, HttpServletRequest request, @PathVariable("pagename") String pagename) { ModelAndView model = new ModelAndView(); // index if (pagename.equalsIgnoreCase("merchants")) { List<ProductForm> provalue = paymentService.getProductForm(); modelmap.addAttribute("provalue", provalue); model = new ModelAndView("acquirer/merchants"); } else if (pagename.equalsIgnoreCase("users")) { model = new ModelAndView("acquirer/users"); } else if (pagename.equalsIgnoreCase("transaction_reports")) { model = new ModelAndView("acquirer/transaction_reports"); } else if (pagename.equalsIgnoreCase("Settlement")) { model = new ModelAndView("acquirer/Settlement"); } else if (pagename.equalsIgnoreCase("otpmessageform")) { model = new ModelAndView("acquirer/otpmessageform"); } else if (pagename.equalsIgnoreCase("otpexpiryperiodform")) { model = new ModelAndView("acquirer/otpexpiryperiodform"); } else if (pagename.equalsIgnoreCase("showdailyreports")) { model = new ModelAndView("reports/dailyreport"); } else if (pagename.equalsIgnoreCase("showmonthlyreports")) { Calendar date = Calendar.getInstance(); int curr = date.get(Calendar.YEAR); int pre = date.get(Calendar.YEAR) - 1; model.addObject("curr", curr); model.addObject("pre", pre); model.setViewName("reports/monthlyreport"); return model; // model = new ModelAndView("reports/monthlyreport"); } else if (pagename.equalsIgnoreCase("realtimetxnshow")) { model = new ModelAndView("acquirer/realtimetxnshow"); } else if (pagename.equalsIgnoreCase("index")) { model = new ModelAndView("acquirer/index"); } else if (pagename.equalsIgnoreCase("chargeback")) { model = new ModelAndView("chargeback/chargebackform"); } else if (pagename.equalsIgnoreCase("representmentform")) { model = new ModelAndView("chargeback/representmentform"); } else if (pagename.equalsIgnoreCase("representmentview")) { model = new ModelAndView("chargeback/representmentform"); } else if (pagename.equalsIgnoreCase("reconfileform")) { model = new ModelAndView("recon/reconfileform"); } else if (pagename.equalsIgnoreCase("loginform")) { model = new ModelAndView("acquirer/index"); } else if (pagename.equalsIgnoreCase("showUserModification")) { model = new ModelAndView("acquirer/usermodifyconfirm"); } else if (pagename.equalsIgnoreCase("sendForgotPwdLink")) { model = new ModelAndView("acquirer/userforgetform"); } return model; }
@RequestMapping(value = "/acctadjust", method = RequestMethod.GET) public ModelAndView acctAdjust(HttpServletRequest request, ModelMap modelmap) { ModelAndView model = new ModelAndView(); try { List<CurrencyCode> cclist = paymentService.getCurrencyCode(); List<Merchant> merlist = merchantService.getMerchantdetails(); modelmap.addAttribute("cclist", cclist); modelmap.addAttribute("merlist", merlist); } catch (Exception e) { e.printStackTrace(); } model.setViewName("uam/acctadjust"); return model; }
@RequestMapping(value = "/insertaccountajustment", method = RequestMethod.GET) public ModelAndView saveAccountAdjustment(HttpServletRequest request, ModelMap modelmap) { ModelAndView model = new ModelAndView(); try { AuditTrial audit = new AuditTrial(); HttpSession sessionObj = request.getSession(); AccountAdjustment aa = new AccountAdjustment(); aa.setDebitaccount(request.getParameter("hiddendebitacct")); aa.setCreditaccount(request.getParameter("hiddencreditacct")); aa.setAdjustamount(Integer.parseInt(request.getParameter("hiddenadjustacct"))); aa.setCurrency(request.getParameter("hiddentcurrency")); aa.setReason(request.getParameter("hiddenreason")); int id = paymentService.saveAccountAdjustment(aa); // --audit function start-- DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss"); // get current date time with Date() Date date = new Date(); System.out.println("date and time==>" + dateFormat.format(date)); String adminname = (String) sessionObj.getAttribute("adminname"); audit.setUsername(adminname); audit.setDescription("Insert the account adjustment"); audit.setLogdate(dateFormat.format(date)); int auditid = merchantService.saveAudit(audit); // --audit function end-- model.setViewName("uam/acctadjustsuccess"); } catch (Exception e) { e.printStackTrace(); } return model; }
@RequestMapping(value = "/callReject", method = RequestMethod.GET) public ModelAndView callReject(HttpServletRequest request, ModelMap modelmap) { ModelAndView model = null; try { String tid = request.getParameter("tid"); int id = paymentService.callAccpectandReject(tid, 'A'); // --view the transaction adjustment list -- AuditTrial audit = new AuditTrial(); HttpSession sessionObj = request.getSession(); String[] mount = { "JAN", "FEB", "MAR", "APR", "MAY", "JUN", "JUL", "AUG", "SEP", "OCT", "NOV", "DEC" }; String merid = request.getParameter("merchantid"); String tdate = request.getParameter("tdate"); String trefno = request.getParameter("trefno"); String cnumber = request.getParameter("cardnumber"); modelmap.addAttribute("merid", merid); modelmap.addAttribute("tdate", tdate); modelmap.addAttribute("trefno", trefno); modelmap.addAttribute("cnumber", cnumber); List<TransationMonitoring> tmlist = null; System.out.println("tdate1===>" + tdate); String state = "yes"; if (!tdate.equals("")) { state = "tdate"; String dateval[] = tdate.split("/"); String mounth = dateval[0]; String date = dateval[1]; String year = dateval[2]; tdate = date + "-" + mount[Integer.parseInt(mounth) - 1] + "-" + year; System.out.println("tdate2===>" + tdate); tmlist = paymentService.getTransationMonitoringTDate(merid, tdate); } if (!trefno.equals("")) { state = "trefno"; tmlist = paymentService.getTransationMonitoringRefno(merid, trefno); } if (cnumber != null && !cnumber.equals("")) { state = "cnumber"; tmlist = paymentService.getTransationMonitoringCardno(merid, cnumber); } if (cnumber != null && !trefno.equals("") && !cnumber.equals("")) { state = "all"; tmlist = paymentService.getTransationMonitoringAll(merid, tdate, trefno, cnumber); } if (state.equals("yes")) { if (!merid.equals("")) { tmlist = paymentService.getTransationMonitoring(merid); } } // --audit function start-- DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss"); // get current date time with Date() Date date = new Date(); System.out.println("date and time==>" + dateFormat.format(date)); String adminname = (String) sessionObj.getAttribute("adminname"); audit.setUsername(adminname); audit.setDescription("Change the account transaction status for accpect"); audit.setLogdate(dateFormat.format(date)); int auditid = merchantService.saveAudit(audit); // --audit function end-- modelmap.addAttribute("tmlist", tmlist); model = new ModelAndView("uam/searchtranactionadjustment"); } catch (Exception e) { e.printStackTrace(); } return model; }