org.broadleafcommerce.core.web.controller.checkout
Class DefaultCreditCardExtensionHandler

java.lang.Object
  extended by org.broadleafcommerce.common.extension.AbstractExtensionHandler
      extended by org.broadleafcommerce.core.web.controller.checkout.DefaultCreditCardExtensionHandler
All Implemented Interfaces:
ExtensionHandler, PaymentInfoServiceExtensionHandler

@Service(value="blDefaultCreditCardExtensionHandler")
public class DefaultCreditCardExtensionHandler
extends AbstractExtensionHandler
implements PaymentInfoServiceExtensionHandler

Extension handler to add a credit card PaymentInfo to the payments map and the order

Author:
Joshua Skorton (jskorton)

Field Summary
protected  BillingInfoFormValidator billingInfoFormValidator
           
protected  PaymentInfoServiceExtensionManager extensionManager
           
protected  FulfillmentGroupService fulfillmentGroupService
           
protected  PaymentInfoFactory paymentInfoFactory
           
protected  SecurePaymentInfoService securePaymentInfoService
           
 
Fields inherited from class org.broadleafcommerce.common.extension.AbstractExtensionHandler
enabled, priority
 
Constructor Summary
DefaultCreditCardExtensionHandler()
           
 
Method Summary
 ExtensionResultStatusType addAdditionalPaymentInfos(Map<PaymentInfo,Referenced> payments, List<PaymentInfoType> paymentInfoTypeList, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, BillingInfoForm billingForm, org.springframework.validation.BindingResult result)
          Adds a credit card PaymentInfo to the payments map and the order.
protected  ExtensionResultStatusType addToPaymentsMap(Map<PaymentInfo,Referenced> payments, BillingInfoForm billingForm, org.springframework.validation.BindingResult result)
          Adds a credit card PaymentInfo to the payments map and the order.
protected  void copyShippingAddressToBillingAddress(Order order, BillingInfoForm billingInfoForm)
          This method will copy the shipping address of the first shippable fulfillment group on the order to the billing address on the BillingInfoForm that is passed in.
 void init()
           
 
Methods inherited from class org.broadleafcommerce.common.extension.AbstractExtensionHandler
getPriority, isEnabled, setEnabled, setPriority
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.broadleafcommerce.common.extension.ExtensionHandler
getPriority, isEnabled
 

Field Detail

extensionManager

protected PaymentInfoServiceExtensionManager extensionManager

paymentInfoFactory

protected PaymentInfoFactory paymentInfoFactory

securePaymentInfoService

protected SecurePaymentInfoService securePaymentInfoService

billingInfoFormValidator

protected BillingInfoFormValidator billingInfoFormValidator

fulfillmentGroupService

protected FulfillmentGroupService fulfillmentGroupService
Constructor Detail

DefaultCreditCardExtensionHandler

public DefaultCreditCardExtensionHandler()
Method Detail

init

@PostConstruct
public void init()

addAdditionalPaymentInfos

public ExtensionResultStatusType addAdditionalPaymentInfos(Map<PaymentInfo,Referenced> payments,
                                                           List<PaymentInfoType> paymentInfoTypeList,
                                                           javax.servlet.http.HttpServletRequest request,
                                                           javax.servlet.http.HttpServletResponse response,
                                                           org.springframework.ui.Model model,
                                                           BillingInfoForm billingForm,
                                                           org.springframework.validation.BindingResult result)
Adds a credit card PaymentInfo to the payments map and the order. The paymentInfoTypeList is checked to confirm that the credit card PaymentInfo should be added.

Specified by:
addAdditionalPaymentInfos in interface PaymentInfoServiceExtensionHandler
Parameters:
payments -
paymentInfoTypeList - - Checks this list to decide if credit card PaymentInfos should be added to the payments map.
request -
response -
model -
billingForm -
result -
Returns:

addToPaymentsMap

protected ExtensionResultStatusType addToPaymentsMap(Map<PaymentInfo,Referenced> payments,
                                                     BillingInfoForm billingForm,
                                                     org.springframework.validation.BindingResult result)
Adds a credit card PaymentInfo to the payments map and the order.

Parameters:
payments -
billingForm -
result -
Returns:

copyShippingAddressToBillingAddress

protected void copyShippingAddressToBillingAddress(Order order,
                                                   BillingInfoForm billingInfoForm)
This method will copy the shipping address of the first shippable fulfillment group on the order to the billing address on the BillingInfoForm that is passed in.

Parameters:
billingInfoForm -


Copyright © 2013. All Rights Reserved.