Class SapDigitalPaymentAndBillingMethodCheckoutStepController

  • All Implemented Interfaces:
    CheckoutStepController

    @Controller
    @RequestMapping("/checkout/multi/sap-digital-payment")
    public class SapDigitalPaymentAndBillingMethodCheckoutStepController
    extends AbstractCheckoutStepController
    Controller class to handle all the payment and billing address requests in the SAP Digital payment checkout flow
    • Constructor Detail

      • SapDigitalPaymentAndBillingMethodCheckoutStepController

        public SapDigitalPaymentAndBillingMethodCheckoutStepController()
    • Method Detail

      • registerNewCard

        @RequestMapping(value="/cards/new-card",
                        method=GET)
        public java.lang.String registerNewCard​(org.springframework.ui.Model model,
                                                org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes)
                                         throws CMSItemNotFoundException
        Register the card with SAP Digital payment
        Parameters:
        model -
        redirectAttributes -
        Returns:
        String
        Throws:
        CMSItemNotFoundException
      • doSelectPaymentMethod

        @RequestMapping(value="/cards/choose",
                        method=GET)
        public java.lang.String doSelectPaymentMethod​(@RequestParam("selectedPaymentMethodId")
                                                      java.lang.String selectedPaymentMethodId)
        This method gets called when the "Use These Payment Details" button is clicked. It sets the selected payment method on the checkout facade and reloads the page highlighting the selected payment method.
        Parameters:
        selectedPaymentMethodId - - the id of the payment method to use.
        Returns:
        - a URL to the page to load.
      • back

        @RequestMapping(value="/cards/back",
                        method=GET)
        public java.lang.String back​(org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes)
        Returns:
        checkoutstep link for navigating back
      • next

        @RequestMapping(value="/cards/next",
                        method=GET)
        public java.lang.String next​(org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes)
        Returns:
        checkoutstep link for navigating next
      • enterStep

        @RequestMapping(value="billing-address/add",
                        method=GET)
        public java.lang.String enterStep​(org.springframework.ui.Model model,
                                          org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes)
                                   throws CMSItemNotFoundException
        Display the billing and payment page
        Returns:
        returns the result for entering the checkout step
        Throws:
        CMSItemNotFoundException
      • addBillingAddress

        @RequestMapping(value="billing-address/add",
                        method=POST)
        public java.lang.String addBillingAddress​(org.springframework.ui.Model model,
                                                  BillingAddressDetailsForm billingAddressDetailsForm,
                                                  org.springframework.validation.BindingResult bindingResult)
                                           throws CMSItemNotFoundException
        Adds the billing address details to the cart
        Parameters:
        model -
        billingAddressDetailsForm -
        bindingResult -
        Returns:
        String
        Throws:
        CMSItemNotFoundException
      • getBillingAddressValidator

        public BillingAddressValidator getBillingAddressValidator()
        Returns:
        the billingAddressValidator
      • setBillingAddressValidator

        public void setBillingAddressValidator​(BillingAddressValidator billingAddressValidator)
        Parameters:
        billingAddressValidator - the billingAddressValidator to set
      • setUserFacade

        public void setUserFacade​(UserFacade userFacade)
        Parameters:
        userFacade - the userFacade to set
      • checkPaymentSubscription

        protected boolean checkPaymentSubscription​(org.springframework.ui.Model model,
                                                   @Valid
                                                   @Valid PaymentDetailsForm paymentDetailsForm,
                                                   CCPaymentInfoData newPaymentSubscription)
      • getCheckoutStep

        protected CheckoutStep getCheckoutStep()
      • getCisSapDigitalPaymentFacade

        public CisSapDigitalPaymentFacade getCisSapDigitalPaymentFacade()
        Returns:
        the cisSapDigitalPaymentFacade
      • setCisSapDigitalPaymentFacade

        public void setCisSapDigitalPaymentFacade​(CisSapDigitalPaymentFacade cisSapDigitalPaymentFacade)
        Parameters:
        cisSapDigitalPaymentFacade - the cisSapDigitalPaymentFacade to set
      • getSapDigitalPaymentFacade

        public SapDigitalPaymentFacade getSapDigitalPaymentFacade()
        Returns:
        the sapDigitalPaymentFacade
      • setSapDigitalPaymentFacade

        public void setSapDigitalPaymentFacade​(SapDigitalPaymentFacade sapDigitalPaymentFacade)
        Parameters:
        sapDigitalPaymentFacade - the sapDigitalPaymentFacade to set
      • getAddressDataUtil

        public AddressDataUtil getAddressDataUtil()
        Returns:
        the addressDataUtil
      • setAddressDataUtil

        public void setAddressDataUtil​(AddressDataUtil addressDataUtil)
        Parameters:
        addressDataUtil - the addressDataUtil to set