diff --git a/adyenv6core/resources/adyenv6core-spring.xml b/adyenv6core/resources/adyenv6core-spring.xml index f1e603c1..d4e3d152 100644 --- a/adyenv6core/resources/adyenv6core-spring.xml +++ b/adyenv6core/resources/adyenv6core-spring.xml @@ -237,6 +237,7 @@ + diff --git a/adyenv6core/src/com/adyen/v6/facades/impl/DefaultAdyenCheckoutFacade.java b/adyenv6core/src/com/adyen/v6/facades/impl/DefaultAdyenCheckoutFacade.java index c15773dd..aecbf0ff 100644 --- a/adyenv6core/src/com/adyen/v6/facades/impl/DefaultAdyenCheckoutFacade.java +++ b/adyenv6core/src/com/adyen/v6/facades/impl/DefaultAdyenCheckoutFacade.java @@ -66,6 +66,8 @@ import de.hybris.platform.commercefacades.user.data.AddressData; import de.hybris.platform.commercefacades.user.data.CountryData; import de.hybris.platform.commercefacades.user.data.RegionData; +import de.hybris.platform.commerceservices.order.CommerceCartService; +import de.hybris.platform.commerceservices.service.data.CommerceCartParameter; import de.hybris.platform.commerceservices.strategies.CheckoutCustomerStrategy; import de.hybris.platform.commercewebservicescommons.dto.order.PaymentDetailsWsDTO; import de.hybris.platform.converters.Populator; @@ -165,6 +167,7 @@ public class DefaultAdyenCheckoutFacade implements AdyenCheckoutFacade { private AdyenMerchantAccountStrategy adyenMerchantAccountStrategy; private AdyenOrderFacade adyenOrderFacade; private ProductFacade productFacade; + private CommerceCartService commerceCartService; public static final Logger LOGGER = Logger.getLogger(DefaultAdyenCheckoutFacade.class); @@ -1149,7 +1152,9 @@ protected void removeDeliveryModeFromSessionCart() throws CalculationException { sessionCart.setDeliveryMode(null); modelService.save(sessionCart); - calculationService.recalculate(sessionCart); + CommerceCartParameter commerceCartParameter = new CommerceCartParameter(); + commerceCartParameter.setCart(sessionCart); + commerceCartService.recalculateCart(commerceCartParameter); } } @@ -1975,4 +1980,8 @@ public void setAdyenOrderFacade(AdyenOrderFacade adyenOrderFacade) { public void setProductFacade(ProductFacade productFacade) { this.productFacade = productFacade; } + + public void setCommerceCartService(CommerceCartService commerceCartService) { + this.commerceCartService = commerceCartService; + } }