Class BroadleafPaymentInfoController

java.lang.Object
org.broadleafcommerce.common.web.controller.BroadleafAbstractController
org.broadleafcommerce.core.web.controller.checkout.AbstractCheckoutController
org.broadleafcommerce.core.web.controller.checkout.BroadleafPaymentInfoController

public class BroadleafPaymentInfoController extends AbstractCheckoutController
Author:
Chris Kittrell (ckittrell)
  • Field Details

    • savedPaymentService

      protected SavedPaymentService savedPaymentService
    • fulfillmentGroupService

      protected org.broadleafcommerce.core.order.service.FulfillmentGroupService fulfillmentGroupService
  • Constructor Details

    • BroadleafPaymentInfoController

      public BroadleafPaymentInfoController()
  • Method Details

    • savePaymentInfo

      public String savePaymentInfo(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, PaymentInfoForm paymentForm, org.springframework.validation.BindingResult result) throws org.broadleafcommerce.core.pricing.service.exception.PricingException, org.broadleafcommerce.common.exception.ServiceException
      Processes the request to save an OrderPayment based on an existing or new CustomerPayment.

      Note: this default Broadleaf implementation will create a CustomerPayment if one does not exist, and copy it's data to a new OrderPayment.

      Parameters:
      request -
      response -
      model -
      paymentForm -
      Returns:
      the return path
      Throws:
      org.broadleafcommerce.common.exception.ServiceException
      org.broadleafcommerce.core.pricing.service.exception.PricingException
    • saveBillingAddress

      public String saveBillingAddress(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, PaymentInfoForm paymentForm, org.springframework.validation.BindingResult result) throws org.broadleafcommerce.core.pricing.service.exception.PricingException, org.broadleafcommerce.common.exception.ServiceException
      Processes the request to save a billing address.

      Note: this default Broadleaf implementation will create an OrderPayment of type CREDIT_CARD and save the passed in billing address

      Parameters:
      request -
      response -
      model -
      paymentForm -
      Returns:
      the return path
      Throws:
      org.broadleafcommerce.common.exception.ServiceException
      org.broadleafcommerce.core.pricing.service.exception.PricingException
    • preProcessBillingAddress

      protected void preProcessBillingAddress(PaymentInfoForm paymentForm, org.broadleafcommerce.core.order.domain.Order cart)
    • copyShippingAddressToBillingAddress

      protected void copyShippingAddressToBillingAddress(org.broadleafcommerce.core.order.domain.Order order, PaymentInfoForm paymentInfoForm)
      This method will copy the shipping address of the first fulfillment group on the order to the billing address on the PaymentInfoForm that is passed in.
    • copyCustomerPaymentAddressToBillingAddress

      protected void copyCustomerPaymentAddressToBillingAddress(PaymentInfoForm paymentForm)
    • addTemporaryOrderPayment

      protected void addTemporaryOrderPayment(PaymentInfoForm paymentForm, org.broadleafcommerce.core.order.domain.Order cart)