Package com.ateam.webstore.model

Examples of com.ateam.webstore.model.CreditCard


  public FormSubmission processAddCardRequest() {
   
    //Get the form data
    CardEditForm cf = getCardFromRequest();
   
    CreditCard card = null;
   
    //Validate and add address
    if (cf.isValid()) try {
      Visitor v = (Visitor) req.getSession().getAttribute(SESSION_ATTRIBUTE_VISITOR);
     
      AddressHandler ah = new AddressHandler(req);
     
      ah.processAddAddressRequest();
     
      card = new CreditCard(cf.getCardNumber(), cf.getExpMonth(), cf.getExpYear(), cf.getSecurityCode(), cf.getNameOnCard(), false, v.getCustomer(), ah.getAddr());
      card.setCardType(cf.getCardType());
      service.store(card);
     
    } catch (Exception e) {
      l.log(Level.WARNING, "Failed to store card", e);
      cf.setResultMessage("Could not store card");
View Full Code Here

TOP

Related Classes of com.ateam.webstore.model.CreditCard

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.