Class PaymentMethodCheckoutStepController
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.storefront.controllers.pages.checkout.steps.PaymentMethodCheckoutStepController
- All Implemented Interfaces:
CheckoutStepController
- Direct Known Subclasses:
HopPaymentResponseController,SopPaymentResponseController
@Controller
@RequestMapping("/checkout/multi/payment-method")
public class PaymentMethodCheckoutStepController
extends AbstractCheckoutStepController
The type Payment method checkout step controller.
-
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
FieldsModifier and TypeFieldDescriptionFields 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 TypeMethodDescriptionadd(org.springframework.ui.Model model, @Valid PaymentDetailsForm paymentDetailsForm, org.springframework.validation.BindingResult bindingResult) back(org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes) protected SelectPaymentOptionResponseDatabuildResponseData(boolean valid, String error) protected CardTypeDatacreateCardTypeData(String code, String name) protected StringdefinePaymentAction(PriceData totalToPay) Checks the toPay value to define if user needs to pay or be refundeddoSelectPaymentMethod(String selectedPaymentMethodId, org.springframework.web.servlet.mvc.support.RedirectAttributes model) 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) Swapping the parameter order might break the validation aspect from working.protected BookingFacadeprotected CheckoutStepprotected de.hybris.platform.enumeration.EnumerationServiceprotected List<AbstractCheckoutController.SelectOption>protected ReservationFacadede.hybris.platform.servicelayer.session.SessionServiceprotected Collection<CardTypeData>protected TravelCartFacadeinitCheck(org.springframework.ui.Model model, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectModel, String pci) isPaymentOptionSelected(org.springframework.ui.Model model) next(org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes) protected StringplaceOrder(org.springframework.ui.Model model) Skips the payment part of order process to place order in case there was nothing to pay or refund in amendment journeyprotected StringredirectToOrderConfirmationPage(OrderData orderData) protected StringCreates a refund transaction to demonstrate refund process for the orderremove(String paymentMethodId, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes) voidsetBookingFacade(BookingFacade bookingFacade) voidsetEnumerationService(de.hybris.platform.enumeration.EnumerationService enumerationService) protected voidsetModelWithCartVouchers(org.springframework.ui.Model model) Method to retrieve and set all the applied cart vouchers in the model.voidsetReservationFacade(ReservationFacade reservationFacade) voidsetSessionService(de.hybris.platform.servicelayer.session.SessionService sessionService) voidsetTravelCartFacade(TravelCartFacade travelCartFacade) protected voidsetupAddPaymentPage(org.springframework.ui.Model model) protected voidsetupSilentOrderPostPage(SopPaymentDetailsForm sopPaymentDetailsForm, org.springframework.ui.Model model) 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, 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, getSiteConfigService, getSiteName, getSiteUid, getStoreSessionFacade, getUser, getUserFacade, getViewForPage, getViewForPage, prepareNotFoundPage, setUpMetaData, setUpMetaDataForContentPage, storeCmsPageInModel, storeContentPageTitleInModel, storeContinueUrl, urlEncodeMethods inherited from class de.hybris.platform.acceleratorstorefrontcommons.controllers.AbstractController
addRequestToModel, getBean
-
Field Details
-
CYBERSOURCE_SOP_CARD_TYPES
-
-
Constructor Details
-
PaymentMethodCheckoutStepController
public PaymentMethodCheckoutStepController()
-
-
Method Details
-
getBillingCountries
-
getCardTypes
-
getMonths
-
getStartYears
-
getExpiryYears
@ModelAttribute("expiryYears") public List<AbstractCheckoutController.SelectOption> getExpiryYears() -
initCheck
@RequestMapping(value="/select-flow", method=GET) public String initCheck(org.springframework.ui.Model model, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectModel, @RequestParam(value="pci",required=false) String pci) throws de.hybris.platform.commerceservices.order.CommerceCartModificationException - Throws:
de.hybris.platform.commerceservices.order.CommerceCartModificationException
-
enterStep
@RequestMapping(value="/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 Description copied from interface:CheckoutStepControllerSwapping the parameter order might break the validation aspect from working.- Returns:
- returns the result for entering the checkout step
- Throws:
de.hybris.platform.cms2.exceptions.CMSItemNotFoundException
-
add
@RequestMapping(value="/add", method=POST) public String add(org.springframework.ui.Model model, @Valid @Valid PaymentDetailsForm paymentDetailsForm, org.springframework.validation.BindingResult bindingResult) throws de.hybris.platform.cms2.exceptions.CMSItemNotFoundException - Throws:
de.hybris.platform.cms2.exceptions.CMSItemNotFoundException
-
remove
@RequestMapping(value="/remove", method=POST) public String remove(@RequestParam("paymentInfoId") String paymentMethodId, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes) throws de.hybris.platform.cms2.exceptions.CMSItemNotFoundException - Throws:
de.hybris.platform.cms2.exceptions.CMSItemNotFoundException
-
doSelectPaymentMethod
@RequestMapping(value="/choose", method=GET) public String doSelectPaymentMethod(@RequestParam("selectedPaymentMethodId") String selectedPaymentMethodId, org.springframework.web.servlet.mvc.support.RedirectAttributes model) 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="/back", method=GET) public String back(org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes) - Returns:
- checkoutstep link for navigating back
-
next
@RequestMapping(value="/next", method=GET) public String next(org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes) - Returns:
- checkoutstep link for navigating next
-
isPaymentOptionSelected
@RequestMapping(value="/check-payment-options", method=GET, produces="application/json") @ResponseBody public SelectPaymentOptionResponseData isPaymentOptionSelected(org.springframework.ui.Model model) -
buildResponseData
-
createCardTypeData
-
getReservationCode
-
setupAddPaymentPage
protected void setupAddPaymentPage(org.springframework.ui.Model model) throws de.hybris.platform.cms2.exceptions.CMSItemNotFoundException - Throws:
de.hybris.platform.cms2.exceptions.CMSItemNotFoundException
-
setupSilentOrderPostPage
protected void setupSilentOrderPostPage(SopPaymentDetailsForm sopPaymentDetailsForm, org.springframework.ui.Model model) -
refund
Creates a refund transaction to demonstrate refund process for the order- Parameters:
model-totalToPay- - for refund it will be a negative value stating how much should be refunded to customer- Returns:
- booking confirmation if refund was successful, payment details with errors otherwise
-
placeOrder
Skips the payment part of order process to place order in case there was nothing to pay or refund in amendment journey- Parameters:
model-- Returns:
- booking confirmation if placing order was successful, payment details with errors otherwise
-
redirectToOrderConfirmationPage
- Overrides:
redirectToOrderConfirmationPagein classAbstractCheckoutController
-
definePaymentAction
Checks the toPay value to define if user needs to pay or be refunded- Parameters:
totalToPay-- Returns:
- PAY, NO_ACTION or REFUND
-
setModelWithCartVouchers
protected void setModelWithCartVouchers(org.springframework.ui.Model model) Method to retrieve and set all the applied cart vouchers in the model.- Parameters:
model-
-
getSopCardTypes
-
getCheckoutStep
-
getEnumerationService
protected de.hybris.platform.enumeration.EnumerationService getEnumerationService()- Returns:
- the enumerationService
-
setEnumerationService
public void setEnumerationService(de.hybris.platform.enumeration.EnumerationService enumerationService) - Parameters:
enumerationService- the enumerationService to set
-
getTravelCartFacade
- Returns:
- the travelCartFacade
-
setTravelCartFacade
- Parameters:
travelCartFacade- the travelCartFacade to set
-
getReservationFacade
- Returns:
- the reservationFacade
-
setReservationFacade
- Parameters:
reservationFacade- the reservationFacade to set
-
getSessionService
public de.hybris.platform.servicelayer.session.SessionService getSessionService()- Overrides:
getSessionServicein classAbstractPageController- Returns:
- the sessionService
-
setSessionService
public void setSessionService(de.hybris.platform.servicelayer.session.SessionService sessionService) - Parameters:
sessionService- the sessionService to set
-
getBookingFacade
- Returns:
- the bookingFacade
-
setBookingFacade
- Parameters:
bookingFacade- the bookingFacade to set
-