From 55696c1ae04cd7031ef62d0353427b7f2a1af5ee Mon Sep 17 00:00:00 2001 From: Anatoly Karlov Date: Mon, 12 Apr 2021 22:07:50 +0300 Subject: [PATCH] JD-237: add result endpoint (#36) --- README.md | 4 ++++ pom.xml | 10 +++++----- .../entity/ChallengeFlowTransactionInfoEntity.java | 6 ++++++ .../mapper/ChallengeFlowTransactionInfoMapper.java | 8 ++++++-- .../db/migration/V8__1.3.1_add_result_fields.sql | 3 +++ .../threeds/server/storage/handler/HandlerTest.java | 2 ++ .../ChallengeFlowTransactionInfoRepositoryTest.java | 6 ++++++ 7 files changed, 32 insertions(+), 7 deletions(-) create mode 100644 src/main/resources/db/migration/V8__1.3.1_add_result_fields.sql diff --git a/README.md b/README.md index 2473a75..7a1728e 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,9 @@ # Three-ds-server-storage +Хранилище макросервиса 3DSS + +[3DSS Docker Compose description](https://github.com/rbkmoney/three-ds-server-compose#three-ds-server-compose) + ## важно! значения карточных диапазонов `cardRange.getRangeStart(), cardRange.getRangeEnd()`, а также номер аккаунта `accountNumber` должны быть замаскированы. для этих целей в проекте есть `CardRangeWrapper.toStringHideCardRange` для `cardRange` и отдельный метод `AccountNumberUtils.hideAccountNumber` diff --git a/pom.xml b/pom.xml index 92ad44c..b30d0b8 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ three-ds-server-storage - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT jar three-ds-server-storage @@ -54,13 +54,13 @@ com.rbkmoney - three-ds-server-storage-proto - 1.23-e8e35de + three-ds-server-domain-lib + 1.3.0 com.rbkmoney - three-ds-server-domain-lib - 1.2.3 + three-ds-server-storage-proto + 1.24-ab05a55 diff --git a/src/main/java/com/rbkmoney/threeds/server/storage/entity/ChallengeFlowTransactionInfoEntity.java b/src/main/java/com/rbkmoney/threeds/server/storage/entity/ChallengeFlowTransactionInfoEntity.java index c682f40..23aac54 100644 --- a/src/main/java/com/rbkmoney/threeds/server/storage/entity/ChallengeFlowTransactionInfoEntity.java +++ b/src/main/java/com/rbkmoney/threeds/server/storage/entity/ChallengeFlowTransactionInfoEntity.java @@ -43,4 +43,10 @@ public class ChallengeFlowTransactionInfoEntity implements Serializable { @Column(name = "acs_url") private String acsUrl; + @Column(name = "eci") + private String eci; + + @Column(name = "authentication_value") + private String authenticationValue; + } diff --git a/src/main/java/com/rbkmoney/threeds/server/storage/mapper/ChallengeFlowTransactionInfoMapper.java b/src/main/java/com/rbkmoney/threeds/server/storage/mapper/ChallengeFlowTransactionInfoMapper.java index 6ccba3b..a36a5b7 100644 --- a/src/main/java/com/rbkmoney/threeds/server/storage/mapper/ChallengeFlowTransactionInfoMapper.java +++ b/src/main/java/com/rbkmoney/threeds/server/storage/mapper/ChallengeFlowTransactionInfoMapper.java @@ -18,6 +18,8 @@ public class ChallengeFlowTransactionInfoMapper { .providerId(domain.getProviderId()) .messageVersion(domain.getMessageVersion()) .acsUrl(domain.getAcsUrl()) + .eci(domain.getEci()) + .authenticationValue(domain.getAuthenticationValue()) .build(); } @@ -29,6 +31,8 @@ public class ChallengeFlowTransactionInfoMapper { .setAcsDecConInd(entity.getAcsDecConInd()) .setProviderId(entity.getProviderId()) .setMessageVersion(entity.getMessageVersion()) - .setAcsUrl(entity.getAcsUrl()); + .setAcsUrl(entity.getAcsUrl()) + .setEci(entity.getEci()) + .setAuthenticationValue(entity.getAuthenticationValue()); } -} \ No newline at end of file +} diff --git a/src/main/resources/db/migration/V8__1.3.1_add_result_fields.sql b/src/main/resources/db/migration/V8__1.3.1_add_result_fields.sql new file mode 100644 index 0000000..a54714f --- /dev/null +++ b/src/main/resources/db/migration/V8__1.3.1_add_result_fields.sql @@ -0,0 +1,3 @@ +alter table three_ds_server_storage.challenge_flow_transaction_info + add column eci character varying, + add column authentication_value character varying; diff --git a/src/test/java/com/rbkmoney/threeds/server/storage/handler/HandlerTest.java b/src/test/java/com/rbkmoney/threeds/server/storage/handler/HandlerTest.java index 83d1b3e..16034d7 100644 --- a/src/test/java/com/rbkmoney/threeds/server/storage/handler/HandlerTest.java +++ b/src/test/java/com/rbkmoney/threeds/server/storage/handler/HandlerTest.java @@ -213,6 +213,8 @@ public class HandlerTest extends AbstractConfigWithoutDao { .providerId("1") .messageVersion("2.1.0") .acsUrl("1") + .eci("eci") + .authenticationValue("value") .build(); when(challengeFlowTransactionInfoRepository.findById(transactionId)) diff --git a/src/test/java/com/rbkmoney/threeds/server/storage/repository/ChallengeFlowTransactionInfoRepositoryTest.java b/src/test/java/com/rbkmoney/threeds/server/storage/repository/ChallengeFlowTransactionInfoRepositoryTest.java index ac743f5..60bb7f8 100644 --- a/src/test/java/com/rbkmoney/threeds/server/storage/repository/ChallengeFlowTransactionInfoRepositoryTest.java +++ b/src/test/java/com/rbkmoney/threeds/server/storage/repository/ChallengeFlowTransactionInfoRepositoryTest.java @@ -27,6 +27,8 @@ public class ChallengeFlowTransactionInfoRepositoryTest extends AbstractDaoConfi .providerId("1") .messageVersion("2.1.0") .acsUrl("1") + .eci("eci") + .authenticationValue("value") .build(); repository.save(trap); @@ -43,6 +45,8 @@ public class ChallengeFlowTransactionInfoRepositoryTest extends AbstractDaoConfi .providerId("1") .messageVersion("2.1.0") .acsUrl("1") + .eci("eci") + .authenticationValue("value") .build(); // When @@ -65,6 +69,8 @@ public class ChallengeFlowTransactionInfoRepositoryTest extends AbstractDaoConfi .providerId("1") .messageVersion("2.1.0") .acsUrl("1") + .eci("eci") + .authenticationValue("value") .build(); // When