Class ExternalPaymentTransactionCallbackEndpoint

java.lang.Object
com.broadleafcommerce.cartoperation.web.endpoint.ExternalPaymentTransactionCallbackEndpoint

@FrameworkRestController @FrameworkMapping("/checkout/{cartId}/payment-callback/{gatewayType}") @DataRouteByKey("cartoperation") @ConditionalOnProperty(value="broadleaf.payment.legacy-external-payment-pattern-enabled", havingValue="false", matchIfMissing=true) public class ExternalPaymentTransactionCallbackEndpoint extends Object
Author:
Dima Myroniuk (dmyroniuk)
  • Field Details

  • Constructor Details

  • Method Details

    • externalPaymentTransactionCallbackGet

      @FrameworkGetMapping protected org.springframework.web.servlet.ModelAndView externalPaymentTransactionCallbackGet(@PathVariable String cartId, @PathVariable String gatewayType, @RequestParam(required=false) Map<String,String> requestParams, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)
    • externalPaymentTransactionCallbackPost

      @FrameworkPostMapping protected org.springframework.web.servlet.ModelAndView externalPaymentTransactionCallbackPost(@PathVariable String cartId, @PathVariable String gatewayType, @RequestParam(required=false) Map<String,String> requestParams, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)
    • buildCallbackDTO

      protected ExternalPaymentTransactionCallbackDTO buildCallbackDTO(@NonNull @NonNull String cartId, @NonNull @NonNull String gatewayType, @NonNull @NonNull Map<String,Object> requestBody, @NonNull @NonNull Map<String,String> requestParams)
    • buildContextInfo

      protected com.broadleafcommerce.data.tracking.core.context.ContextInfo buildContextInfo(@NonNull @NonNull com.broadleafcommerce.data.tracking.core.type.OperationType operationType, @NonNull @NonNull Map<String,Object> requestBody, @NonNull @NonNull Map<String,String> requestParams)
    • getTenantId

      @Nullable protected String getTenantId(Map<String,Object> requestBody, Map<String,String> requestParams)
    • getApplicationId

      @Nullable protected String getApplicationId(Map<String,Object> requestBody, Map<String,String> requestParams)
    • getRequestBody

      protected Map<String,Object> getRequestBody(@NonNull @NonNull jakarta.servlet.http.HttpServletRequest request)
    • hydrateRedirectAttributes

      protected void hydrateRedirectAttributes(@NonNull @NonNull org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes, @NonNull @NonNull ExternalPaymentTransactionCallbackDTO callbackDTO)
      Hook point to hydrate any additional attributes before redirecting to the frontend.
      Parameters:
      redirectAttributes - The redirect attributes of this request
      callbackDTO - Additional attributes to add to the redirect attributes
    • addValidationErrorRedirectAttribute

      protected void addValidationErrorRedirectAttribute(org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes)
    • getRedirectUrl

      protected String getRedirectUrl(@NonNull @NonNull ExternalPaymentTransactionCallbackDTO callbackDTO, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    • getStorefrontBaseUrl

      protected String getStorefrontBaseUrl(@NonNull @NonNull ExternalPaymentTransactionCallbackDTO callbackDTO, @Nullable String applicationId, @Nullable String tenantId)
    • getRedirectUri

      protected String getRedirectUri(@NonNull @NonNull ExternalPaymentTransactionCallbackDTO callbackDTO, @Nullable String applicationId, @Nullable String tenantId)
    • getApplicationIdFromContext

      @Nullable protected String getApplicationIdFromContext(@Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    • getTenantIdFromContext

      @Nullable protected String getTenantIdFromContext(@Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    • getExternalPaymentTransactionCallbackService

      protected ExternalPaymentTransactionCallbackService getExternalPaymentTransactionCallbackService()
    • getCallbackRedirectionProperties

      protected ExternalPaymentTransactionCallbackRedirectionProperties getCallbackRedirectionProperties()
    • getObjectMapper

      protected com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
    • getTypeFactory

      protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory()