diff --git a/pom.xml b/pom.xml
index 0b25ba4..1f478ae 100644
--- a/pom.xml
+++ b/pom.xml
@@ -12,7 +12,7 @@
adapter-flow-lib
- 0.1.21
+ 0.1.22
jar
adapter-flow-lib
diff --git a/src/main/java/dev/vality/adapter/flow/lib/converter/exit/ExitModelToProxyResultConverter.java b/src/main/java/dev/vality/adapter/flow/lib/converter/exit/ExitModelToProxyResultConverter.java
index 8005e1f..a72aa6c 100644
--- a/src/main/java/dev/vality/adapter/flow/lib/converter/exit/ExitModelToProxyResultConverter.java
+++ b/src/main/java/dev/vality/adapter/flow/lib/converter/exit/ExitModelToProxyResultConverter.java
@@ -4,7 +4,7 @@ import dev.vality.adapter.flow.lib.converter.ExitStateModelToTemporaryContextCon
import dev.vality.adapter.flow.lib.flow.ResultIntentResolver;
import dev.vality.adapter.flow.lib.model.ExitStateModel;
import dev.vality.adapter.flow.lib.serde.TemporaryContextSerializer;
-import dev.vality.adapter.flow.lib.service.IntentResultFactory;
+import dev.vality.adapter.flow.lib.service.factory.IntentResultFactory;
import dev.vality.adapter.flow.lib.utils.AdditionalInfoUtils;
import dev.vality.damsel.domain.TransactionInfo;
import dev.vality.damsel.proxy_provider.Intent;
diff --git a/src/main/java/dev/vality/adapter/flow/lib/converter/exit/ExitModelToRecTokenProxyResultConverter.java b/src/main/java/dev/vality/adapter/flow/lib/converter/exit/ExitModelToRecTokenProxyResultConverter.java
index 600fa09..d6f9831 100644
--- a/src/main/java/dev/vality/adapter/flow/lib/converter/exit/ExitModelToRecTokenProxyResultConverter.java
+++ b/src/main/java/dev/vality/adapter/flow/lib/converter/exit/ExitModelToRecTokenProxyResultConverter.java
@@ -4,7 +4,7 @@ import dev.vality.adapter.flow.lib.converter.ExitStateModelToTemporaryContextCon
import dev.vality.adapter.flow.lib.flow.RecurrentResultIntentResolver;
import dev.vality.adapter.flow.lib.model.ExitStateModel;
import dev.vality.adapter.flow.lib.serde.TemporaryContextSerializer;
-import dev.vality.adapter.flow.lib.service.RecurrentIntentResultFactory;
+import dev.vality.adapter.flow.lib.service.factory.RecurrentIntentResultFactory;
import dev.vality.adapter.flow.lib.utils.AdditionalInfoUtils;
import dev.vality.damsel.domain.TransactionInfo;
import dev.vality.damsel.proxy_provider.RecurrentTokenIntent;
diff --git a/src/main/java/dev/vality/adapter/flow/lib/flow/full/GenerateTokenResultIntentResolverImpl.java b/src/main/java/dev/vality/adapter/flow/lib/flow/full/GenerateTokenResultIntentResolverImpl.java
index f1f5db7..939aecb 100644
--- a/src/main/java/dev/vality/adapter/flow/lib/flow/full/GenerateTokenResultIntentResolverImpl.java
+++ b/src/main/java/dev/vality/adapter/flow/lib/flow/full/GenerateTokenResultIntentResolverImpl.java
@@ -3,7 +3,7 @@ package dev.vality.adapter.flow.lib.flow.full;
import dev.vality.adapter.flow.lib.constant.Step;
import dev.vality.adapter.flow.lib.flow.RecurrentResultIntentResolver;
import dev.vality.adapter.flow.lib.model.ExitStateModel;
-import dev.vality.adapter.flow.lib.service.RecurrentIntentResultFactory;
+import dev.vality.adapter.flow.lib.service.factory.RecurrentIntentResultFactory;
import dev.vality.damsel.proxy_provider.RecurrentTokenIntent;
import lombok.RequiredArgsConstructor;
diff --git a/src/main/java/dev/vality/adapter/flow/lib/flow/full/ResultIntentResolverImpl.java b/src/main/java/dev/vality/adapter/flow/lib/flow/full/ResultIntentResolverImpl.java
index b17187c..039b108 100644
--- a/src/main/java/dev/vality/adapter/flow/lib/flow/full/ResultIntentResolverImpl.java
+++ b/src/main/java/dev/vality/adapter/flow/lib/flow/full/ResultIntentResolverImpl.java
@@ -4,7 +4,7 @@ import dev.vality.adapter.flow.lib.constant.Step;
import dev.vality.adapter.flow.lib.flow.ResultIntentResolver;
import dev.vality.adapter.flow.lib.model.EntryStateModel;
import dev.vality.adapter.flow.lib.model.ExitStateModel;
-import dev.vality.adapter.flow.lib.service.IntentResultFactory;
+import dev.vality.adapter.flow.lib.service.factory.IntentResultFactory;
import dev.vality.damsel.proxy_provider.Intent;
import lombok.RequiredArgsConstructor;
diff --git a/src/main/java/dev/vality/adapter/flow/lib/flow/simple/SimpleRedirectGenerateTokenResultIntentResolver.java b/src/main/java/dev/vality/adapter/flow/lib/flow/simple/SimpleRedirectGenerateTokenResultIntentResolver.java
index 39528b2..9252524 100644
--- a/src/main/java/dev/vality/adapter/flow/lib/flow/simple/SimpleRedirectGenerateTokenResultIntentResolver.java
+++ b/src/main/java/dev/vality/adapter/flow/lib/flow/simple/SimpleRedirectGenerateTokenResultIntentResolver.java
@@ -3,7 +3,7 @@ package dev.vality.adapter.flow.lib.flow.simple;
import dev.vality.adapter.flow.lib.constant.Step;
import dev.vality.adapter.flow.lib.flow.RecurrentResultIntentResolver;
import dev.vality.adapter.flow.lib.model.ExitStateModel;
-import dev.vality.adapter.flow.lib.service.RecurrentIntentResultFactory;
+import dev.vality.adapter.flow.lib.service.factory.RecurrentIntentResultFactory;
import dev.vality.damsel.proxy_provider.RecurrentTokenIntent;
import lombok.RequiredArgsConstructor;
diff --git a/src/main/java/dev/vality/adapter/flow/lib/flow/simple/SimpleRedirectWithPollingResultIntentResolver.java b/src/main/java/dev/vality/adapter/flow/lib/flow/simple/SimpleRedirectWithPollingResultIntentResolver.java
index 392c62c..add8256 100644
--- a/src/main/java/dev/vality/adapter/flow/lib/flow/simple/SimpleRedirectWithPollingResultIntentResolver.java
+++ b/src/main/java/dev/vality/adapter/flow/lib/flow/simple/SimpleRedirectWithPollingResultIntentResolver.java
@@ -5,7 +5,7 @@ import dev.vality.adapter.flow.lib.constant.Step;
import dev.vality.adapter.flow.lib.constant.TargetStatus;
import dev.vality.adapter.flow.lib.flow.ResultIntentResolver;
import dev.vality.adapter.flow.lib.model.ExitStateModel;
-import dev.vality.adapter.flow.lib.service.IntentResultFactory;
+import dev.vality.adapter.flow.lib.service.factory.IntentResultFactory;
import dev.vality.damsel.proxy_provider.Intent;
import lombok.RequiredArgsConstructor;
diff --git a/src/main/java/dev/vality/adapter/flow/lib/service/IntentResultFactory.java b/src/main/java/dev/vality/adapter/flow/lib/service/factory/IntentResultFactory.java
similarity index 95%
rename from src/main/java/dev/vality/adapter/flow/lib/service/IntentResultFactory.java
rename to src/main/java/dev/vality/adapter/flow/lib/service/factory/IntentResultFactory.java
index 674334f..0b89c5a 100644
--- a/src/main/java/dev/vality/adapter/flow/lib/service/IntentResultFactory.java
+++ b/src/main/java/dev/vality/adapter/flow/lib/service/factory/IntentResultFactory.java
@@ -1,4 +1,4 @@
-package dev.vality.adapter.flow.lib.service;
+package dev.vality.adapter.flow.lib.service.factory;
import dev.vality.adapter.common.mapper.ErrorMapping;
import dev.vality.adapter.flow.lib.constant.HttpMethod;
@@ -8,6 +8,10 @@ import dev.vality.adapter.flow.lib.model.ExitStateModel;
import dev.vality.adapter.flow.lib.model.PollingInfo;
import dev.vality.adapter.flow.lib.model.ThreeDsData;
import dev.vality.adapter.flow.lib.serde.ParametersSerializer;
+import dev.vality.adapter.flow.lib.service.CallbackUrlExtractor;
+import dev.vality.adapter.flow.lib.service.ExponentialBackOffPollingService;
+import dev.vality.adapter.flow.lib.service.PollingInfoService;
+import dev.vality.adapter.flow.lib.service.TagManagementService;
import dev.vality.adapter.flow.lib.utils.ThreeDsDataInitializer;
import dev.vality.adapter.flow.lib.utils.TimeoutUtils;
import dev.vality.adapter.flow.lib.utils.TimerProperties;
diff --git a/src/main/java/dev/vality/adapter/flow/lib/service/factory/IntentResultForwardThreeDsParamsFactory.java b/src/main/java/dev/vality/adapter/flow/lib/service/factory/IntentResultForwardThreeDsParamsFactory.java
new file mode 100644
index 0000000..ebdc25d
--- /dev/null
+++ b/src/main/java/dev/vality/adapter/flow/lib/service/factory/IntentResultForwardThreeDsParamsFactory.java
@@ -0,0 +1,123 @@
+package dev.vality.adapter.flow.lib.service.factory;
+
+import dev.vality.adapter.common.mapper.ErrorMapping;
+import dev.vality.adapter.flow.lib.constant.HttpMethod;
+import dev.vality.adapter.flow.lib.model.EntryStateModel;
+import dev.vality.adapter.flow.lib.model.ExitStateModel;
+import dev.vality.adapter.flow.lib.model.PollingInfo;
+import dev.vality.adapter.flow.lib.model.ThreeDsData;
+import dev.vality.adapter.flow.lib.serde.ParametersSerializer;
+import dev.vality.adapter.flow.lib.service.ExponentialBackOffPollingService;
+import dev.vality.adapter.flow.lib.service.PollingInfoService;
+import dev.vality.adapter.flow.lib.service.TagManagementService;
+import dev.vality.adapter.flow.lib.utils.ThreeDsDataInitializer;
+import dev.vality.adapter.flow.lib.utils.TimeoutUtils;
+import dev.vality.adapter.flow.lib.utils.TimerProperties;
+import dev.vality.damsel.base.Timer;
+import dev.vality.damsel.proxy_provider.*;
+import dev.vality.damsel.timeout_behaviour.TimeoutBehaviour;
+import dev.vality.damsel.user_interaction.UserInteraction;
+import lombok.RequiredArgsConstructor;
+
+import java.nio.ByteBuffer;
+import java.util.Map;
+
+import static dev.vality.adapter.common.damsel.OptionsExtractors.extractRedirectTimeout;
+import static dev.vality.adapter.common.damsel.ProxyProviderPackageCreators.*;
+
+@RequiredArgsConstructor
+public class IntentResultForwardThreeDsParamsFactory {
+
+ private final TimerProperties timerProperties;
+ private final TagManagementService tagManagementService;
+ private final ParametersSerializer parametersSerializer;
+ private final PollingInfoService pollingInfoService;
+ private final ErrorMapping errorMapping;
+ private final ExponentialBackOffPollingService exponentialBackOffPollingService;
+
+ public Intent createFinishIntentSuccessWithCheckToken(ExitStateModel exitStateModel) {
+ EntryStateModel entryStateModel = exitStateModel.getEntryStateModel();
+ if (entryStateModel.getBaseRequestModel().getRecurrentPaymentData() != null
+ && entryStateModel.getBaseRequestModel().getRecurrentPaymentData().isMakeRecurrent()) {
+ return createFinishIntentSuccessWithToken(exitStateModel.getRecToken());
+ }
+ return createFinishIntentSuccess();
+ }
+
+ public Intent createSuspendIntentWithFailedAfterTimeout(ExitStateModel exitStateModel) {
+ EntryStateModel entryStateModel = exitStateModel.getEntryStateModel();
+ ThreeDsData threeDsData = exitStateModel.getThreeDsData();
+ Map params = ThreeDsDataInitializer.initThreeDsParameters(exitStateModel);
+ Map adapterConfigurations = entryStateModel.getBaseRequestModel().getAdapterConfigurations();
+ int timerRedirectTimeoutMin = extractRedirectTimeout(
+ adapterConfigurations,
+ timerProperties.getRedirectTimeoutMin());
+ return Intent.suspend(
+ new SuspendIntent(
+ tagManagementService.findTag(params),
+ Timer.timeout(TimeoutUtils.toSeconds(timerRedirectTimeoutMin))
+ ).setUserInteraction(createUserInteraction(threeDsData, params))
+ );
+ }
+
+ public Intent createSuspendIntentWithCallbackAfterTimeout(ExitStateModel exitStateModel) {
+ Map params = ThreeDsDataInitializer.initThreeDsParameters(exitStateModel);
+ EntryStateModel entryStateModel = exitStateModel.getEntryStateModel();
+
+ PollingInfo pollingInfo = pollingInfoService.initPollingInfo(entryStateModel);
+ if (pollingInfoService.isDeadline(pollingInfo)) {
+ return createFinishIntentFailed("Sleep timeout", "Max time pool limit reached");
+ }
+ exitStateModel.setPollingInfo(pollingInfo);
+ Map adapterConfigurations = entryStateModel.getBaseRequestModel().getAdapterConfigurations();
+ int timerRedirectTimeoutMin = extractRedirectTimeout(
+ adapterConfigurations,
+ timerProperties.getRedirectTimeoutMin());
+ return Intent.suspend(
+ new SuspendIntent(
+ tagManagementService.findTag(params),
+ Timer.timeout(TimeoutUtils.toSeconds(timerRedirectTimeoutMin)))
+ .setTimeoutBehaviour(TimeoutBehaviour.callback(
+ ByteBuffer.wrap(parametersSerializer.writeByte(params)))
+ ).setUserInteraction(createUserInteraction(exitStateModel.getThreeDsData(), params))
+ );
+ }
+
+ private UserInteraction createUserInteraction(ThreeDsData threeDsData, Map parameters) {
+ if (threeDsData.getHttpMethod() == HttpMethod.GET) {
+ return createGetUserInteraction(threeDsData.getAcsUrl());
+ } else {
+ return createPostUserInteraction(threeDsData.getAcsUrl(), parameters);
+ }
+ }
+
+ public Intent createFinishIntentSuccess() {
+ return Intent.finish(new FinishIntent(FinishStatus.success(new Success())));
+ }
+
+ public Intent createSleepIntentWithExponentialPolling(ExitStateModel exitStateModel) {
+ EntryStateModel entryStateModel = exitStateModel.getEntryStateModel();
+ PollingInfo pollingInfo = pollingInfoService.initPollingInfo(entryStateModel);
+ if (pollingInfoService.isDeadline(pollingInfo)) {
+ return createFinishIntentFailed("Sleep timeout", "Max time pool limit reached");
+ }
+ exitStateModel.setPollingInfo(pollingInfo);
+
+ Map adapterConfigurations = entryStateModel.getBaseRequestModel().getAdapterConfigurations();
+ int nextTimeoutSec =
+ exponentialBackOffPollingService.prepareNextPollingInterval(pollingInfo, adapterConfigurations);
+ return Intent.sleep(new SleepIntent(Timer.timeout(nextTimeoutSec)));
+ }
+
+ public Intent createFinishIntentFailed(ExitStateModel exitStateModel) {
+ return Intent.finish(new FinishIntent(FinishStatus.failure(
+ errorMapping.mapFailure(exitStateModel.getErrorCode(),
+ exitStateModel.getErrorMessage()))));
+ }
+
+ public Intent createFinishIntentFailed(String errorCode, String errorMessage) {
+ return Intent.finish(new FinishIntent(FinishStatus.failure(
+ errorMapping.mapFailure(errorCode, errorMessage))));
+ }
+
+}
diff --git a/src/main/java/dev/vality/adapter/flow/lib/service/RecurrentIntentResultFactory.java b/src/main/java/dev/vality/adapter/flow/lib/service/factory/RecurrentIntentResultFactory.java
similarity index 92%
rename from src/main/java/dev/vality/adapter/flow/lib/service/RecurrentIntentResultFactory.java
rename to src/main/java/dev/vality/adapter/flow/lib/service/factory/RecurrentIntentResultFactory.java
index e499c38..3833e09 100644
--- a/src/main/java/dev/vality/adapter/flow/lib/service/RecurrentIntentResultFactory.java
+++ b/src/main/java/dev/vality/adapter/flow/lib/service/factory/RecurrentIntentResultFactory.java
@@ -1,4 +1,4 @@
-package dev.vality.adapter.flow.lib.service;
+package dev.vality.adapter.flow.lib.service.factory;
import dev.vality.adapter.common.mapper.ErrorMapping;
import dev.vality.adapter.flow.lib.constant.RedirectFields;
@@ -6,6 +6,10 @@ import dev.vality.adapter.flow.lib.model.EntryStateModel;
import dev.vality.adapter.flow.lib.model.ExitStateModel;
import dev.vality.adapter.flow.lib.model.PollingInfo;
import dev.vality.adapter.flow.lib.model.ThreeDsData;
+import dev.vality.adapter.flow.lib.service.CallbackUrlExtractor;
+import dev.vality.adapter.flow.lib.service.ExponentialBackOffPollingService;
+import dev.vality.adapter.flow.lib.service.PollingInfoService;
+import dev.vality.adapter.flow.lib.service.TagManagementService;
import dev.vality.adapter.flow.lib.utils.ThreeDsDataInitializer;
import dev.vality.adapter.flow.lib.utils.TimeoutUtils;
import dev.vality.adapter.flow.lib.utils.TimerProperties;
diff --git a/src/main/java/dev/vality/adapter/flow/lib/service/factory/RecurrentIntentResultForwardThreeDsParamsFactory.java b/src/main/java/dev/vality/adapter/flow/lib/service/factory/RecurrentIntentResultForwardThreeDsParamsFactory.java
new file mode 100644
index 0000000..fd10ffb
--- /dev/null
+++ b/src/main/java/dev/vality/adapter/flow/lib/service/factory/RecurrentIntentResultForwardThreeDsParamsFactory.java
@@ -0,0 +1,80 @@
+package dev.vality.adapter.flow.lib.service.factory;
+
+import dev.vality.adapter.common.mapper.ErrorMapping;
+import dev.vality.adapter.flow.lib.model.EntryStateModel;
+import dev.vality.adapter.flow.lib.model.ExitStateModel;
+import dev.vality.adapter.flow.lib.model.PollingInfo;
+import dev.vality.adapter.flow.lib.model.ThreeDsData;
+import dev.vality.adapter.flow.lib.service.ExponentialBackOffPollingService;
+import dev.vality.adapter.flow.lib.service.PollingInfoService;
+import dev.vality.adapter.flow.lib.service.TagManagementService;
+import dev.vality.adapter.flow.lib.utils.ThreeDsDataInitializer;
+import dev.vality.adapter.flow.lib.utils.TimeoutUtils;
+import dev.vality.adapter.flow.lib.utils.TimerProperties;
+import dev.vality.damsel.base.Timer;
+import dev.vality.damsel.proxy_provider.*;
+import lombok.RequiredArgsConstructor;
+
+import java.util.Map;
+
+import static dev.vality.adapter.common.damsel.OptionsExtractors.extractRedirectTimeout;
+import static dev.vality.adapter.common.damsel.ProxyProviderPackageCreators.createPostUserInteraction;
+import static dev.vality.adapter.common.damsel.ProxyProviderPackageCreators.createRecurrentTokenStatusSuccess;
+
+@RequiredArgsConstructor
+public class RecurrentIntentResultForwardThreeDsParamsFactory {
+
+ private final TimerProperties timerProperties;
+ private final TagManagementService tagManagementService;
+ private final PollingInfoService pollingInfoService;
+ private final ErrorMapping errorMapping;
+ private final ExponentialBackOffPollingService exponentialBackOffPollingService;
+
+ public RecurrentTokenIntent createIntentWithSuspension(ExitStateModel exitStateModel) {
+ EntryStateModel entryStateModel = exitStateModel.getEntryStateModel();
+ ThreeDsData threeDsData = exitStateModel.getThreeDsData();
+ Map params = ThreeDsDataInitializer.initThreeDsParameters(exitStateModel);
+ Map adapterConfigurations = entryStateModel.getBaseRequestModel().getAdapterConfigurations();
+ int timerRedirectTimeoutMin = extractRedirectTimeout(
+ adapterConfigurations,
+ timerProperties.getRedirectTimeoutMin());
+ return RecurrentTokenIntent.suspend(
+ new SuspendIntent(
+ tagManagementService.findTag(params),
+ Timer.timeout(TimeoutUtils.toSeconds(timerRedirectTimeoutMin))
+ ).setUserInteraction(createPostUserInteraction(threeDsData.getAcsUrl(), params))
+ );
+ }
+
+ public RecurrentTokenIntent createSleepIntentForReinvocation() {
+ return RecurrentTokenIntent.sleep(new SleepIntent(Timer.timeout(0)));
+ }
+
+ public RecurrentTokenIntent createSleepIntentWithExponentialPolling(ExitStateModel exitStateModel) {
+ EntryStateModel entryStateModel = exitStateModel.getEntryStateModel();
+ PollingInfo pollingInfo = pollingInfoService.initPollingInfo(entryStateModel);
+ if (pollingInfoService.isDeadline(pollingInfo)) {
+ return createFinishIntentFailed("Sleep timeout", "Max time pool limit reached");
+ }
+ exitStateModel.setPollingInfo(pollingInfo);
+
+ Map adapterConfigurations = entryStateModel.getBaseRequestModel().getAdapterConfigurations();
+ int nextTimeoutSec =
+ exponentialBackOffPollingService.prepareNextPollingInterval(pollingInfo, adapterConfigurations);
+ return RecurrentTokenIntent.sleep(
+ new SleepIntent(Timer.timeout(nextTimeoutSec))
+ );
+ }
+
+ public RecurrentTokenIntent createFinishIntent(String recToken) {
+ return RecurrentTokenIntent.finish(
+ createRecurrentTokenStatusSuccess(recToken)
+ );
+ }
+
+ public RecurrentTokenIntent createFinishIntentFailed(String errorCode, String errorMessage) {
+ return RecurrentTokenIntent.finish(new RecurrentTokenFinishIntent(RecurrentTokenFinishStatus.failure(
+ errorMapping.mapFailure(errorCode, errorMessage)))
+ );
+ }
+}
diff --git a/src/test/java/dev/vality/adapter/flow/lib/flow/config/HandlerConfig.java b/src/test/java/dev/vality/adapter/flow/lib/flow/config/HandlerConfig.java
index 4ce97c2..2ba0b7c 100644
--- a/src/test/java/dev/vality/adapter/flow/lib/flow/config/HandlerConfig.java
+++ b/src/test/java/dev/vality/adapter/flow/lib/flow/config/HandlerConfig.java
@@ -22,6 +22,8 @@ import dev.vality.adapter.flow.lib.serde.ParametersSerializer;
import dev.vality.adapter.flow.lib.serde.TemporaryContextDeserializer;
import dev.vality.adapter.flow.lib.serde.TemporaryContextSerializer;
import dev.vality.adapter.flow.lib.service.*;
+import dev.vality.adapter.flow.lib.service.factory.IntentResultFactory;
+import dev.vality.adapter.flow.lib.service.factory.RecurrentIntentResultFactory;
import dev.vality.adapter.flow.lib.utils.AdapterProperties;
import dev.vality.adapter.flow.lib.service.CallbackUrlExtractor;
import dev.vality.adapter.flow.lib.utils.TimerProperties;
diff --git a/src/test/java/dev/vality/adapter/flow/lib/flow/full/three/ds/config/FullThreeDsFlowConfig.java b/src/test/java/dev/vality/adapter/flow/lib/flow/full/three/ds/config/FullThreeDsFlowConfig.java
index e8f3d44..361f921 100644
--- a/src/test/java/dev/vality/adapter/flow/lib/flow/full/three/ds/config/FullThreeDsFlowConfig.java
+++ b/src/test/java/dev/vality/adapter/flow/lib/flow/full/three/ds/config/FullThreeDsFlowConfig.java
@@ -20,8 +20,8 @@ import dev.vality.adapter.flow.lib.model.BaseResponseModel;
import dev.vality.adapter.flow.lib.model.EntryStateModel;
import dev.vality.adapter.flow.lib.model.ExitStateModel;
import dev.vality.adapter.flow.lib.processor.Processor;
-import dev.vality.adapter.flow.lib.service.IntentResultFactory;
-import dev.vality.adapter.flow.lib.service.RecurrentIntentResultFactory;
+import dev.vality.adapter.flow.lib.service.factory.IntentResultFactory;
+import dev.vality.adapter.flow.lib.service.factory.RecurrentIntentResultFactory;
import dev.vality.damsel.proxy_provider.PaymentContext;
import dev.vality.damsel.proxy_provider.PaymentProxyResult;
import dev.vality.damsel.proxy_provider.RecurrentTokenContext;
diff --git a/src/test/java/dev/vality/adapter/flow/lib/flow/simple/redirect/config/SimpleRedirectWithPollingDsFlowConfig.java b/src/test/java/dev/vality/adapter/flow/lib/flow/simple/redirect/config/SimpleRedirectWithPollingDsFlowConfig.java
index bbe9d8f..15517d9 100644
--- a/src/test/java/dev/vality/adapter/flow/lib/flow/simple/redirect/config/SimpleRedirectWithPollingDsFlowConfig.java
+++ b/src/test/java/dev/vality/adapter/flow/lib/flow/simple/redirect/config/SimpleRedirectWithPollingDsFlowConfig.java
@@ -20,8 +20,8 @@ import dev.vality.adapter.flow.lib.model.BaseResponseModel;
import dev.vality.adapter.flow.lib.model.EntryStateModel;
import dev.vality.adapter.flow.lib.model.ExitStateModel;
import dev.vality.adapter.flow.lib.processor.Processor;
-import dev.vality.adapter.flow.lib.service.IntentResultFactory;
-import dev.vality.adapter.flow.lib.service.RecurrentIntentResultFactory;
+import dev.vality.adapter.flow.lib.service.factory.IntentResultFactory;
+import dev.vality.adapter.flow.lib.service.factory.RecurrentIntentResultFactory;
import dev.vality.damsel.proxy_provider.PaymentContext;
import dev.vality.damsel.proxy_provider.PaymentProxyResult;
import dev.vality.damsel.proxy_provider.RecurrentTokenContext;