Class CheckoutEventsEndpoint

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

@FrameworkRestController @FrameworkMapping("/carts/{cartId}") @DataRouteByKey("cartoperation") public class CheckoutEventsEndpoint extends Object
Endpoints for resending events.

These endpoints are helpful to manually recover from scenarios where a process was completed but encountered an error when sending the corresponding event. For example, if a cart was finalized during the checkout flow but failed to send the checkout completion event, these endpoints can help manually recover.

Author:
Sunny Yu
  • Field Details

  • Constructor Details

    • CheckoutEventsEndpoint

      public CheckoutEventsEndpoint(CheckoutService checkoutService)
  • Method Details

    • resendCheckoutCompletionEvent

      @Policy(permissionRoots="SEND_CHECKOUT_COMPLETION_EVENT") @FrameworkPostMapping("/resend-checkout-completion-event") public org.springframework.http.ResponseEntity<SendCheckoutEventResponse> resendCheckoutCompletionEvent(@PathVariable String cartId, @ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    • resendCheckoutRollbackEvent

      @Policy(permissionRoots="SEND_ROLLBACK_EVENT") @FrameworkPostMapping("/resend-checkout-rollback-event") public org.springframework.http.ResponseEntity<SendCheckoutEventResponse> resendCheckoutRollbackEvent(@PathVariable String cartId, @RequestParam String requestId, @ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    • resendCartAwaitingPaymentResultsEvent

      @Policy(permissionRoots="SEND_CART_AWAITING_PAYMENT_RESULTS_EVENT") @FrameworkPostMapping("/resend-cart-awaiting-payment-result-event") public org.springframework.http.ResponseEntity<SendCheckoutEventResponse> resendCartAwaitingPaymentResultsEvent(@PathVariable String cartId, @ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    • resendCartPendingPaymentFailedEvent

      @Policy(permissionRoots="SEND_CART_PENDING_PAYMENT_FAILED_EVENT") @FrameworkPostMapping("/resend-pending-payment-failed-event") public org.springframework.http.ResponseEntity<SendCheckoutEventResponse> resendCartPendingPaymentFailedEvent(@PathVariable String cartId, @ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    • resendExternalPaymentTransactionCartFinalizationEvent

      @Policy(permissionRoots="SEND_EXTERNAL_PAYMENT_TRANSACTION_CART_FINALIZATION_EVENT") @FrameworkPostMapping("/resend-external-payment-transaction-cart-finalization-event") public org.springframework.http.ResponseEntity<SendCheckoutEventResponse> resendExternalPaymentTransactionCartFinalizationEvent(@PathVariable String cartId, @RequestParam String requestId, @ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    • handleSendEventResponse

      protected org.springframework.http.ResponseEntity<SendCheckoutEventResponse> handleSendEventResponse(SendCheckoutEventResponse response)
    • getCheckoutService

      protected CheckoutService getCheckoutService()