Package org.simplecart.account.billing

Examples of org.simplecart.account.billing.CreditCardBillingDetails


       
        // get the customer object from the session
        Customer customer = (Customer) session.getAttribute(Constants.LOGGED_IN_USER_KEY);
       
        // copy form-bean values to new Stake and Address objects
        CreditCardBillingDetails creditCardDetails = new CreditCardBillingDetails();
        creditCardDetails.setCreditCardType(CreditCardType.getInstance(billingForm.getCreditCardType()));
        creditCardDetails.setCreditCardExpirationMonth(billingForm.getCreditCardExpirationMonth());
        creditCardDetails.setCreditCardExpirationYear(billingForm.getCreditCardExpirationYear());
        creditCardDetails.setCreditCardNumber(billingForm.getCreditCardNumber());
        creditCardDetails.setCreditCardCVVSCode(billingForm.getCreditCardCVVSCode());
       
        // attache the address to this new customer
        customer.addBillingDetails(creditCardDetails);
       
        // get a DAO for the new Stake
View Full Code Here


            newOrder.getLineItems().add(currentLineItem);
        }
       
        // create the payment and attache to the order
        InternetPayment payment = new InternetPayment();
        CreditCardBillingDetails billing = (CreditCardBillingDetails) customer.getBillingDetails().iterator().next();
        payment.setCreditCardType(billing.getCreditCardType().toString());
        payment.setCreditCardNumber(billing.getCreditCardNumber());
        payment.setCreditCardCVVSCode(billing.getCreditCardCVVSCode());
        payment.setExpirationDate(billing.getCreditCardExpirationMonth()+"/"+billing.getCreditCardExpirationYear());
        payment.setPaymentAmount(shopcart.getCartTotal());
        payment.setPaymentDate(new java.util.Date());
        payment.setPaymentMethod("Credit Card");
       
        // add this payment to the newOrder
View Full Code Here

TOP

Related Classes of org.simplecart.account.billing.CreditCardBillingDetails

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.