mirror of
https://github.com/valitydev/adapter-bank-spring-boot-starter.git
synced 2024-11-06 01:05:20 +00:00
PROX-367: bump libs
This commit is contained in:
parent
0cea781a7d
commit
dd24ce223b
15
pom.xml
15
pom.xml
@ -6,17 +6,17 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.rbkmoney</groupId>
|
||||
<artifactId>adapter-bank-spring-boot-starter</artifactId>
|
||||
<version>0.0.8</version>
|
||||
<version>0.0.9</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<java.version>8</java.version>
|
||||
<spring-boot.version>2.1.0.RELEASE</spring-boot.version>
|
||||
<damsel-utils.version>2.1.9</damsel-utils.version>
|
||||
<damsel.version>1.256-2afe121</damsel.version>
|
||||
<damsel-utils.version>2.1.10</damsel-utils.version>
|
||||
<damsel.version>1.363-3074af1</damsel.version>
|
||||
<serializer.version>0.6.7</serializer.version>
|
||||
<hellgate-adapter-client.version>2.1.9</hellgate-adapter-client.version>
|
||||
<hellgate-adapter-client.version>2.1.10</hellgate-adapter-client.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
@ -69,13 +69,13 @@
|
||||
<dependency>
|
||||
<groupId>com.rbkmoney</groupId>
|
||||
<artifactId>error-mapping-java</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<version>1.0.4</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.rbkmoney.woody</groupId>
|
||||
<artifactId>woody-thrift</artifactId>
|
||||
<version>1.1.15</version>
|
||||
<version>1.1.16</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
@ -94,7 +94,6 @@
|
||||
<artifactId>serializer</artifactId>
|
||||
<version>${serializer.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.rbkmoney.proxy-libs</groupId>
|
||||
<artifactId>hellgate-adapter-client</artifactId>
|
||||
@ -103,7 +102,7 @@
|
||||
<dependency>
|
||||
<groupId>com.rbkmoney</groupId>
|
||||
<artifactId>adapter-common-lib</artifactId>
|
||||
<version>0.0.9</version>
|
||||
<version>0.0.10</version>
|
||||
</dependency>
|
||||
|
||||
<!-- test -->
|
||||
|
@ -1,15 +1,10 @@
|
||||
package com.rbkmoney.adapter.bank.spring.boot.starter.config;
|
||||
package com.rbkmoney.adapter.bank.spring.boot.starter.configuration;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.rbkmoney.adapter.common.component.NetworkFilterComponent;
|
||||
import com.rbkmoney.adapter.common.mapper.SimpleErrorMapping;
|
||||
import com.rbkmoney.adapter.common.mapper.SimpleObjectMapper;
|
||||
import com.rbkmoney.error.mapping.ErrorMapping;
|
||||
import org.apache.catalina.connector.Connector;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory;
|
||||
import org.springframework.boot.web.servlet.FilterRegistrationBean;
|
||||
import org.springframework.boot.web.servlet.server.ServletWebServerFactory;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.core.io.Resource;
|
||||
@ -17,7 +12,7 @@ import org.springframework.core.io.Resource;
|
||||
import java.io.IOException;
|
||||
|
||||
@Configuration
|
||||
public class AppConfig {
|
||||
public class AppConfiguration {
|
||||
|
||||
@Value("${error-mapping.file}")
|
||||
private Resource errorMappingFilePath;
|
||||
@ -31,7 +26,7 @@ public class AppConfig {
|
||||
}
|
||||
|
||||
@Bean
|
||||
public ObjectMapper objectMapper(){
|
||||
public ObjectMapper objectMapper() {
|
||||
return new SimpleObjectMapper().getSimpleObjectMapper();
|
||||
}
|
||||
|
@ -0,0 +1,30 @@
|
||||
package com.rbkmoney.adapter.bank.spring.boot.starter.configuration;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.rbkmoney.adapter.common.state.deserializer.AdapterDeserializer;
|
||||
import com.rbkmoney.adapter.common.state.deserializer.CallbackDeserializer;
|
||||
import com.rbkmoney.adapter.common.state.deserializer.RecTokenDeserializer;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@Configuration
|
||||
@RequiredArgsConstructor
|
||||
public class DeserializerConfiguration {
|
||||
|
||||
@Bean
|
||||
public CallbackDeserializer callbackDeserializer(ObjectMapper objectMapper) {
|
||||
return new CallbackDeserializer(objectMapper);
|
||||
}
|
||||
|
||||
@Bean
|
||||
public AdapterDeserializer adapterDeserializer(ObjectMapper objectMapper) {
|
||||
return new AdapterDeserializer(objectMapper);
|
||||
}
|
||||
|
||||
@Bean
|
||||
public RecTokenDeserializer recTokenDeserializer(ObjectMapper objectMapper) {
|
||||
return new RecTokenDeserializer(objectMapper);
|
||||
}
|
||||
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package com.rbkmoney.adapter.bank.spring.boot.starter.config;
|
||||
package com.rbkmoney.adapter.bank.spring.boot.starter.configuration;
|
||||
|
||||
import com.rbkmoney.adapter.common.component.NetworkFilterComponent;
|
||||
import org.apache.catalina.connector.Connector;
|
||||
@ -10,7 +10,7 @@ import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@Configuration
|
||||
public class NetworkConfig {
|
||||
public class NetworkConfiguration {
|
||||
|
||||
@Value("${server.rest.port}")
|
||||
private int restPort;
|
@ -1,16 +1,16 @@
|
||||
package com.rbkmoney.adapter.bank.spring.boot.starter.config;
|
||||
package com.rbkmoney.adapter.bank.spring.boot.starter.configuration;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.rbkmoney.adapter.common.serializer.AdapterSerializer;
|
||||
import com.rbkmoney.adapter.common.serializer.CallbackSerializer;
|
||||
import com.rbkmoney.adapter.common.serializer.RecTokenSerializer;
|
||||
import com.rbkmoney.adapter.common.state.serializer.AdapterSerializer;
|
||||
import com.rbkmoney.adapter.common.state.serializer.CallbackSerializer;
|
||||
import com.rbkmoney.adapter.common.state.serializer.RecurrentTokenSerializer;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@Configuration
|
||||
@RequiredArgsConstructor
|
||||
public class SerializerConfig {
|
||||
public class SerializerConfiguration {
|
||||
|
||||
@Bean
|
||||
public CallbackSerializer callbackSerializer(ObjectMapper objectMapper) {
|
||||
@ -23,8 +23,8 @@ public class SerializerConfig {
|
||||
}
|
||||
|
||||
@Bean
|
||||
public RecTokenSerializer recTokenSerializer(ObjectMapper objectMapper) {
|
||||
return new RecTokenSerializer(objectMapper);
|
||||
public RecurrentTokenSerializer recTokenSerializer(ObjectMapper objectMapper) {
|
||||
return new RecurrentTokenSerializer(objectMapper);
|
||||
}
|
||||
|
||||
}
|
@ -1,7 +1,8 @@
|
||||
package com.rbkmoney.adapter.bank.spring.boot.starter.controller;
|
||||
|
||||
import com.rbkmoney.adapter.common.controller.AdapterController;
|
||||
import com.rbkmoney.adapter.common.serializer.CallbackSerializer;
|
||||
import com.rbkmoney.adapter.common.state.deserializer.CallbackDeserializer;
|
||||
import com.rbkmoney.adapter.common.state.serializer.CallbackSerializer;
|
||||
import com.rbkmoney.adapter.helpers.hellgate.HellgateAdapterClient;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
@ -12,7 +13,6 @@ import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
|
||||
/** Handler callback 3DS */
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/${server.rest.endpoint}")
|
||||
@ -20,8 +20,12 @@ public class AdapterControllerDecorator {
|
||||
|
||||
private AdapterController adapterController;
|
||||
|
||||
public AdapterControllerDecorator(HellgateAdapterClient hgClient, CallbackSerializer callbackSerializer) {
|
||||
adapterController = new AdapterController(hgClient, callbackSerializer);
|
||||
public AdapterControllerDecorator(
|
||||
HellgateAdapterClient hgClient,
|
||||
CallbackSerializer callbackSerializer,
|
||||
CallbackDeserializer callbackDeserializer
|
||||
) {
|
||||
adapterController = new AdapterController(hgClient, callbackSerializer, callbackDeserializer);
|
||||
}
|
||||
|
||||
@PostMapping(value = "term_url")
|
||||
|
@ -5,8 +5,5 @@ import com.rbkmoney.adapter.bank.spring.boot.starter.model.GeneralExitStateModel
|
||||
import java.util.Map;
|
||||
|
||||
public interface ThreeDsPropertiesService {
|
||||
|
||||
Map<String, String> initProperties(GeneralExitStateModel generalExitStateModel);
|
||||
|
||||
|
||||
}
|
||||
|
@ -21,9 +21,9 @@ public class ThreeDsPropertiesServiceImpl implements ThreeDsPropertiesService {
|
||||
public Map<String, String> initProperties(GeneralExitStateModel generalExitStateModel) {
|
||||
Map<String, String> params = new HashMap<>();
|
||||
AdapterContext adapterContext = generalExitStateModel.getAdapterContext();
|
||||
params.put(ThreeDsFields.PA_REQ, adapterContext.getPaReq());
|
||||
params.put(ThreeDsFields.MD, adapterContext.getMd());
|
||||
params.put(ThreeDsFields.TERM_URL, RedirectUtils.getCallbackUrl(
|
||||
params.put(ThreeDsFields.PA_REQ.getValue(), adapterContext.getPaReq());
|
||||
params.put(ThreeDsFields.MD.getValue(), adapterContext.getMd());
|
||||
params.put(ThreeDsFields.TERM_URL.getValue(), RedirectUtils.getCallbackUrl(
|
||||
adapterProperties.getCallbackUrl(),
|
||||
adapterProperties.getPathCallbackUrl())
|
||||
);
|
||||
|
@ -1,5 +1,6 @@
|
||||
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
|
||||
com.rbkmoney.adapter.bank.spring.boot.starter.config.AppConfig,\
|
||||
com.rbkmoney.adapter.bank.spring.boot.starter.config.SerializerConfig,\
|
||||
com.rbkmoney.adapter.bank.spring.boot.starter.configuration.AppConfiguration,\
|
||||
com.rbkmoney.adapter.bank.spring.boot.starter.configuration.SerializerConfiguration,\
|
||||
com.rbkmoney.adapter.bank.spring.boot.starter.configuration.DeserializerConfiguration,\
|
||||
com.rbkmoney.adapter.bank.spring.boot.starter.controller.AdapterControllerDecorator,\
|
||||
com.rbkmoney.adapter.bank.spring.boot.starter.service.ThreeDsPropertiesServiceImpl
|
||||
|
@ -1,8 +1,7 @@
|
||||
[
|
||||
{
|
||||
"code":"unknown",
|
||||
"description":"unknown",
|
||||
"regexp":".*",
|
||||
"mapping":"authorization_failed:unknown"
|
||||
"codeRegex":"002",
|
||||
"descriptionRegex":"Invalid .*",
|
||||
"mapping":"authorization_failed:operation_blocked"
|
||||
}
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user