diff --git a/helm/Chart.yaml b/helm/Chart.yaml
index 7f7bd84b..23155ba6 100644
--- a/helm/Chart.yaml
+++ b/helm/Chart.yaml
@@ -2,8 +2,8 @@ apiVersion: v2
name: pagopa-afm-calculator
description: Microservice that handles calculation for pagoPA Advanced Fees Management
type: application
-version: 2.47.0
-appVersion: 2.10.33
+version: 2.48.0
+appVersion: 2.10.33-1-PAGOPA-2388
dependencies:
- name: microservice-chart
version: 2.4.0
diff --git a/helm/values-dev.yaml b/helm/values-dev.yaml
index e2978644..dbc4ad19 100644
--- a/helm/values-dev.yaml
+++ b/helm/values-dev.yaml
@@ -4,7 +4,7 @@ microservice-chart:
fullnameOverride: ""
image:
repository: ghcr.io/pagopa/pagopa-afm-calculator
- tag: "2.10.33"
+ tag: "2.10.33-1-PAGOPA-2388"
pullPolicy: Always
livenessProbe:
httpGet:
diff --git a/helm/values-prod.yaml b/helm/values-prod.yaml
index 49dcff26..58cfcf21 100644
--- a/helm/values-prod.yaml
+++ b/helm/values-prod.yaml
@@ -4,7 +4,7 @@ microservice-chart:
fullnameOverride: ""
image:
repository: ghcr.io/pagopa/pagopa-afm-calculator
- tag: "2.10.33"
+ tag: "2.10.33-1-PAGOPA-2388"
pullPolicy: Always
livenessProbe:
httpGet:
diff --git a/helm/values-uat.yaml b/helm/values-uat.yaml
index 4dfcbf1b..f0b87035 100644
--- a/helm/values-uat.yaml
+++ b/helm/values-uat.yaml
@@ -4,7 +4,7 @@ microservice-chart:
fullnameOverride: ""
image:
repository: ghcr.io/pagopa/pagopa-afm-calculator
- tag: "2.10.33"
+ tag: "2.10.33-1-PAGOPA-2388"
pullPolicy: Always
livenessProbe:
httpGet:
diff --git a/openapi/openapi-node-v1.json b/openapi/openapi-node-v1.json
index 8d840d06..d4f1bb51 100644
--- a/openapi/openapi-node-v1.json
+++ b/openapi/openapi-node-v1.json
@@ -4,7 +4,7 @@
"title": "PagoPA API Calculator Logic",
"description": "Calculator Logic microservice for pagoPA AFM",
"termsOfService": "https://www.pagopa.gov.it/",
- "version": "2.10.33"
+ "version": "2.10.33-1-PAGOPA-2388"
},
"servers": [
{
diff --git a/openapi/openapi-node-v2.json b/openapi/openapi-node-v2.json
index e4550897..38036b24 100644
--- a/openapi/openapi-node-v2.json
+++ b/openapi/openapi-node-v2.json
@@ -4,7 +4,7 @@
"title": "PagoPA API Calculator Logic",
"description": "Calculator Logic microservice for pagoPA AFM",
"termsOfService": "https://www.pagopa.gov.it/",
- "version": "2.10.33"
+ "version": "2.10.33-1-PAGOPA-2388"
},
"servers": [
{
diff --git a/openapi/openapi-v1-dev-uat.json b/openapi/openapi-v1-dev-uat.json
index ef0c7feb..ba261a0a 100644
--- a/openapi/openapi-v1-dev-uat.json
+++ b/openapi/openapi-v1-dev-uat.json
@@ -4,7 +4,7 @@
"title": "PagoPA API Calculator Logic",
"description": "Calculator Logic microservice for pagoPA AFM",
"termsOfService": "https://www.pagopa.gov.it/",
- "version": "2.10.33"
+ "version": "2.10.33-1-PAGOPA-2388"
},
"servers": [
{
diff --git a/openapi/openapi-v1.json b/openapi/openapi-v1.json
index 8d840d06..d4f1bb51 100644
--- a/openapi/openapi-v1.json
+++ b/openapi/openapi-v1.json
@@ -4,7 +4,7 @@
"title": "PagoPA API Calculator Logic",
"description": "Calculator Logic microservice for pagoPA AFM",
"termsOfService": "https://www.pagopa.gov.it/",
- "version": "2.10.33"
+ "version": "2.10.33-1-PAGOPA-2388"
},
"servers": [
{
diff --git a/openapi/openapi-v2.json b/openapi/openapi-v2.json
index e4550897..38036b24 100644
--- a/openapi/openapi-v2.json
+++ b/openapi/openapi-v2.json
@@ -4,7 +4,7 @@
"title": "PagoPA API Calculator Logic",
"description": "Calculator Logic microservice for pagoPA AFM",
"termsOfService": "https://www.pagopa.gov.it/",
- "version": "2.10.33"
+ "version": "2.10.33-1-PAGOPA-2388"
},
"servers": [
{
diff --git a/pom.xml b/pom.xml
index a2a0fc10..da3f520b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -11,7 +11,7 @@
it.gov.pagopa
calculator
- 2.10.33
+ 2.10.33-1-PAGOPA-2388
afm-calculator
Calculator Logic microservice for pagoPA AFM
diff --git a/src/main/java/it/gov/pagopa/afm/calculator/service/CalculatorService.java b/src/main/java/it/gov/pagopa/afm/calculator/service/CalculatorService.java
index 74cd36e6..611eca41 100644
--- a/src/main/java/it/gov/pagopa/afm/calculator/service/CalculatorService.java
+++ b/src/main/java/it/gov/pagopa/afm/calculator/service/CalculatorService.java
@@ -100,7 +100,9 @@ private List calculateTaxPayerFee(
// is raised
// - the limit(2) operation is used to terminate as soon as two distinct ABI objects are found
if (isUniqueAbi(issuers)) {
- throw new AppException(AppError.ISSUERS_BIN_WITH_DIFFERENT_ABI_ERROR, paymentOption.getBin());
+ // fix to solve the problem with overlapping ranges of some psps
+ issuers.clear();
+ //throw new AppException(AppError.ISSUERS_BIN_WITH_DIFFERENT_ABI_ERROR, paymentOption.getBin());
}
for (ValidBundle bundle : bundles) {
@@ -157,7 +159,9 @@ private List calcul
// is raised
// - the limit(2) operation is used to terminate as soon as two distinct ABI objects are found
if (isUniqueAbi(issuers)) {
- throw new AppException(AppError.ISSUERS_BIN_WITH_DIFFERENT_ABI_ERROR, paymentOption.getBin());
+ // fix to solve the problem with overlapping ranges of some psps
+ issuers.clear();
+ //throw new AppException(AppError.ISSUERS_BIN_WITH_DIFFERENT_ABI_ERROR, paymentOption.getBin());
}
for (ValidBundle bundle : bundles) {
diff --git a/src/test/java/it/gov/pagopa/afm/calculator/service/CalculatorServiceTest.java b/src/test/java/it/gov/pagopa/afm/calculator/service/CalculatorServiceTest.java
index 0607e581..59f2b411 100644
--- a/src/test/java/it/gov/pagopa/afm/calculator/service/CalculatorServiceTest.java
+++ b/src/test/java/it/gov/pagopa/afm/calculator/service/CalculatorServiceTest.java
@@ -294,27 +294,27 @@ void calculate_digitalStamp2() throws IOException, JSONException {
JSONAssert.assertEquals(expected, actual, JSONCompareMode.STRICT);
}
- @Test
- @Order(9)
- void calculate_BIN_with_different_ABI_error() throws IOException, JSONException {
- Touchpoint touchpoint = TestUtil.getMockTouchpoints();
- PaymentType paymentType = TestUtil.getMockPaymentType();
-
- when(cosmosTemplate.find(any(CosmosQuery.class), any(), anyString()))
- .thenReturn(
- Collections.singleton(touchpoint),
- Collections.singleton(paymentType),
- Collections.singleton(TestUtil.getMockValidBundle()));
-
- var paymentOption =
- TestUtil.readObjectFromFile("requests/getFeesBINwithMultipleABI.json", PaymentOption.class);
-
- AppException exception =
- assertThrows(
- AppException.class, () -> calculatorService.calculate(paymentOption, 10, true));
-
- assertEquals(HttpStatus.UNPROCESSABLE_ENTITY, exception.getHttpStatus());
- }
+// @Test
+// @Order(9)
+// void calculate_BIN_with_different_ABI_error() throws IOException, JSONException {
+// Touchpoint touchpoint = TestUtil.getMockTouchpoints();
+// PaymentType paymentType = TestUtil.getMockPaymentType();
+//
+// when(cosmosTemplate.find(any(CosmosQuery.class), any(), anyString()))
+// .thenReturn(
+// Collections.singleton(touchpoint),
+// Collections.singleton(paymentType),
+// Collections.singleton(TestUtil.getMockValidBundle()));
+//
+// var paymentOption =
+// TestUtil.readObjectFromFile("requests/getFeesBINwithMultipleABI.json", PaymentOption.class);
+//
+// AppException exception =
+// assertThrows(
+// AppException.class, () -> calculatorService.calculate(paymentOption, 10, true));
+//
+// assertEquals(HttpStatus.UNPROCESSABLE_ENTITY, exception.getHttpStatus());
+// }
@Test
@Order(10)
@@ -595,27 +595,27 @@ void calculateMulti_digitalStamp2() throws IOException, JSONException {
JSONAssert.assertEquals(expected, actual, JSONCompareMode.STRICT);
}
- @Test
- @Order(20)
- void calculateMulti_BIN_with_different_ABI_error() throws IOException, JSONException {
- Touchpoint touchpoint = TestUtil.getMockTouchpoints();
- PaymentType paymentType = TestUtil.getMockPaymentType();
-
- when(cosmosTemplate.find(any(CosmosQuery.class), any(), anyString()))
- .thenReturn(
- Collections.singleton(touchpoint),
- Collections.singleton(paymentType),
- Collections.singleton(TestUtil.getMockValidBundle()));
-
- var paymentOption =
- TestUtil.readObjectFromFile("requests/getFeesMultiBINwithMultipleABI.json", PaymentOptionMulti.class);
-
- AppException exception =
- assertThrows(
- AppException.class, () -> calculatorService.calculateMulti(paymentOption, 10, true));
-
- assertEquals(HttpStatus.UNPROCESSABLE_ENTITY, exception.getHttpStatus());
- }
+// @Test
+// @Order(20)
+// void calculateMulti_BIN_with_different_ABI_error() throws IOException, JSONException {
+// Touchpoint touchpoint = TestUtil.getMockTouchpoints();
+// PaymentType paymentType = TestUtil.getMockPaymentType();
+//
+// when(cosmosTemplate.find(any(CosmosQuery.class), any(), anyString()))
+// .thenReturn(
+// Collections.singleton(touchpoint),
+// Collections.singleton(paymentType),
+// Collections.singleton(TestUtil.getMockValidBundle()));
+//
+// var paymentOption =
+// TestUtil.readObjectFromFile("requests/getFeesMultiBINwithMultipleABI.json", PaymentOptionMulti.class);
+//
+// AppException exception =
+// assertThrows(
+// AppException.class, () -> calculatorService.calculateMulti(paymentOption, 10, true));
+//
+// assertEquals(HttpStatus.UNPROCESSABLE_ENTITY, exception.getHttpStatus());
+// }
@Test
@Order(21)