Class CheckoutEventsEndpoint
- java.lang.Object
-
- com.broadleafcommerce.cartoperation.web.endpoint.CheckoutEventsEndpoint
-
@FrameworkRestController @FrameworkMapping("/carts/{cartId}") 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
-
-
Constructor Summary
Constructors Constructor Description CheckoutEventsEndpoint(CheckoutService checkoutService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected CheckoutService
getCheckoutService()
protected org.springframework.http.ResponseEntity<SendCheckoutEventResponse>
handleSendEventResponse(SendCheckoutEventResponse response)
org.springframework.http.ResponseEntity<SendCheckoutEventResponse>
resendCartPendingPaymentFailedEvent(String cartId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
org.springframework.http.ResponseEntity<SendCheckoutEventResponse>
resendCheckoutCompletionEvent(String cartId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
org.springframework.http.ResponseEntity<SendCheckoutEventResponse>
resendCheckoutRollbackEvent(String cartId, String requestId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
-
-
-
Field Detail
-
BASE_URI
public static final String BASE_URI
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CheckoutEventsEndpoint
public CheckoutEventsEndpoint(CheckoutService checkoutService)
-
-
Method Detail
-
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)
-
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)
-
handleSendEventResponse
protected org.springframework.http.ResponseEntity<SendCheckoutEventResponse> handleSendEventResponse(SendCheckoutEventResponse response)
-
getCheckoutService
protected CheckoutService getCheckoutService()
-
-