Class SapDigitalPaymentAndBillingMethodCheckoutStepController
java.lang.Object
de.hybris.platform.acceleratorstorefrontcommons.controllers.AbstractController
de.hybris.platform.acceleratorstorefrontcommons.controllers.pages.AbstractPageController
de.hybris.platform.acceleratorstorefrontcommons.controllers.pages.AbstractCheckoutController
de.hybris.platform.acceleratorstorefrontcommons.controllers.pages.checkout.steps.AbstractCheckoutStepController
de.hybris.platform.sapdigitalpaymentaddon.controllers.pages.checkout.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
-
Nested Class Summary
Nested classes/interfaces inherited from class de.hybris.platform.acceleratorstorefrontcommons.controllers.pages.checkout.steps.AbstractCheckoutStepController
AbstractCheckoutStepController.CheckoutStepsNested classes/interfaces inherited from class de.hybris.platform.acceleratorstorefrontcommons.controllers.pages.AbstractCheckoutController
AbstractCheckoutController.SelectOptionNested classes/interfaces inherited from class de.hybris.platform.acceleratorstorefrontcommons.controllers.AbstractController
AbstractController.HttpNotFoundException -
Field Summary
Fields inherited from class de.hybris.platform.acceleratorstorefrontcommons.controllers.pages.checkout.steps.AbstractCheckoutStepController
MULTI_CHECKOUT_SUMMARY_CMS_PAGE_LABEL, REDIRECT_URL_ADD_DELIVERY_ADDRESS, REDIRECT_URL_ADD_PAYMENT_METHOD, REDIRECT_URL_CART, REDIRECT_URL_CHOOSE_DELIVERY_METHOD, REDIRECT_URL_ERROR, REDIRECT_URL_SUMMARYFields inherited from class de.hybris.platform.acceleratorstorefrontcommons.controllers.pages.AbstractCheckoutController
REDIRECT_URL_ORDER_CONFIRMATIONFields inherited from class de.hybris.platform.acceleratorstorefrontcommons.controllers.pages.AbstractPageController
CMS_PAGE_MODEL, CMS_PAGE_TITLE, PAGE_ROOT, REDIRECT_TO_LOGIN_FOR_CHECKOUT, REDIRECT_TO_MULTISTEP_CHECKOUT, REGISTRATION_CONSENT_ID, UTF_8Fields inherited from class de.hybris.platform.acceleratorstorefrontcommons.controllers.AbstractController
FORWARD_PREFIX, REDIRECT_PREFIX, ROOT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddBillingAddress(org.springframework.ui.Model model, BillingAddressDetailsForm billingAddressDetailsForm, org.springframework.validation.BindingResult bindingResult) Adds the billing address details to the cartback(org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes) protected booleancheckPaymentSubscription(org.springframework.ui.Model model, @Valid PaymentDetailsForm paymentDetailsForm, CCPaymentInfoData newPaymentSubscription) doSelectPaymentMethod(String selectedPaymentMethodId) This method gets called when the "Use These Payment Details" button is clicked.enterStep(org.springframework.ui.Model model, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes) Display the billing and payment pageprotected voidfillInPaymentData(@Valid PaymentDetailsForm paymentDetailsForm, CCPaymentInfoData paymentInfoData) protected CheckoutStepde.hybris.platform.commercefacades.user.UserFacadenext(org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes) registerNewCard(org.springframework.ui.Model model, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes) Register the card with SAP Digital paymentvoidsetAddressDataUtil(AddressDataUtil addressDataUtil) voidsetBillingAddressValidator(BillingAddressValidator billingAddressValidator) voidsetCisSapDigitalPaymentFacade(CisSapDigitalPaymentFacade cisSapDigitalPaymentFacade) voidsetSapDigitalPaymentFacade(SapDigitalPaymentFacade sapDigitalPaymentFacade) protected voidsetupAddPaymentPage(org.springframework.ui.Model model) protected voidsetupBillingAddressPage(org.springframework.ui.Model model) voidsetUserFacade(de.hybris.platform.commercefacades.user.UserFacade userFacade) Methods inherited from class de.hybris.platform.acceleratorstorefrontcommons.controllers.pages.checkout.steps.AbstractCheckoutStepController
addCheckoutStepsToModel, getAddressValidator, getAddressVerificationResultHandler, getCartFacade, getCheckoutFlowGroupMap, getCheckoutGroup, getCheckoutStep, getContentPageBreadcrumbBuilder, getCountries, getCountryDataMap, getCustomerLocationService, getPaymentDetailsValidator, getPaymentFacade, getProductFacade, getRequestParameterMap, getResourceBreadcrumbBuilder, getTitles, handleUnknownIdentifierException, prepareDataForPage, setCheckoutStepLinksForModelMethods inherited from class de.hybris.platform.acceleratorstorefrontcommons.controllers.pages.AbstractCheckoutController
getAddressVerificationFacade, getCheckoutCustomerStrategy, getCheckoutFacade, getCheckoutFlowFacade, getDeliveryAddresses, getI18NFacade, isAddressIdChanged, isAddressOnList, redirectToOrderConfirmationPage, validateCartMethods inherited from class de.hybris.platform.acceleratorstorefrontcommons.controllers.pages.AbstractPageController
addRegistrationConsentDataToModel, checkRequestUrl, createMetaElement, decodeWithScheme, getBaseSiteService, getCheckoutRedirectUrl, getCmsPageService, getCmsPreviewService, getCmsSiteService, getConfigurationService, getConsentFacade, getContentPageForLabelOrId, getCurrencies, getCurrentCurrency, getCurrentLanguage, getCustomerFacade, getHostConfigService, getI18nService, getLanguages, getMessageSource, getPageTitleResolver, getRequestContextData, getSessionService, getSiteConfigService, getSiteName, getSiteUid, getStoreSessionFacade, getUser, getViewForPage, getViewForPage, prepareNotFoundPage, setUpMetaData, setUpMetaDataForContentPage, storeCmsPageInModel, storeContentPageTitleInModel, storeContinueUrl, urlEncodeMethods inherited from class de.hybris.platform.acceleratorstorefrontcommons.controllers.AbstractController
addRequestToModel, getBean
-
Constructor Details
-
SapDigitalPaymentAndBillingMethodCheckoutStepController
public SapDigitalPaymentAndBillingMethodCheckoutStepController()
-
-
Method Details
-
registerNewCard
@RequestMapping(value="/cards/new-card", method=GET) public String registerNewCard(org.springframework.ui.Model model, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes) throws de.hybris.platform.cms2.exceptions.CMSItemNotFoundException Register the card with SAP Digital payment- Parameters:
model-redirectAttributes-- Returns:
- String
- Throws:
de.hybris.platform.cms2.exceptions.CMSItemNotFoundException
-
doSelectPaymentMethod
@RequestMapping(value="/cards/choose", method=GET) public String doSelectPaymentMethod(@RequestParam("selectedPaymentMethodId") 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 String back(org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes) - Returns:
- checkoutstep link for navigating back
-
next
@RequestMapping(value="/cards/next", method=GET) public 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 String enterStep(org.springframework.ui.Model model, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes) throws de.hybris.platform.cms2.exceptions.CMSItemNotFoundException Display the billing and payment page- Returns:
- returns the result for entering the checkout step
- Throws:
de.hybris.platform.cms2.exceptions.CMSItemNotFoundException
-
addBillingAddress
@RequestMapping(value="billing-address/add", method=POST) public String addBillingAddress(org.springframework.ui.Model model, BillingAddressDetailsForm billingAddressDetailsForm, org.springframework.validation.BindingResult bindingResult) throws de.hybris.platform.cms2.exceptions.CMSItemNotFoundException Adds the billing address details to the cart- Parameters:
model-billingAddressDetailsForm-bindingResult-- Returns:
- String
- Throws:
de.hybris.platform.cms2.exceptions.CMSItemNotFoundException
-
setupBillingAddressPage
protected void setupBillingAddressPage(org.springframework.ui.Model model) throws de.hybris.platform.cms2.exceptions.CMSItemNotFoundException - Throws:
de.hybris.platform.cms2.exceptions.CMSItemNotFoundException
-
getBillingAddressValidator
- Returns:
- the billingAddressValidator
-
setBillingAddressValidator
- Parameters:
billingAddressValidator- the billingAddressValidator to set
-
getUserFacade
public de.hybris.platform.commercefacades.user.UserFacade getUserFacade()- Overrides:
getUserFacadein classAbstractPageController- Returns:
- the userFacade
-
setUserFacade
public void setUserFacade(de.hybris.platform.commercefacades.user.UserFacade userFacade) - Parameters:
userFacade- the userFacade to set
-
checkPaymentSubscription
protected boolean checkPaymentSubscription(org.springframework.ui.Model model, @Valid @Valid PaymentDetailsForm paymentDetailsForm, CCPaymentInfoData newPaymentSubscription) -
fillInPaymentData
protected void fillInPaymentData(@Valid @Valid PaymentDetailsForm paymentDetailsForm, CCPaymentInfoData paymentInfoData) -
setupAddPaymentPage
protected void setupAddPaymentPage(org.springframework.ui.Model model) throws de.hybris.platform.cms2.exceptions.CMSItemNotFoundException - Throws:
de.hybris.platform.cms2.exceptions.CMSItemNotFoundException
-
getCheckoutStep
-
getCisSapDigitalPaymentFacade
- Returns:
- the cisSapDigitalPaymentFacade
-
setCisSapDigitalPaymentFacade
- Parameters:
cisSapDigitalPaymentFacade- the cisSapDigitalPaymentFacade to set
-
getSapDigitalPaymentFacade
- Returns:
- the sapDigitalPaymentFacade
-
setSapDigitalPaymentFacade
- Parameters:
sapDigitalPaymentFacade- the sapDigitalPaymentFacade to set
-
getAddressDataUtil
- Returns:
- the addressDataUtil
-
setAddressDataUtil
- Parameters:
addressDataUtil- the addressDataUtil to set
-