Skip to content

Commit

Permalink
Merge pull request #318 from Adyen/feature/AD-20
Browse files Browse the repository at this point in the history
Feature/ad 20
  • Loading branch information
kpieloch authored Oct 10, 2023
2 parents cfff02e + fa18d69 commit cf077a0
Show file tree
Hide file tree
Showing 29 changed files with 718 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@
*/extensioninfo.xsd
**/gensrc/
**/*.class
**/.classpath
**/.settings/
**/.externalToolBuilders/
2 changes: 1 addition & 1 deletion adyenv6b2ccheckoutaddon/project.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#Wed, 28 Jun 2023 14:11:09 +0200
#Fri, 15 Sep 2023 08:42:28 +0200
# -----------------------------------------------------------------------
# [y] hybris Platform
#
Expand Down
5 changes: 5 additions & 0 deletions adyenv6core/external-dependencies.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,10 @@
<artifactId>json</artifactId>
<version>20220924</version>
</dependency>
<dependency>
<groupId>com.adyen</groupId>
<artifactId>adyen-java-api-library</artifactId>
<version>18.1.3</version>
</dependency>
</dependencies>
</project>
3 changes: 2 additions & 1 deletion adyenv6core/resources/adyenv6core-spring.xml
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@
<constructor-arg name="adyenPaymentMethodDetailsBuilderExecutor" ref="adyenPaymentMethodDetailsStrategyExecutorImpl" />
</bean>

<bean id="adyenPaymentServiceFactory" class="com.adyen.v6.factory.AdyenPaymentServiceFactory">
<alias name="defaultAdyenPaymentServiceFactory" alias="adyenPaymentServiceFactory" />
<bean id="defaultAdyenPaymentServiceFactory" class="com.adyen.v6.factory.AdyenPaymentServiceFactory">
<constructor-arg name="adyenRequestFactory" ref="adyenRequestFactory"/>
</bean>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,8 @@ public AdyenPaymentService createFromBaseStore(final BaseStoreModel baseStoreMod
adyenPaymentService.setAdyenRequestFactory(adyenRequestFactory);
return adyenPaymentService;
}

public AdyenRequestFactory getAdyenRequestFactory() {
return adyenRequestFactory;
}
}
4 changes: 2 additions & 2 deletions adyenv6core/src/com/adyen/v6/factory/AdyenRequestFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ protected PaymentsRequest enhanceForThreeDS2(final PaymentsRequest paymentsReque
return paymentsRequest;
}

