Class DefaultCheckoutPaymentMethodService
- java.lang.Object
-
- com.broadleafcommerce.cartoperation.service.payment.DefaultCheckoutPaymentMethodService
-
- All Implemented Interfaces:
CheckoutPaymentMethodService
public class DefaultCheckoutPaymentMethodService extends Object implements CheckoutPaymentMethodService
- Author:
- Marie Standeven (mariestandeven)
-
-
Constructor Summary
Constructors Constructor Description DefaultCheckoutPaymentMethodService(CartOperationCheckoutProperties cartOperationCheckoutProperties)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected List<CheckoutPaymentMethodOption>
filterAvailableCheckoutPaymentMethodOptionsByCart(@NonNull List<CheckoutPaymentMethodOption> checkoutPaymentMethodOptions, @NonNull com.broadleafcommerce.cart.client.domain.Cart cart, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Hook point to filter available checkout payment method options by the cart details.protected List<CheckoutPaymentMethodOption>
filterAvailableCheckoutPaymentMethodOptionsByCustomer(@NonNull List<CheckoutPaymentMethodOption> checkoutPaymentMethodOptions, com.broadleafcommerce.order.common.domain.CustomerRef customerRef, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Hook point to filter available checkout payment method options by the customer details.protected String
getApplicationIdFromContext(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
protected CartOperationCheckoutProperties
getCartOperationCheckoutProperties()
List<CheckoutPaymentMethodOption>
getCheckoutPaymentMethodOptions(@NonNull com.broadleafcommerce.cart.client.domain.Cart cart, com.broadleafcommerce.order.common.domain.CustomerRef customer, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Find the available checkout payment method options for the given cart, customer, and context.protected String
getTenantIdFromContext(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
-
-
-
Constructor Detail
-
DefaultCheckoutPaymentMethodService
public DefaultCheckoutPaymentMethodService(CartOperationCheckoutProperties cartOperationCheckoutProperties)
-
-
Method Detail
-
getCheckoutPaymentMethodOptions
public List<CheckoutPaymentMethodOption> getCheckoutPaymentMethodOptions(@NonNull @NonNull com.broadleafcommerce.cart.client.domain.Cart cart, @Nullable com.broadleafcommerce.order.common.domain.CustomerRef customer, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Description copied from interface:CheckoutPaymentMethodService
Find the available checkout payment method options for the given cart, customer, and context.- Specified by:
getCheckoutPaymentMethodOptions
in interfaceCheckoutPaymentMethodService
- Parameters:
cart
- the current cart in checkoutcustomer
- a reference to the current customer in checkoutcontextInfo
- context information around sandbox and multitenant state- Returns:
- a list of payment method options available in the current checkout context
-
filterAvailableCheckoutPaymentMethodOptionsByCustomer
protected List<CheckoutPaymentMethodOption> filterAvailableCheckoutPaymentMethodOptionsByCustomer(@NonNull @NonNull List<CheckoutPaymentMethodOption> checkoutPaymentMethodOptions, @Nullable com.broadleafcommerce.order.common.domain.CustomerRef customerRef, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Hook point to filter available checkout payment method options by the customer details.- Parameters:
checkoutPaymentMethodOptions
- the list of available checkout payment method optionscustomerRef
- a reference to the current customer in checkoutcontextInfo
- context information around sandbox and multitenant state- Returns:
- the updated list of available payment methods
-
filterAvailableCheckoutPaymentMethodOptionsByCart
protected List<CheckoutPaymentMethodOption> filterAvailableCheckoutPaymentMethodOptionsByCart(@NonNull @NonNull List<CheckoutPaymentMethodOption> checkoutPaymentMethodOptions, @NonNull @NonNull com.broadleafcommerce.cart.client.domain.Cart cart, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Hook point to filter available checkout payment method options by the cart details.- Parameters:
checkoutPaymentMethodOptions
- the list of available checkout payment method optionscart
- the current cart in checkoutcontextInfo
- context information around sandbox and multitenant state- Returns:
- the updated list of available payment methods
-
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)
-
getCartOperationCheckoutProperties
protected CartOperationCheckoutProperties getCartOperationCheckoutProperties()
-
-