diff --git a/pom.xml b/pom.xml index 875dbad..4332de0 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ adapter-flow-lib - 0.1.23 + 0.1.24 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 a72aa6c..9ea4c3a 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 @@ -28,23 +28,26 @@ public class ExitModelToProxyResultConverter implements Converter()) - .setAdditionalInfo(AdditionalInfoUtils.initAdditionalTrxInfo(exitStateModel)) - ); + .setTrx(getTransactionInfo(exitStateModel)); } - + private TransactionInfo getTransactionInfo(ExitStateModel exitStateModel) { + return new TransactionInfo() + .setId(exitStateModel.getProviderTrxId()) + .setExtra(exitStateModel.getTrxExtra() != null + ? exitStateModel.getTrxExtra() + : new HashMap<>()) + .setAdditionalInfo(AdditionalInfoUtils.initAdditionalTrxInfo(exitStateModel)); + } } 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 50442ed..438ff57 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 @@ -11,6 +11,7 @@ import dev.vality.damsel.proxy_provider.RecurrentTokenIntent; import dev.vality.damsel.proxy_provider.RecurrentTokenProxyResult; import lombok.RequiredArgsConstructor; import org.springframework.core.convert.converter.Converter; +import org.springframework.util.StringUtils; import java.util.HashMap; @@ -28,23 +29,26 @@ public class ExitModelToRecTokenProxyResultConverter implements Converter()) - .setAdditionalInfo(AdditionalInfoUtils.initAdditionalTrxInfo(exitStateModel)) - ); + .setTrx(getTransactionInfo(exitStateModel)); } + private TransactionInfo getTransactionInfo(ExitStateModel exitStateModel) { + return new TransactionInfo() + .setId(exitStateModel.getProviderTrxId()) + .setExtra(exitStateModel.getTrxExtra() != null + ? exitStateModel.getTrxExtra() + : new HashMap<>()) + .setAdditionalInfo(AdditionalInfoUtils.initAdditionalTrxInfo(exitStateModel)); + } } diff --git a/src/main/java/dev/vality/adapter/flow/lib/processor/ErrorProcessor.java b/src/main/java/dev/vality/adapter/flow/lib/processor/ErrorProcessor.java index 4fd7411..7612173 100644 --- a/src/main/java/dev/vality/adapter/flow/lib/processor/ErrorProcessor.java +++ b/src/main/java/dev/vality/adapter/flow/lib/processor/ErrorProcessor.java @@ -6,6 +6,7 @@ import dev.vality.adapter.flow.lib.model.ExitStateModel; import dev.vality.adapter.flow.lib.utils.ErrorUtils; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; +import org.springframework.util.StringUtils; @Slf4j @RequiredArgsConstructor @@ -20,6 +21,10 @@ public class ErrorProcessor implements Processor