Interface CommerceCheckoutService
- All Known Implementing Classes:
DefaultB2BCommerceCheckoutService,DefaultCommerceCheckoutService
public interface CommerceCheckoutService
Service for checkout and place order functionality
-
Method Summary
Modifier and TypeMethodDescriptionauthorizePayment(CommerceCheckoutParameter parameter) Authorizes the total amount of the cart ifCommerceCheckoutParameter.authorizationAmountis null otherwise the passed in amout is authorizedauthorizePayment(CartModel cartModel, String securityCode, String paymentProvider) Deprecated, for removal: This API element is subject to removal in a future version.Since 5.2.authorizePayment(CartModel cartModel, String securityCode, String paymentProvider, BigDecimal amount) Deprecated, for removal: This API element is subject to removal in a future version.Since 5.2.voidcalculateCart(CommerceCheckoutParameter parameter) Calculates the cartModel if the calculated flag is false.voidcalculateCart(CartModel cartModel) Deprecated, for removal: This API element is subject to removal in a future version.Since 5.2.getCountries(CountryType countryType) Get countries.Get the payment provider nameplaceOrder(CommerceCheckoutParameter parameter) Creates an order for the given cartplaceOrder(CartModel cartModel) Deprecated, for removal: This API element is subject to removal in a future version.Since 5.2.placeOrder(CartModel cartModel, SalesApplication salesApplication) Deprecated, for removal: This API element is subject to removal in a future version.Since 5.2.booleanremoveDeliveryMode(CommerceCheckoutParameter parameter) Removes delivery mode from cart.booleanremoveDeliveryMode(CartModel cartModel) Deprecated, for removal: This API element is subject to removal in a future version.Since 5.2.booleansetDeliveryAddress(CommerceCheckoutParameter parameter) Sets the given address as delivery address on the cart and also marks the address as delivery address.booleansetDeliveryAddress(CartModel cartModel, AddressModel addressModel) Deprecated, for removal: This API element is subject to removal in a future version.Since 5.2.booleansetDeliveryAddress(CartModel cartModel, AddressModel addressModel, boolean flagAsDeliveryAddress) Deprecated, for removal: This API element is subject to removal in a future version.Since 5.2.booleansetDeliveryMode(CommerceCheckoutParameter parameter) Sets the given delivery mode on the cartbooleansetDeliveryMode(CartModel cartModel, DeliveryModeModel deliveryModeModel) Deprecated, for removal: This API element is subject to removal in a future version.Since 5.2.booleansetPaymentInfo(CommerceCheckoutParameter parameter) Sets the given payment info on the cartbooleansetPaymentInfo(CartModel cartModel, PaymentInfoModel paymentInfoModel) Deprecated, for removal: This API element is subject to removal in a future version.Since 5.2.voidvalidateDeliveryMode(CommerceCheckoutParameter parameter) Validates the current delivery mode on the cart and clears if not valid the cart is then calculated viaCommerceCartCalculationStrategy.calculateCart(de.hybris.platform.core.model.order.CartModel)voidvalidateDeliveryMode(CartModel cartModel) Deprecated, for removal: This API element is subject to removal in a future version.Since 5.2.
-
Method Details
-
setDeliveryAddress
@Deprecated(since="5.2", forRemoval=true) boolean setDeliveryAddress(CartModel cartModel, AddressModel addressModel) Deprecated, for removal: This API element is subject to removal in a future version.- Parameters:
cartModel- the cartaddressModel- the address, a null address will cause the delivery address to be removed from the cart.- Returns:
- true if successful
-
setDeliveryAddress
@Deprecated(since="5.2", forRemoval=true) boolean setDeliveryAddress(CartModel cartModel, AddressModel addressModel, boolean flagAsDeliveryAddress) Deprecated, for removal: This API element is subject to removal in a future version.Since 5.2. UsesetDeliveryAddress(de.hybris.platform.commerceservices.service.data.CommerceCheckoutParameter)instead Sets the given address as delivery address on the cart and also marks the address as delivery address. A null address will cause removal of deliveryAddress from the cart.- Parameters:
cartModel- the cartaddressModel- the address a null address will cause the delivery address to be removed from the cart.flagAsDeliveryAddress- true to mark the given address as delivery address- Returns:
- true if successful
-
setDeliveryAddress
Sets the given address as delivery address on the cart and also marks the address as delivery address. A null address will cause removal of deliveryAddress from the cart.- Parameters:
parameter- A parameter object- Returns:
- true if successful
-
setDeliveryMode
@Deprecated(since="5.2", forRemoval=true) boolean setDeliveryMode(CartModel cartModel, DeliveryModeModel deliveryModeModel) Deprecated, for removal: This API element is subject to removal in a future version.Since 5.2. UsesetDeliveryAddress(de.hybris.platform.commerceservices.service.data.CommerceCheckoutParameter)instead. Sets the given delivery mode on the cart- Parameters:
cartModel- the cartdeliveryModeModel- the delivery mode- Returns:
- true if successful
-
setDeliveryMode
Sets the given delivery mode on the cart- Parameters:
parameter- A parameter object for cart and deliverymode- Returns:
- true if successful
-
validateDeliveryMode
Deprecated, for removal: This API element is subject to removal in a future version.Since 5.2. UsevalidateDeliveryMode(de.hybris.platform.commerceservices.service.data.CommerceCheckoutParameter)instead Validates the current delivery mode on the cart and clears if not valid the cart is then calculated viaCommerceCartCalculationStrategy.calculateCart(de.hybris.platform.core.model.order.CartModel)- Parameters:
cartModel- the cart
-
validateDeliveryMode
Validates the current delivery mode on the cart and clears if not valid the cart is then calculated viaCommerceCartCalculationStrategy.calculateCart(de.hybris.platform.core.model.order.CartModel)- Parameters:
parameter- The parameter object holding the cart
-
setPaymentInfo
@Deprecated(since="5.2", forRemoval=true) boolean setPaymentInfo(CartModel cartModel, PaymentInfoModel paymentInfoModel) Deprecated, for removal: This API element is subject to removal in a future version.Since 5.2. UsesetPaymentInfo(de.hybris.platform.commerceservices.service.data.CommerceCheckoutParameter)instead. Sets the given payment info on the cart- Parameters:
cartModel- the cartpaymentInfoModel- the payment details- Returns:
- true if successful
-
setPaymentInfo
Sets the given payment info on the cart- Parameters:
parameter- A parameter object for cart and payment details- Returns:
- true if successful
-
authorizePayment
@Deprecated(since="5.2", forRemoval=true) PaymentTransactionEntryModel authorizePayment(CartModel cartModel, String securityCode, String paymentProvider) Deprecated, for removal: This API element is subject to removal in a future version.Since 5.2. UseauthorizePayment(de.hybris.platform.commerceservices.service.data.CommerceCheckoutParameter)Authorizes the total amount of the cart- Parameters:
cartModel- the cartsecurityCode- the cv2 numberpaymentProvider- the payment provider that will be used to authorize- Returns:
- the payment transaction entry
-
authorizePayment
@Deprecated(since="5.2", forRemoval=true) PaymentTransactionEntryModel authorizePayment(CartModel cartModel, String securityCode, String paymentProvider, BigDecimal amount) Deprecated, for removal: This API element is subject to removal in a future version.Since 5.2. UseauthorizePayment(de.hybris.platform.commerceservices.service.data.CommerceCheckoutParameter)Authorizes specified amount- Parameters:
cartModel- the cartsecurityCode- the cv2 numberpaymentProvider- the payment provider that will be used to authorizeamount- the amount to authorize- Returns:
- the payment transaction entry
-
authorizePayment
Authorizes the total amount of the cart ifCommerceCheckoutParameter.authorizationAmountis null otherwise the passed in amout is authorized- Parameters:
parameter- A parameter object holding the cart, security code, payment provider and optionaly authorization amount.- Returns:
- A payment transaction entry.
-
placeOrder
@Deprecated(since="5.2", forRemoval=true) OrderModel placeOrder(CartModel cartModel) throws InvalidCartException Deprecated, for removal: This API element is subject to removal in a future version.Since 5.2. UseplaceOrder(de.hybris.platform.commerceservices.service.data.CommerceCheckoutParameter)instead Creates an order for the given cart- Parameters:
cartModel- the cart- Returns:
- the order that has been created
- Throws:
InvalidCartException- if the order cannot be placed
-
placeOrder
@Deprecated(since="5.2", forRemoval=true) OrderModel placeOrder(CartModel cartModel, SalesApplication salesApplication) throws InvalidCartException Deprecated, for removal: This API element is subject to removal in a future version.Since 5.2. Creates an order for the given cart- Parameters:
cartModel- the cartsalesApplication- the sales application that placed the order- Returns:
- the order that has been created
- Throws:
InvalidCartException- if the order cannot be placed
-
placeOrder
Creates an order for the given cart- Parameters:
parameter-- Returns:
- the order that has been created
- Throws:
InvalidCartException- if the order cannot be placed
-
getPaymentProvider
String getPaymentProvider()Get the payment provider name- Returns:
- the payment provider
-
removeDeliveryMode
Deprecated, for removal: This API element is subject to removal in a future version.Since 5.2. UseremoveDeliveryMode(de.hybris.platform.commerceservices.service.data.CommerceCheckoutParameter)instead Removes delivery mode from cart. the cart is then calculated viaCommerceCartCalculationStrategy.calculateCart(de.hybris.platform.core.model.order.CartModel)- Parameters:
cartModel- the cart- Returns:
- true if the deliver mode is removed
-
removeDeliveryMode
Removes delivery mode from cart. the cart is then calculated viaCommerceCartCalculationStrategy.calculateCart(de.hybris.platform.core.model.order.CartModel)- Parameters:
parameter- A parameter object holding the cart- Returns:
- true if success
-
calculateCart
Deprecated, for removal: This API element is subject to removal in a future version.Since 5.2. UsecalculateCart(de.hybris.platform.commerceservices.service.data.CommerceCheckoutParameter)instead. Calculates the cartModel if the calculated flag is false.- Parameters:
cartModel- The current user's cartModel
-
calculateCart
Calculates the cartModel if the calculated flag is false.- Parameters:
parameter- The parameter object for the current user's cartModel
-
getCountries
Get countries.- Parameters:
countryType- If the value of type equals to shipping, then return shipping countries. If the value of type equals to billing, then return billing countries. If the value of type is not given, return all countries.- Returns:
- list of countries.
-