private void updateApplicationInfoEcom(final ApplicationInfo applicationInfo) {
protected void updateApplicationInfoEcom(final ApplicationInfo applicationInfo) {
final CommonField version = new CommonField().name(PLUGIN_NAME).version(PLUGIN_VERSION);

ExternalPlatform externalPlatform = new ExternalPlatform();
Expand Down Expand Up @@ -499,7 +499,7 @@ public TerminalAPIRequest createTerminalAPIRequest(final CartData cartData, Cust
/**
* Set Address Data into API
*/
private Address setAddressData(AddressData addressData) {
protected Address setAddressData(AddressData addressData) {
if (addressData == null) {
LOG.warn("Null address data");
return null;
Expand Down
99 changes: 99 additions & 0 deletions adyenv6subscription/buildcallbacks.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--
Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved.
--><!--
All hybris buildcallbacks.xml macrodefinitions:
Build/Documentation
before/after ant macro "clean"
<macrodef name="adyenv6subscription_before_clean"/>
<macrodef name="adyenv6subscription_after_clean"/>
before/after ant macro "build"
<macrodef name="adyenv6subscription_before_build"/>
<macrodef name="adyenv6subscription_after_build"/>
before/after ant macro "compile_core" - the core module of the extension
<macrodef name="adyenv6subscription_before_compile_core">
<macrodef name="adyenv6subscription_after_compile_core">
before/after ant macro "compile_web" - the web module of the extension
<macrodef name="adyenv6subscription_before_compile_web" />
<macrodef name="adyenv6subscription_after_compile_web" />
before/after ant macro "compile_hmc" - the hmc module of the extension
<macrodef name="adyenv6subscription_before_compile_hmc" />
<macrodef name="adyenv6subscription_after_compile_hmc" />
Preparing extension
will be called in the beginning of the ant call and only once (also when using multiple
ant targets e.g. ant build yunittest)
<macrodef name="adyenv6subscription_only_once_prepare"/>
Creating ear module/production
before/after ant macro "ear"
<macrodef name="adyenv6subscription_before_ear"/>
<macrodef name="adyenv6subscription_after_ear"/>
before/after ant macro "production" - for hybris server only
<macrodef name="adyenv6subscription_before_production" />
<macrodef name="adyenv6subscription_after_production" />
JUnit Test
before/after ant macro "yunitinit"
<macrodef name="adyenv6subscription_before_yunitinit" />
<macrodef name="adyenv6subscription_after_yunitinit" />
before/after ant macro "yunit"
<macrodef name="adyenv6subscription_before_yunit" />
<macrodef name="adyenv6subscription_after_yunit" />
Distribution package
before/after ant macro "dist" - internal target; only for use when platform is available in source code
<macrodef name="adyenv6subscription_after_dist"/>
<macrodef name="adyenv6subscription_before_dist"/>
before/after ant macro "dist_copy" - internal target; only for use when platform is available in source code
<macrodef name="adyenv6subscription_before_dist_copy"/>
<macrodef name="adyenv6subscription_after_dist_copy"/>
With these filters you can override the default extension filters defined in platform/resources/ant/dist/filtersets.xml
<patternset id="extension.adyenv6subscription.binary.filter">
<patternset refid="extension.filter" />
<exclude name="**/*-source.jar" />
</patternset>
<patternset id="extension.adyenv6subscription.source.filter">
<exclude name="**/bin/**" />
</patternset>
With this filter you can decide what should be excluded from development zip.
<patternset id="extension.adyenv6subscription.devzip.filter">
Include all files from extension.source.filter.
<patternset refid="extension.source.filter" />
Exclude unwanted files.
<exclude name="lib/exclude-me.jar" />
</patternset>
--><project name="adyenv6subscription_buildcallbacks">

<!--
Called whenever 'ant ear' is used. this callback can be used to modify the content of the ear file
${ear.path}: path to ear
-->

<macrodef name="adyenv6subscription_before_ear">

<sequential>

<!-- you can do anything before the EAR file is being packed -->

</sequential>

</macrodef>

</project>
42 changes: 42 additions & 0 deletions adyenv6subscription/extensioninfo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--
Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved.
--><extensioninfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="extensioninfo.xsd">


<extension abstractclassprefix="Generated" classprefix="Adyenv6subscription" jaloLogicFree="true" managername="Adyenv6subscriptionManager" managersuperclass="de.hybris.platform.jalo.extension.Extension" name="adyenv6subscription" usemaven="false">



<!-- for more information on maven managed libraries please consult https://wiki.hybris.com/x/Nq8sDQ -->



<!-- you should add all required extensions to this list, except platform extensions which are automatically required -->



<!-- <requires-extension name="cms"/> -->


<requires-extension name="ordermanagementfacades"/>
<requires-extension name="acceleratorfacades"/>
<requires-extension name="commercefacades"/>
<requires-extension name="basecommerce"/>
<requires-extension name="adyenv6core"/>


<coremodule generated="true" manager="com.adyen.v6.jalo.Adyenv6subscriptionManager" packageroot="com.adyen.v6"/>


<webmodule jspcompile="false" webroot="/adyenv6subscription"/>





</extension>



</extensioninfo>
15 changes: 15 additions & 0 deletions adyenv6subscription/external-dependencies.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!--
Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>de.hybris.platform</groupId>
<artifactId>adyenv6subscription</artifactId>
<version>2211.3</version>

<packaging>jar</packaging>

<dependencies>
</dependencies>
</project>
16 changes: 16 additions & 0 deletions adyenv6subscription/project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# -----------------------------------------------------------------------
# Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved.
# -----------------------------------------------------------------------

# adyenv6subscription.key=value

# Specifies the location of the spring context file putted automatically to the global platform application context.
adyenv6subscription.application-context=adyenv6subscription-spring.xml

# you can control your logger as follows:

#uncomment, if you want to customize the tld/pluggability scanning. You can extend the allowlists below if there is need for that
#adyenv6subscription.tomcat.tld.scan=javax.servlet.jsp.jstl-*.jar
#adyenv6subscription.tomcat.tld.default.scan.enabled=false
#adyenv6subscription.tomcat.pluggability.scan=javax.servlet.jsp.jstl-*.jar
#adyenv6subscription.tomcat.pluggability.default.scan.enabled=false
12 changes: 12 additions & 0 deletions adyenv6subscription/resources/adyenv6subscription-beans.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved.
-->
<!--
ATTENTION: This is just an example file. You have to edit it according to your needs.
-->

<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="beans.xsd">


</beans>
39 changes: 39 additions & 0 deletions adyenv6subscription/resources/adyenv6subscription-items.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
Copyright abstractOrderEntryNextRecurringOrderGenerationDateAttributeHandler(c) 2021 SAP SE or an SAP affiliate company. All rights reserved.
-->
<!--
ATTENTION: This is just an example file. You have to edit it according to your needs.
-->

<items xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="items.xsd">

<collectiontypes>
<collectiontype code="SubscriptionAllowedPaymentMethods" elementtype="java.lang.String" type="set"/>
<collectiontype code="BundleTemplates" elementtype="BundleTemplate" type="list"/>
</collectiontypes>

<itemtypes>
<itemtype code="AbstractOrderEntry" autocreate="false" generate="false">
<attributes>
<attribute type="java.lang.Boolean" qualifier="isSubscriptionEntry">
<description>If the entry is added as a subscription</description>
<persistence type="property" />
<modifiers optional="true" unique="false" write="true" read="true" />
</attribute>
</attributes>
</itemtype>

<itemtype code="BaseStore" generate="false" autocreate="false">
<attributes>
<attribute qualifier="subscriptionAllowedPaymentMethods" type="SubscriptionAllowedPaymentMethods" >
<description>Subscription Allowed Payment Methods</description>
<persistence type="property" />
<modifiers read="true" write="true" search="true" optional="true" />
</attribute>
</attributes>
</itemtype>

</itemtypes>
</items>
25 changes: 25 additions & 0 deletions adyenv6subscription/resources/adyenv6subscription-spring.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved.
-->
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop.xsd">

<alias name="subscriptionAdyenPaymentServiceFactory" alias="adyenPaymentServiceFactory" />
<bean id="subscriptionAdyenPaymentServiceFactory" class="com.adyen.v6.factory.SubscriptionAdyenPaymentServiceFactory">
<constructor-arg name="adyenRequestFactory" ref="adyenRequestFactory"/>
<constructor-arg name="cartFacade" ref="cartFacade"/>
<constructor-arg name="baseStoreService" ref="baseStoreService"/>
</bean>

<alias name="subscriptionRequestFactory" alias="adyenRequestFactory" />
<bean id="subscriptionRequestFactory" class="com.adyen.v6.factory.SubscriptionPaymentRequestFactory">
<property name="cartFacade" ref="cartFacade" />
</bean>

</beans>
11 changes: 11 additions & 0 deletions adyenv6subscription/resources/adyenv6subscription.build.number
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#Ant properties
#Wed Feb 08 03:30:31 CET 2023
version.api=2211
vendor=hybris
group.id=de.hybris.platform
name=adyenv6subscription
description=adyenv6subscription
builddate=20230208 0330
releasedate=20221109 1322
version=2211.3
module.name=platform-module
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# -----------------------------------------------------------------------
# Copyright (c) 2021 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.<code of type>.name=XY
# type.<code of type>.<qualifier of attribute>.name=XY
# type.<code of type>.description=XY
# type.<code of type>.<qualifier of attribute>.description=XY
#
# yourcustomlocalekey=value

Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# -----------------------------------------------------------------------
# Copyright (c) 2021 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.<code of type>.name=XY
# type.<code of type>.<qualifier of attribute>.name=XY
# type.<code of type>.description=XY
# type.<code of type>.<qualifier of attribute>.description=XY
#
# yourcustomlocalekey=value

Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# -----------------------------------------------------------------------
# Copyright (c) 2021 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.<code of type>.name=XY
# type.<code of type>.<qualifier of attribute>.name=XY
# type.<code of type>.description=XY
# type.<code of type>.<qualifier of attribute>.description=XY
#
# yourcustomlocalekey=value

Loading

0 comments on commit cf077a0

Please sign in to comment.