Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AD-334 Add Apple Pay Express Button with Frontend Logic and API Calls… #511

Merged
merged 1 commit into from
Jan 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions adyenv6core/resources/adyenv6core-spring.xml
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@
<property name="adyenMerchantAccountStrategy" ref="adyenMerchantStrategy"/>
<property name="adyenOrderFacade" ref="adyenOrderFacade"/>
<property name="productFacade" ref="productFacade"/>
<property name="commerceCartService" ref="commerceCartService"/>
</bean>

<alias name="defaultAdyenCheckoutApiFacade" alias="adyenCheckoutApiFacade" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);

Expand Down Expand Up @@ -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);
}
}

Expand Down Expand Up @@ -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;
}
}
Loading