Skip to content

Commit

Permalink
Merge pull request #511 from Adyen/feature/AD-334c
Browse files Browse the repository at this point in the history
AD-334 Add Apple Pay Express Button with Frontend Logic and API Calls…
  • Loading branch information
pjaneta authored Jan 17, 2025
2 parents a195043 + b5470a2 commit 7a87e29
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
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;
}
}

0 comments on commit 7a87e29

Please sign in to comment.