Class DefaultExternalPaymentFulfillmentCallbackService
java.lang.Object
com.broadleafcommerce.cartoperation.service.payment.DefaultExternalPaymentFulfillmentCallbackService
- All Implemented Interfaces:
ExternalPaymentFulfillmentCallbackService
public class DefaultExternalPaymentFulfillmentCallbackService
extends Object
implements ExternalPaymentFulfillmentCallbackService
Default implementation of
ExternalPaymentFulfillmentCallbackService-
Constructor Summary
ConstructorsConstructorDescriptionDefaultExternalPaymentFulfillmentCallbackService(CheckoutService checkoutService, FulfillmentOptionRequestService fulfillmentOptionRequestService, CartOperationService cartOperationService, CartProvider cartProvider, PaymentProvider<PaymentSummary> paymentProvider, com.broadleafcommerce.common.extension.TypeFactory typeFactory) -
Method Summary
Modifier and TypeMethodDescriptionprotected FulfillmentCallbackResponseprotected List<UpdateFulfillmentGroupRequest>buildFulfillmentGroupRequestUpdates(@NonNull PaymentFulfillmentCallbackResponse paymentFulfillmentCallbackResponse, @NonNull com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) protected com.broadleafcommerce.order.common.domain.PricedFulfillmentOptionbuildPricedFulfillmentOption(@NonNull ExternalFulfillmentUpdate externalFulfillmentUpdate, @NonNull com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) protected UpdateFulfillmentGroupRequestbuildUpdateFulfillmentGroupRequest(@NonNull ExternalFulfillmentUpdate externalFulfillmentUpdate, @NonNull com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) protected StringgetApplicationIdFromContext(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) protected CartOperationServiceprotected CartProviderprotected CheckoutServiceprotected FulfillmentOptionRequestServiceprotected PaymentProvider<PaymentSummary>protected StringgetTenantIdFromContext(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) protected com.broadleafcommerce.common.extension.TypeFactoryhandleFulfillmentCallback(@NonNull ExternalFulfillmentCallbackDTO callbackDTO, @NonNull com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Interprets the results of an external payment fulfillment callback, updates the cart fulfillment options & pricing, & communicates the current fulfillment state of the cart via theFulfillmentCallbackResponse.protected com.broadleafcommerce.cart.client.domain.CartsetDefaultFulfillmentOptionsIfNecessary(@NonNull PaymentFulfillmentCallbackResponse paymentFulfillmentCallbackResponse, @NonNull com.broadleafcommerce.fulfillment.common.domain.FulfillmentOptionResponse fulfillmentOptionResponse, @NonNull com.broadleafcommerce.cart.client.domain.Cart cart, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
-
Constructor Details
-
DefaultExternalPaymentFulfillmentCallbackService
public DefaultExternalPaymentFulfillmentCallbackService(CheckoutService checkoutService, FulfillmentOptionRequestService fulfillmentOptionRequestService, CartOperationService cartOperationService, CartProvider cartProvider, PaymentProvider<PaymentSummary> paymentProvider, com.broadleafcommerce.common.extension.TypeFactory typeFactory)
-
-
Method Details
-
handleFulfillmentCallback
public FulfillmentCallbackResponse handleFulfillmentCallback(@NonNull @NonNull ExternalFulfillmentCallbackDTO callbackDTO, @NonNull @NonNull com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from interface:ExternalPaymentFulfillmentCallbackServiceInterprets the results of an external payment fulfillment callback, updates the cart fulfillment options & pricing, & communicates the current fulfillment state of the cart via theFulfillmentCallbackResponse.- Specified by:
handleFulfillmentCallbackin interfaceExternalPaymentFulfillmentCallbackService- Parameters:
callbackDTO- The DTO used to communicate the cart & fulfillment data provided by the callback requestcontextInfo- context information related to multitenancy- Returns:
- a
FulfillmentCallbackResponsecontaining the data to return to the gateway
-
setDefaultFulfillmentOptionsIfNecessary
protected com.broadleafcommerce.cart.client.domain.Cart setDefaultFulfillmentOptionsIfNecessary(@NonNull @NonNull PaymentFulfillmentCallbackResponse paymentFulfillmentCallbackResponse, @NonNull @NonNull com.broadleafcommerce.fulfillment.common.domain.FulfillmentOptionResponse fulfillmentOptionResponse, @NonNull @NonNull com.broadleafcommerce.cart.client.domain.Cart cart, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) -
buildFulfillmentGroupRequestUpdates
protected List<UpdateFulfillmentGroupRequest> buildFulfillmentGroupRequestUpdates(@NonNull @NonNull PaymentFulfillmentCallbackResponse paymentFulfillmentCallbackResponse, @NonNull @NonNull com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) -
buildUpdateFulfillmentGroupRequest
protected UpdateFulfillmentGroupRequest buildUpdateFulfillmentGroupRequest(@NonNull @NonNull ExternalFulfillmentUpdate externalFulfillmentUpdate, @NonNull @NonNull com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) -
buildPricedFulfillmentOption
protected com.broadleafcommerce.order.common.domain.PricedFulfillmentOption buildPricedFulfillmentOption(@NonNull @NonNull ExternalFulfillmentUpdate externalFulfillmentUpdate, @NonNull @NonNull com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) -
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) -
getCheckoutService
-
getFulfillmentOptionRequestService
-
getCartOperationService
-
getCartProvider
-
getPaymentProvider
-
getTypeFactory
protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory()
-