From 4c86833f5db54991f00dcbcaf99cadee7a8bd4b7 Mon Sep 17 00:00:00 2001 From: Sandor Arpa Date: Fri, 27 Dec 2024 14:17:57 +0000 Subject: [PATCH] PP-13439 use correct property value Use correct property value when adding exemption object to payments returned by ledger endpoints. --- .../uk/gov/pay/ledger/transaction/model/TransactionFactory.java | 2 +- .../pay/ledger/transaction/model/TransactionFactoryTest.java | 2 +- .../java/uk/gov/pay/ledger/util/fixture/TransactionFixture.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/uk/gov/pay/ledger/transaction/model/TransactionFactory.java b/src/main/java/uk/gov/pay/ledger/transaction/model/TransactionFactory.java index 322ed8f7a..00ee27d67 100644 --- a/src/main/java/uk/gov/pay/ledger/transaction/model/TransactionFactory.java +++ b/src/main/java/uk/gov/pay/ledger/transaction/model/TransactionFactory.java @@ -84,7 +84,7 @@ private Transaction createPayment(TransactionEntity entity) { entity.getPayoutEntity().map(payoutEntity -> payoutEntity.getPaidOutDate()).orElse(null) ); - String exemption3ds = safeGetAsString(transactionDetails, "exemption_3ds"); + String exemption3ds = safeGetAsString(transactionDetails, "exemption3ds"); String exemption3dsRequested = safeGetAsString(transactionDetails, "exemption_3ds_requested"); Exemption exemption = createExemption(exemption3ds, exemption3dsRequested); diff --git a/src/test/java/uk/gov/pay/ledger/transaction/model/TransactionFactoryTest.java b/src/test/java/uk/gov/pay/ledger/transaction/model/TransactionFactoryTest.java index 7cf938265..415f092f0 100644 --- a/src/test/java/uk/gov/pay/ledger/transaction/model/TransactionFactoryTest.java +++ b/src/test/java/uk/gov/pay/ledger/transaction/model/TransactionFactoryTest.java @@ -155,7 +155,7 @@ private void buildFullTransactionDetails() { fullTransactionDetails.addProperty("authorisation_mode", "moto_api"); fullTransactionDetails.addProperty("disputed", true); fullTransactionDetails.addProperty("can_retry", false); - fullTransactionDetails.addProperty("exemption_3ds", exemption3ds); + fullTransactionDetails.addProperty("exemption3ds", exemption3ds); } @Test diff --git a/src/test/java/uk/gov/pay/ledger/util/fixture/TransactionFixture.java b/src/test/java/uk/gov/pay/ledger/util/fixture/TransactionFixture.java index 726bd8e5c..66cae18ad 100644 --- a/src/test/java/uk/gov/pay/ledger/util/fixture/TransactionFixture.java +++ b/src/test/java/uk/gov/pay/ledger/util/fixture/TransactionFixture.java @@ -530,7 +530,7 @@ private JsonObject getTransactionDetail() { transactionDetails.addProperty("exemption_3ds_requested", exemption3dsRequested.name()); } if(exemption3ds != null) { - transactionDetails.addProperty("exemption_3ds", exemption3ds.name()); + transactionDetails.addProperty("exemption3ds", exemption3ds.name()); } Optional.ofNullable(version3ds).ifPresent( version -> {