diff --git a/adyenocc/buildcallbacks.xml b/adyenocc/buildcallbacks.xml
new file mode 100644
index 00000000..ebef3495
--- /dev/null
+++ b/adyenocc/buildcallbacks.xml
@@ -0,0 +1,79 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/adyenocc/extensioninfo.xml b/adyenocc/extensioninfo.xml
new file mode 100644
index 00000000..d3fb52ea
--- /dev/null
+++ b/adyenocc/extensioninfo.xml
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/adyenocc/external-dependencies.xml b/adyenocc/external-dependencies.xml
new file mode 100644
index 00000000..08582f91
--- /dev/null
+++ b/adyenocc/external-dependencies.xml
@@ -0,0 +1,11 @@
+
+
+ 4.0.0
+ de.hybris.platform
+ adyenocc
+ 2211.3
+ jar
+
diff --git a/adyenocc/project.properties b/adyenocc/project.properties
new file mode 100644
index 00000000..1c6affe8
--- /dev/null
+++ b/adyenocc/project.properties
@@ -0,0 +1,14 @@
+# ---------------------------------------------------------------------------
+# Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved.
+# ---------------------------------------------------------------------------
+# you can put key/value pairs here.
+# Use Config.getParameter(..) to retrieve the values during runtime.
+
+adyenocc.key=value
+
+# Specifies the location of the spring context file added automatically to the global platform application context.
+adyenocc.application-context=adyenocc-spring.xml
+
+#Use for generating static swagger documentation
+adyenocc.documentation.static.generate=true
+ext.adyenocc.extension.webmodule.webroot=/occ/v2
diff --git a/adyenocc/resources/adyenocc-beans.xml b/adyenocc/resources/adyenocc-beans.xml
new file mode 100644
index 00000000..6305b0d3
--- /dev/null
+++ b/adyenocc/resources/adyenocc-beans.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
diff --git a/adyenocc/resources/adyenocc-items.xml b/adyenocc/resources/adyenocc-items.xml
new file mode 100644
index 00000000..920e5576
--- /dev/null
+++ b/adyenocc/resources/adyenocc-items.xml
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/adyenocc/resources/adyenocc-spring.xml b/adyenocc/resources/adyenocc-spring.xml
new file mode 100644
index 00000000..cbde3381
--- /dev/null
+++ b/adyenocc/resources/adyenocc-spring.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
diff --git a/adyenocc/resources/adyenocc.build.number b/adyenocc/resources/adyenocc.build.number
new file mode 100644
index 00000000..bf4c3718
--- /dev/null
+++ b/adyenocc/resources/adyenocc.build.number
@@ -0,0 +1,11 @@
+#Ant properties
+#Wed Feb 08 03:32:01 CET 2023
+version.api=2211
+vendor=hybris
+group.id=de.hybris.platform
+name=adyenocc
+description=adyenocc
+builddate=20230208 0330
+releasedate=20221109 1322
+version=2211.3
+module.name=platform-module
diff --git a/adyenocc/resources/localization/adyenocc-locales_de.properties b/adyenocc/resources/localization/adyenocc-locales_de.properties
new file mode 100644
index 00000000..9f83f9b4
--- /dev/null
+++ b/adyenocc/resources/localization/adyenocc-locales_de.properties
@@ -0,0 +1,22 @@
+# ---------------------------------------------------------------------------
+# Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved.
+# ---------------------------------------------------------------------------
+# put localizations of item types into this file
+# Note that you can also add special locatizations which
+# can be retrieved with the
+#
+# ...tools.localization.Localization.getLocalizedString(...)
+#
+# methods.
+#
+# syntax for type localizations:
+#
+# type..name=XY
+# type...name=XY
+# type..description=XY
+# type...description=XY
+#
+# yourcustomlocalekey=value
+
+#NOTR
+Dummy=Dummy
diff --git a/adyenocc/resources/localization/adyenocc-locales_en.properties b/adyenocc/resources/localization/adyenocc-locales_en.properties
new file mode 100644
index 00000000..9f83f9b4
--- /dev/null
+++ b/adyenocc/resources/localization/adyenocc-locales_en.properties
@@ -0,0 +1,22 @@
+# ---------------------------------------------------------------------------
+# Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved.
+# ---------------------------------------------------------------------------
+# put localizations of item types into this file
+# Note that you can also add special locatizations which
+# can be retrieved with the
+#
+# ...tools.localization.Localization.getLocalizedString(...)
+#
+# methods.
+#
+# syntax for type localizations:
+#
+# type..name=XY
+# type...name=XY
+# type..description=XY
+# type...description=XY
+#
+# yourcustomlocalekey=value
+
+#NOTR
+Dummy=Dummy
diff --git a/adyenocc/resources/occ/v2/adyenocc/messages/base_de.properties b/adyenocc/resources/occ/v2/adyenocc/messages/base_de.properties
new file mode 100644
index 00000000..8c28d726
--- /dev/null
+++ b/adyenocc/resources/occ/v2/adyenocc/messages/base_de.properties
@@ -0,0 +1,8 @@
+# ---------------------------------------------------------------------------
+# Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved.
+# ---------------------------------------------------------------------------
+# put localizations or messages used in your web application into this file
+#
+
+#NOTR
+Dummy=Dummy
diff --git a/adyenocc/resources/occ/v2/adyenocc/messages/base_en.properties b/adyenocc/resources/occ/v2/adyenocc/messages/base_en.properties
new file mode 100644
index 00000000..8c28d726
--- /dev/null
+++ b/adyenocc/resources/occ/v2/adyenocc/messages/base_en.properties
@@ -0,0 +1,8 @@
+# ---------------------------------------------------------------------------
+# Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved.
+# ---------------------------------------------------------------------------
+# put localizations or messages used in your web application into this file
+#
+
+#NOTR
+Dummy=Dummy
diff --git a/adyenocc/resources/occ/v2/adyenocc/web/spring/adyenocc-web-spring.xml b/adyenocc/resources/occ/v2/adyenocc/web/spring/adyenocc-web-spring.xml
new file mode 100644
index 00000000..733bae4e
--- /dev/null
+++ b/adyenocc/resources/occ/v2/adyenocc/web/spring/adyenocc-web-spring.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
diff --git a/adyenocc/src/com/adyen/commerce/constants/AdyenoccConstants.java b/adyenocc/src/com/adyen/commerce/constants/AdyenoccConstants.java
new file mode 100644
index 00000000..324445b5
--- /dev/null
+++ b/adyenocc/src/com/adyen/commerce/constants/AdyenoccConstants.java
@@ -0,0 +1,17 @@
+/*
+ * Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved.
+ */
+package com.adyen.commerce.constants;
+
+public class AdyenoccConstants extends GeneratedAdyenoccConstants
+{
+ public static final String EXTENSIONNAME = "adyenocc";
+ public static final String ADYEN_USER_CART_PREFIX = "/{baseSiteId}/users/{userId}/carts/{cartId}/adyen";
+ public static final String ADYEN_USER_PREFIX = "/{baseSiteId}/users/{userId}/adyen";
+
+ private AdyenoccConstants()
+ {
+ //empty
+ }
+}
+
diff --git a/adyenocc/src/com/adyen/commerce/controllers/PaymentMethodsController.java b/adyenocc/src/com/adyen/commerce/controllers/PaymentMethodsController.java
new file mode 100644
index 00000000..b44d974a
--- /dev/null
+++ b/adyenocc/src/com/adyen/commerce/controllers/PaymentMethodsController.java
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved.
+ */
+package com.adyen.commerce.controllers;
+
+import com.adyen.commerce.constants.AdyenoccConstants;
+import com.adyen.service.exception.ApiException;
+import com.adyen.v6.dto.CheckoutConfigDTO;
+import com.adyen.v6.facades.AdyenCheckoutFacade;
+import de.hybris.platform.commerceservices.request.mapping.annotation.ApiVersion;
+import de.hybris.platform.webservicescommons.swagger.ApiBaseSiteIdUserIdAndCartIdParam;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+
+@Controller
+@RequestMapping(value = AdyenoccConstants.ADYEN_USER_CART_PREFIX)
+@ApiVersion("v2")
+@Tag(name = "Adyen")
+public class PaymentMethodsController
+{
+ @Autowired
+ private AdyenCheckoutFacade adyenCheckoutFacade;
+
+ @GetMapping(value = "/checkout-configuration")
+ @Operation(operationId = "getCheckoutConfiguration", summary = "Get checkout configuration", description =
+ "Returns configuration for Adyen dropin component")
+ @ApiBaseSiteIdUserIdAndCartIdParam
+ public ResponseEntity getCheckoutConfiguration() throws ApiException {
+ return ResponseEntity.ok().body(adyenCheckoutFacade.getReactCheckoutConfig());
+ }
+}
diff --git a/adyenocc/src/com/adyen/commerce/exception/AdyenOCCControllerException.java b/adyenocc/src/com/adyen/commerce/exception/AdyenOCCControllerException.java
new file mode 100644
index 00000000..bbd7e63a
--- /dev/null
+++ b/adyenocc/src/com/adyen/commerce/exception/AdyenOCCControllerException.java
@@ -0,0 +1,4 @@
+package com.adyen.commerce.exception;
+
+public class AdyenOCCControllerException extends RuntimeException {
+}
diff --git a/adyenocc/src/com/adyen/commerce/exceptionhandler/AdyenOCCControllerExceptionHandler.java b/adyenocc/src/com/adyen/commerce/exceptionhandler/AdyenOCCControllerExceptionHandler.java
new file mode 100644
index 00000000..1a16f6da
--- /dev/null
+++ b/adyenocc/src/com/adyen/commerce/exceptionhandler/AdyenOCCControllerExceptionHandler.java
@@ -0,0 +1,15 @@
+package com.adyen.commerce.exceptionhandler;
+
+import com.adyen.commerce.exception.AdyenOCCControllerException;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.ControllerAdvice;
+import org.springframework.web.bind.annotation.ExceptionHandler;
+
+@ControllerAdvice
+public class AdyenOCCControllerExceptionHandler {
+
+ @ExceptionHandler(value = AdyenOCCControllerException.class)
+ public ResponseEntity handleAdyenControllerException(AdyenOCCControllerException exception) {
+ return ResponseEntity.badRequest().build();
+ }
+}
\ No newline at end of file
diff --git a/adyenv6b2ccheckoutaddon/acceleratoraddon/web/webroot/WEB-INF/views/responsive/pages/checkout/multi/selectPaymentMethodPage.jsp b/adyenv6b2ccheckoutaddon/acceleratoraddon/web/webroot/WEB-INF/views/responsive/pages/checkout/multi/selectPaymentMethodPage.jsp
index 14e1f7dd..8025ed05 100644
--- a/adyenv6b2ccheckoutaddon/acceleratoraddon/web/webroot/WEB-INF/views/responsive/pages/checkout/multi/selectPaymentMethodPage.jsp
+++ b/adyenv6b2ccheckoutaddon/acceleratoraddon/web/webroot/WEB-INF/views/responsive/pages/checkout/multi/selectPaymentMethodPage.jsp
@@ -26,7 +26,7 @@
//Set the allowed cards
const allowedCards = [];
- allowedCards.push("${allowedCard.code}");
+ allowedCards.push("${allowedCard}");
const initConfig = {
diff --git a/adyenv6core/src/com/adyen/v6/dto/CheckoutConfigDTO.java b/adyenv6core/src/com/adyen/v6/dto/CheckoutConfigDTO.java
index 6c7b0620..852d013b 100644
--- a/adyenv6core/src/com/adyen/v6/dto/CheckoutConfigDTO.java
+++ b/adyenv6core/src/com/adyen/v6/dto/CheckoutConfigDTO.java
@@ -20,7 +20,7 @@ public class CheckoutConfigDTO {
@Deprecated
private String creditCardLabel;
@Deprecated
- private List allowedCards;
+ private List allowedCards;
private Amount amount;
private String adyenClientKey;
private String adyenPaypalMerchantId;
@@ -82,11 +82,11 @@ public void setCreditCardLabel(String creditCardLabel) {
this.creditCardLabel = creditCardLabel;
}
- public List getAllowedCards() {
+ public List getAllowedCards() {
return allowedCards;
}
- public void setAllowedCards(List allowedCards) {
+ public void setAllowedCards(List allowedCards) {
this.allowedCards = allowedCards;
}
diff --git a/adyenv6core/src/com/adyen/v6/dto/CheckoutConfigDTOBuilder.java b/adyenv6core/src/com/adyen/v6/dto/CheckoutConfigDTOBuilder.java
index 35211bdc..a6fe1710 100644
--- a/adyenv6core/src/com/adyen/v6/dto/CheckoutConfigDTOBuilder.java
+++ b/adyenv6core/src/com/adyen/v6/dto/CheckoutConfigDTOBuilder.java
@@ -14,7 +14,7 @@ public class CheckoutConfigDTOBuilder {
private final CheckoutConfigDTO checkoutConfigDTO;
- public CheckoutConfigDTOBuilder(){
+ public CheckoutConfigDTOBuilder() {
checkoutConfigDTO = new CheckoutConfigDTO();
}
@@ -49,7 +49,8 @@ public CheckoutConfigDTOBuilder setCreditCardLabel(String creditCardLabel) {
}
public CheckoutConfigDTOBuilder setAllowedCards(List allowedCards) {
- checkoutConfigDTO.setAllowedCards(allowedCards);
+ List mappedAllowedCards = allowedCards.stream().map(AdyenCardTypeEnum::toString).toList();
+ checkoutConfigDTO.setAllowedCards(mappedAllowedCards);
return this;
}