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 AbstractCheckoutStepControllerController 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.CheckoutSteps
-
Nested classes/interfaces inherited from class de.hybris.platform.acceleratorstorefrontcommons.controllers.pages.AbstractCheckoutController
AbstractCheckoutController.SelectOption
-
Nested 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_SUMMARY
-
Fields inherited from class de.hybris.platform.acceleratorstorefrontcommons.controllers.pages.AbstractCheckoutController
REDIRECT_URL_ORDER_CONFIRMATION
-
Fields 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_8
-
Fields inherited from class de.hybris.platform.acceleratorstorefrontcommons.controllers.AbstractController
FORWARD_PREFIX, REDIRECT_PREFIX, ROOT
-
-
Constructor Summary
Constructors Constructor Description SapDigitalPaymentAndBillingMethodCheckoutStepController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringaddBillingAddress(org.springframework.ui.Model model, BillingAddressDetailsForm billingAddressDetailsForm, org.springframework.validation.BindingResult bindingResult)Adds the billing address details to the cartjava.lang.Stringback(org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes)protected booleancheckPaymentSubscription(org.springframework.ui.Model model, @Valid PaymentDetailsForm paymentDetailsForm, CCPaymentInfoData newPaymentSubscription)java.lang.StringdoSelectPaymentMethod(java.lang.String selectedPaymentMethodId)This method gets called when the "Use These Payment Details" button is clicked.java.lang.StringenterStep(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)AddressDataUtilgetAddressDataUtil()BillingAddressValidatorgetBillingAddressValidator()protected CheckoutStepgetCheckoutStep()CisSapDigitalPaymentFacadegetCisSapDigitalPaymentFacade()SapDigitalPaymentFacadegetSapDigitalPaymentFacade()UserFacadegetUserFacade()java.lang.Stringnext(org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes)java.lang.StringregisterNewCard(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(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, setCheckoutStepLinksForModel
-
Methods inherited from class de.hybris.platform.acceleratorstorefrontcommons.controllers.pages.AbstractCheckoutController
getAddressVerificationFacade, getCheckoutCustomerStrategy, getCheckoutFacade, getCheckoutFlowFacade, getDeliveryAddresses, getI18NFacade, isAddressIdChanged, isAddressOnList, redirectToOrderConfirmationPage, validateCart
-
Methods 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, urlEncode
-
Methods inherited from class de.hybris.platform.acceleratorstorefrontcommons.controllers.AbstractController
addRequestToModel, getBean
-
-
-
-
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 CMSItemNotFoundExceptionRegister 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 CMSItemNotFoundExceptionDisplay 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 CMSItemNotFoundExceptionAdds the billing address details to the cart- Parameters:
model-billingAddressDetailsForm-bindingResult-- Returns:
- String
- Throws:
CMSItemNotFoundException
-
setupBillingAddressPage
protected void setupBillingAddressPage(org.springframework.ui.Model model) throws CMSItemNotFoundException- Throws:
CMSItemNotFoundException
-
getBillingAddressValidator
public BillingAddressValidator getBillingAddressValidator()
- Returns:
- the billingAddressValidator
-
setBillingAddressValidator
public void setBillingAddressValidator(BillingAddressValidator billingAddressValidator)
- Parameters:
billingAddressValidator- the billingAddressValidator to set
-
getUserFacade
public UserFacade getUserFacade()
- Overrides:
getUserFacadein classAbstractPageController- Returns:
- the userFacade
-
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)
-
fillInPaymentData
protected void fillInPaymentData(@Valid @Valid PaymentDetailsForm paymentDetailsForm, CCPaymentInfoData paymentInfoData)
-
setupAddPaymentPage
protected void setupAddPaymentPage(org.springframework.ui.Model model) throws CMSItemNotFoundException- Throws:
CMSItemNotFoundException
-
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
-
-