Package edu.asu.securebanking.model

Examples of edu.asu.securebanking.model.ExternalAccount


 
  public synchronized ModelAndView IndividualUserLessFunds(Principal principal) {
   
    ModelAndView modelAndView = new ModelAndView("IndividualUserLessFunds");
   
    ExternalAccount externalAccount =  externalAccountBO.findAccountByName(principal.getName());

    modelAndView.addObject("message", externalAccount.getCurrentBalance());

    return modelAndView;
  }
View Full Code Here


 
  public synchronized ModelAndView IndividualUserDebitSuccess(Principal principal) {
   
    ModelAndView modelAndView = new ModelAndView("IndividualUserDebitSuccess");
   
    ExternalAccount externalAccount =  externalAccountBO.findAccountByName(principal.getName());

    modelAndView.addObject("message", externalAccount.getCurrentBalance());

    return modelAndView;
  }
View Full Code Here

   @RequestMapping(value="/viewMerchantTransactions")
  
    public synchronized ModelAndView listOflTransactions(Principal principal) {
    
     String name = principal.getName();
      ExternalAccount currentuser = externalAccountBO.findAccountByName(name);
    
      ModelAndView modelAndView = new ModelAndView("MerchantTransactions");
     
      List<ExternalUserTransaction> transactions = merchantsBO.getAllMerchantsTransactions(currentuser.getUserid());
     
      modelAndView.addObject("transactions", transactions);
     
      return modelAndView;
    }
View Full Code Here

    public synchronized ModelAndView accountManagement(Principal principal) {
    
      ModelAndView modelAndView = new ModelAndView("MerchantAccountManagement");
     
      String name = principal.getName();
      ExternalAccount currentuser = externalAccountBO.findAccountByName(name);
     
   
     
      modelAndView.addObject("accountbyname", currentuser);
     
View Full Code Here

    public synchronized ModelAndView transferToIndividual(Principal principal) {
    
      ModelAndView modelAndView = new ModelAndView("MerchantTransferIndividual");
     
      String name = principal.getName();
      ExternalAccount currentuser = externalAccountBO.findAccountByName(name);
     
   
     
      modelAndView.addObject("accountbyname", currentuser);
     
View Full Code Here

  
    public synchronized ModelAndView debitMoney(Principal principal) {
    

      String name = principal.getName();
      ExternalAccount currentuser = externalAccountBO.findAccountByName(name);
    
     ExternalUserTransaction debit = new ExternalUserTransaction();
    
     debit.setUserId(currentuser.getUserid());
    
     debit.setAccessGranted(1);
    
     debit.setStatus("Pending");
    
View Full Code Here

    
     double currentBalance = 0.0;
    
     int userId = externalUserTransaction.getUserId();
    
     ExternalAccount externalAccount = externalAccountBO.findUserByid(userId);
      
     if(externalAccount != null)
     {
         currentBalance = externalAccount.getCurrentBalance();
     }
     // Check the current Balance  if not return error
    
     if(currentBalance<amount)
         {
        return "redirect:/Merchant/MerchantLessFunds";
      
       
          }
    
     //else process the transaction.
     else
     {
       //Update the current Balance
       amount=amount*-1;
      
       currentBalance =  currentBalance + amount;
      
       externalAccount.setCurrentBalance(currentBalance);
      
       externalAccountBO.update(externalAccount);
      
       // Create New Transaction
       externalUserTransaction.setAmountInvolved(amount);
View Full Code Here

   
    public synchronized ModelAndView MerchantLessFunds(Principal principal) {
     
      ModelAndView modelAndView = new ModelAndView("MerchantLessFunds");
     
      ExternalAccount externalAccount =  externalAccountBO.findAccountByName(principal.getName());

      modelAndView.addObject("message", externalAccount.getCurrentBalance());

      return modelAndView;
    }
View Full Code Here

   
    public synchronized ModelAndView MerchantDebitSuccess(Principal principal) {
     
      ModelAndView modelAndView = new ModelAndView("MerchantDebitSuccess");
     
      ExternalAccount externalAccount =  externalAccountBO.findAccountByName(principal.getName());

      modelAndView.addObject("message", externalAccount.getCurrentBalance());

      return modelAndView;
    }
View Full Code Here

  
    public synchronized ModelAndView creditMoney(Principal principal) {
    

      String name = principal.getName();
      ExternalAccount currentuser = externalAccountBO.findAccountByName(name);
    
     ExternalUserTransaction debit = new ExternalUserTransaction();
    
     debit.setUserId(currentuser.getUserid());
    
     debit.setAccessGranted(1);
    
     debit.setStatus("Pending");
    
View Full Code Here

TOP

Related Classes of edu.asu.securebanking.model.ExternalAccount

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.