Class ExtendedCartsController
java.lang.Object
de.hybris.platform.acceleratorocc.controllers.v2.ExtendedCartsController
@Controller
@RequestMapping("/{baseSiteId}/users/{userId}/carts")
public class ExtendedCartsController
extends Object
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringbuildMerchantCallbackUrl(boolean extendedMerchantCallback, String baseSiteId, String userId, String cartId) Method build merchant callback url for given parameterscreateConsolidatedPickupLocation(String storeName, String fields) doHandleSopPaymentResponse(javax.servlet.http.HttpServletRequest request, SopPaymentDetailsWsDTO sopPaymentDetails, String fields) getConsolidatedPickupLocations(String fields) getParameterMap(javax.servlet.http.HttpServletRequest request) getSopPaymentRequestDetails(String responseUrl, boolean extendedMerchantCallback, String baseSiteId, String userId, String cartId, String fields) getSopPaymentResponse(String cartId, String fields, javax.servlet.http.HttpServletResponse response) protected CCPaymentInfoDatahandlePaymentSubscriptionResultData(PaymentSubscriptionResultData paymentSubscriptionResultData, org.springframework.validation.Errors errors) Method analyze payment subscription result data.voidremoveSopPaymentResponse(String cartId) protected org.springframework.validation.Errors
-
Constructor Details
-
ExtendedCartsController
public ExtendedCartsController()
-
-
Method Details
-
getConsolidatedPickupLocations
@RequestMapping(value="/{cartId}/consolidate", method=GET) @ResponseBody public PointOfServiceListWsDTO getConsolidatedPickupLocations(@RequestParam(defaultValue="DEFAULT") String fields) -
createConsolidatedPickupLocation
@RequestMapping(value="/{cartId}/consolidate", method=POST) @ResponseBody public CartModificationListWsDTO createConsolidatedPickupLocation(@RequestParam String storeName, @RequestParam(defaultValue="DEFAULT") String fields) throws CommerceCartModificationException -
getSopPaymentRequestDetails
@RequestMapping(value="/{cartId}/payment/sop/request", method=GET) @ResponseBody @Secured({"ROLE_CUSTOMERGROUP","ROLE_GUEST","ROLE_CUSTOMERMANAGERGROUP","ROLE_TRUSTED_CLIENT"}) public PaymentRequestWsDTO getSopPaymentRequestDetails(@RequestParam String responseUrl, @RequestParam(defaultValue="false") boolean extendedMerchantCallback, @PathVariable String baseSiteId, @PathVariable String userId, @PathVariable String cartId, @RequestParam(defaultValue="DEFAULT") String fields) -
buildMerchantCallbackUrl
protected String buildMerchantCallbackUrl(boolean extendedMerchantCallback, String baseSiteId, String userId, String cartId) Method build merchant callback url for given parameters- Parameters:
extendedMerchantCallback- Define which url should be returnedbaseSiteId- Base site identifieruserId- User identifiercartId- Cart identifier- Returns:
- merchant callback url
-
doHandleSopPaymentResponse
@RequestMapping(value="/{cartId}/payment/sop/response", method=POST) @ResponseBody @Secured({"ROLE_CUSTOMERGROUP","ROLE_GUEST","ROLE_CUSTOMERMANAGERGROUP","ROLE_TRUSTED_CLIENT"}) public PaymentDetailsWsDTO doHandleSopPaymentResponse(javax.servlet.http.HttpServletRequest request, SopPaymentDetailsWsDTO sopPaymentDetails, @RequestParam(defaultValue="DEFAULT") String fields) -
handlePaymentSubscriptionResultData
protected CCPaymentInfoData handlePaymentSubscriptionResultData(PaymentSubscriptionResultData paymentSubscriptionResultData, org.springframework.validation.Errors errors) Method analyze payment subscription result data. If create subscription result is success it returns created payment info. Otherwise appropriate exception is thrown.- Parameters:
paymentSubscriptionResultData- Data to analyzeerrors- Object storing validation errors. Can be null - then empty error object will be created- Returns:
- payment info
-
getSopPaymentResponse
@RequestMapping(value="/{cartId}/payment/sop/response", method=GET) @ResponseBody @Secured({"ROLE_CUSTOMERGROUP","ROLE_GUEST","ROLE_CUSTOMERMANAGERGROUP","ROLE_TRUSTED_CLIENT"}) public PaymentDetailsWsDTO getSopPaymentResponse(@PathVariable String cartId, @RequestParam(defaultValue="DEFAULT") String fields, javax.servlet.http.HttpServletResponse response) -
removeSopPaymentResponse
@RequestMapping(value="/{cartId}/payment/sop/response", method=DELETE) @ResponseBody @Secured({"ROLE_CUSTOMERGROUP","ROLE_GUEST","ROLE_CUSTOMERMANAGERGROUP","ROLE_TRUSTED_CLIENT"}) public void removeSopPaymentResponse(@PathVariable String cartId) -
getParameterMap
-
validate
-