Interface CommerceCheckoutService
-
- All Known Implementing Classes:
DefaultB2BCommerceCheckoutService
,DefaultCommerceCheckoutService
public interface CommerceCheckoutService
Service for checkout and place order functionality
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description PaymentTransactionEntryModel
authorizePayment(CommerceCheckoutParameter parameter)
Authorizes the total amount of the cart ifCommerceCheckoutParameter.authorizationAmount
is null otherwise the passed in amout is authorizedPaymentTransactionEntryModel
authorizePayment(CartModel cartModel, java.lang.String securityCode, java.lang.String paymentProvider)
Deprecated.Since 5.2.PaymentTransactionEntryModel
authorizePayment(CartModel cartModel, java.lang.String securityCode, java.lang.String paymentProvider, java.math.BigDecimal amount)
Deprecated.Since 5.2.void
calculateCart(CommerceCheckoutParameter parameter)
Calculates the cartModel if the calculated flag is false.void
calculateCart(CartModel cartModel)
Deprecated.Since 5.2.java.util.List<CountryModel>
getCountries(CountryType countryType)
Get countries.java.lang.String
getPaymentProvider()
Get the payment provider nameCommerceOrderResult
placeOrder(CommerceCheckoutParameter parameter)
Creates an order for the given cartOrderModel
placeOrder(CartModel cartModel)
Deprecated.Since 5.2.OrderModel
placeOrder(CartModel cartModel, SalesApplication salesApplication)
Deprecated.Since 5.2.boolean
removeDeliveryMode(CommerceCheckoutParameter parameter)
Removes delivery mode from cart.boolean
removeDeliveryMode(CartModel cartModel)
Deprecated.Since 5.2.boolean
setDeliveryAddress(CommerceCheckoutParameter parameter)
Sets the given address as delivery address on the cart and also marks the address as delivery address.boolean
setDeliveryAddress(CartModel cartModel, AddressModel addressModel)
Deprecated.Since 5.2.boolean
setDeliveryAddress(CartModel cartModel, AddressModel addressModel, boolean flagAsDeliveryAddress)
Deprecated.Since 5.2.boolean
setDeliveryMode(CommerceCheckoutParameter parameter)
Sets the given delivery mode on the cartboolean
setDeliveryMode(CartModel cartModel, DeliveryModeModel deliveryModeModel)
Deprecated.Since 5.2.boolean
setPaymentInfo(CommerceCheckoutParameter parameter)
Sets the given payment info on the cartboolean
setPaymentInfo(CartModel cartModel, PaymentInfoModel paymentInfoModel)
Deprecated.Since 5.2.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)
void
validateDeliveryMode(CartModel cartModel)
Deprecated.Since 5.2.
-
-
-
Method Detail
-
setDeliveryAddress
@Deprecated(since="5.2") boolean setDeliveryAddress(CartModel cartModel, AddressModel addressModel)
Deprecated.- 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") boolean setDeliveryAddress(CartModel cartModel, AddressModel addressModel, boolean flagAsDeliveryAddress)
Deprecated.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") boolean setDeliveryMode(CartModel cartModel, DeliveryModeModel deliveryModeModel)
Deprecated.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") void validateDeliveryMode(CartModel cartModel)
Deprecated.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") boolean setPaymentInfo(CartModel cartModel, PaymentInfoModel paymentInfoModel)
Deprecated.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") PaymentTransactionEntryModel authorizePayment(CartModel cartModel, java.lang.String securityCode, java.lang.String paymentProvider)
Deprecated.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") PaymentTransactionEntryModel authorizePayment(CartModel cartModel, java.lang.String securityCode, java.lang.String paymentProvider, java.math.BigDecimal amount)
Deprecated.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.authorizationAmount
is 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") OrderModel placeOrder(CartModel cartModel) throws InvalidCartException
Deprecated.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") OrderModel placeOrder(CartModel cartModel, SalesApplication salesApplication) throws InvalidCartException
Deprecated.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") boolean removeDeliveryMode(CartModel cartModel)
Deprecated.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") void calculateCart(CartModel cartModel)
Deprecated.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.
-
-