Interface CommerceCheckoutService
-
- All Known Implementing Classes:
DefaultB2BCommerceCheckoutService,DefaultCommerceCheckoutService
public interface CommerceCheckoutServiceService for checkout and place order functionality
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description PaymentTransactionEntryModelauthorizePayment(CommerceCheckoutParameter parameter)Authorizes the total amount of the cart ifCommerceCheckoutParameter.authorizationAmountis null otherwise the passed in amout is authorizedPaymentTransactionEntryModelauthorizePayment(CartModel cartModel, java.lang.String securityCode, java.lang.String paymentProvider)Deprecated, for removal: This API element is subject to removal in a future version.Since 5.2.PaymentTransactionEntryModelauthorizePayment(CartModel cartModel, java.lang.String securityCode, java.lang.String paymentProvider, java.math.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.java.util.List<CountryModel>getCountries(CountryType countryType)Get countries.java.lang.StringgetPaymentProvider()Get the payment provider nameCommerceOrderResultplaceOrder(CommerceCheckoutParameter parameter)Creates an order for the given cartOrderModelplaceOrder(CartModel cartModel)Deprecated, for removal: This API element is subject to removal in a future version.Since 5.2.OrderModelplaceOrder(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 Detail
-
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
boolean setDeliveryAddress(CommerceCheckoutParameter parameter)
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
boolean setDeliveryMode(CommerceCheckoutParameter parameter)
Sets the given delivery mode on the cart- Parameters:
parameter- A parameter object for cart and deliverymode- Returns:
- true if successful
-
validateDeliveryMode
@Deprecated(since="5.2", forRemoval=true) void validateDeliveryMode(CartModel cartModel)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
void validateDeliveryMode(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)- 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
boolean setPaymentInfo(CommerceCheckoutParameter parameter)
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, java.lang.String securityCode, java.lang.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, java.lang.String securityCode, java.lang.String paymentProvider, java.math.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
PaymentTransactionEntryModel authorizePayment(CommerceCheckoutParameter parameter)
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 InvalidCartExceptionDeprecated, 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 InvalidCartExceptionDeprecated, 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
CommerceOrderResult placeOrder(CommerceCheckoutParameter parameter) throws InvalidCartException
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
java.lang.String getPaymentProvider()
Get the payment provider name- Returns:
- the payment provider
-
removeDeliveryMode
@Deprecated(since="5.2", forRemoval=true) boolean removeDeliveryMode(CartModel cartModel)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
boolean removeDeliveryMode(CommerceCheckoutParameter parameter)
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(since="5.2", forRemoval=true) void calculateCart(CartModel cartModel)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
void calculateCart(CommerceCheckoutParameter parameter)
Calculates the cartModel if the calculated flag is false.- Parameters:
parameter- The parameter object for the current user's cartModel
-
getCountries
java.util.List<CountryModel> getCountries(CountryType countryType)
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.
-
-