From 50a92d33b8a175d60c98766e07b66f40e1d0f26c Mon Sep 17 00:00:00 2001 From: EmanueleBVtech Date: Mon, 9 Dec 2024 17:09:21 +0100 Subject: [PATCH 01/52] updated GET transactions --- .../api/ecommerce-checkout/v1/_openapi.json.tpl | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/domains/ecommerce-app/api/ecommerce-checkout/v1/_openapi.json.tpl b/src/domains/ecommerce-app/api/ecommerce-checkout/v1/_openapi.json.tpl index 40b5a96c7..6bc775978 100644 --- a/src/domains/ecommerce-app/api/ecommerce-checkout/v1/_openapi.json.tpl +++ b/src/domains/ecommerce-app/api/ecommerce-checkout/v1/_openapi.json.tpl @@ -1687,6 +1687,18 @@ "type": "string", "example": "idCartFromCreditorInstitution" }, + "closePaymentResultError": { + "type": "object", + "description": "Error details for close payment result", + "properties": { + "statusCode": { + "type": "number" + }, + "description": { + "type": "string" + } + } + }, "sendPaymentResultOutcome": { "description": "The outcome of sendPaymentResult api (OK, KO, NOT_RECEIVED)", "type": "string", From 7aeabed8f354abefb1ea39ba4e5c051e2fa7d48e Mon Sep 17 00:00:00 2001 From: EmanueleBVtech Date: Mon, 9 Dec 2024 17:15:07 +0100 Subject: [PATCH 02/52] updated Get transactions on webview --- .../api/ecommerce-webview/v1/_openapi.json.tpl | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/domains/ecommerce-app/api/ecommerce-webview/v1/_openapi.json.tpl b/src/domains/ecommerce-app/api/ecommerce-webview/v1/_openapi.json.tpl index 64ea0b282..cf62cdeb0 100644 --- a/src/domains/ecommerce-app/api/ecommerce-webview/v1/_openapi.json.tpl +++ b/src/domains/ecommerce-app/api/ecommerce-webview/v1/_openapi.json.tpl @@ -250,6 +250,18 @@ "IO" ] }, + "closePaymentResultError": { + "type": "object", + "description": "Error details for close payment result", + "properties": { + "statusCode": { + "type": "number" + }, + "description": { + "type": "string" + } + } + }, "sendPaymentResultOutcome": { "description": "The outcome of sendPaymentResult api (OK, KO, NOT_RECEIVED)", "type": "string", From ffc29af8bedfd5c509abfe41b780fe22f71d7001 Mon Sep 17 00:00:00 2001 From: EmanueleBVtech Date: Mon, 9 Dec 2024 17:16:13 +0100 Subject: [PATCH 03/52] updated get transactions for io --- .../api/ecommerce-io/v2/_openapi.json.tpl | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/domains/ecommerce-app/api/ecommerce-io/v2/_openapi.json.tpl b/src/domains/ecommerce-app/api/ecommerce-io/v2/_openapi.json.tpl index fc23a19ef..fd7e951b7 100644 --- a/src/domains/ecommerce-app/api/ecommerce-io/v2/_openapi.json.tpl +++ b/src/domains/ecommerce-app/api/ecommerce-io/v2/_openapi.json.tpl @@ -1496,6 +1496,18 @@ "IO" ] }, + "closePaymentResultError": { + "type": "object", + "description": "Error details for close payment result", + "properties": { + "statusCode": { + "type": "number" + }, + "description": { + "type": "string" + } + } + }, "sendPaymentResultOutcome": { "description": "The outcome of sendPaymentResult api (OK, KO, NOT_RECEIVED)", "type": "string", From 447c6f42c37581e810da6cf8577804cbf8cd3a79 Mon Sep 17 00:00:00 2001 From: EmanueleBVtech Date: Mon, 9 Dec 2024 17:37:41 +0100 Subject: [PATCH 04/52] updated GET transactions on transactions service --- .../v1/_openapi.json.tpl | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/domains/ecommerce-app/api/ecommerce-transactions-service/v1/_openapi.json.tpl b/src/domains/ecommerce-app/api/ecommerce-transactions-service/v1/_openapi.json.tpl index d0175d992..1310ddf56 100644 --- a/src/domains/ecommerce-app/api/ecommerce-transactions-service/v1/_openapi.json.tpl +++ b/src/domains/ecommerce-app/api/ecommerce-transactions-service/v1/_openapi.json.tpl @@ -561,6 +561,18 @@ "type": "string", "example": "idCartFromCreditorInstitution" }, + "closePaymentResultError": { + "type": "object", + "description": "Error details for close payment result", + "properties": { + "statusCode": { + "type": "number" + }, + "description": { + "type": "string" + } + } + }, "sendPaymentResultOutcome": { "description": "The outcome of sendPaymentResult api (OK, KO, NOT_RECEIVED)", "type": "string", From 9cd04be0a7fecffcf793b7352d159b2723d2d7ad Mon Sep 17 00:00:00 2001 From: EmanueleBVtech Date: Mon, 9 Dec 2024 17:38:20 +0100 Subject: [PATCH 05/52] revert --- .../v1/_openapi.json.tpl | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/domains/ecommerce-app/api/ecommerce-transactions-service/v1/_openapi.json.tpl b/src/domains/ecommerce-app/api/ecommerce-transactions-service/v1/_openapi.json.tpl index 1310ddf56..d0175d992 100644 --- a/src/domains/ecommerce-app/api/ecommerce-transactions-service/v1/_openapi.json.tpl +++ b/src/domains/ecommerce-app/api/ecommerce-transactions-service/v1/_openapi.json.tpl @@ -561,18 +561,6 @@ "type": "string", "example": "idCartFromCreditorInstitution" }, - "closePaymentResultError": { - "type": "object", - "description": "Error details for close payment result", - "properties": { - "statusCode": { - "type": "number" - }, - "description": { - "type": "string" - } - } - }, "sendPaymentResultOutcome": { "description": "The outcome of sendPaymentResult api (OK, KO, NOT_RECEIVED)", "type": "string", From 66db362222e0102cc3f2d0ceab7e18dc48e4a97d Mon Sep 17 00:00:00 2001 From: EmanueleBVtech Date: Tue, 10 Dec 2024 08:32:38 +0100 Subject: [PATCH 06/52] restored --- .../v1/_openapi.json.tpl | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/domains/ecommerce-app/api/ecommerce-transactions-service/v1/_openapi.json.tpl b/src/domains/ecommerce-app/api/ecommerce-transactions-service/v1/_openapi.json.tpl index d0175d992..1310ddf56 100644 --- a/src/domains/ecommerce-app/api/ecommerce-transactions-service/v1/_openapi.json.tpl +++ b/src/domains/ecommerce-app/api/ecommerce-transactions-service/v1/_openapi.json.tpl @@ -561,6 +561,18 @@ "type": "string", "example": "idCartFromCreditorInstitution" }, + "closePaymentResultError": { + "type": "object", + "description": "Error details for close payment result", + "properties": { + "statusCode": { + "type": "number" + }, + "description": { + "type": "string" + } + } + }, "sendPaymentResultOutcome": { "description": "The outcome of sendPaymentResult api (OK, KO, NOT_RECEIVED)", "type": "string", From 351fb903cf0eb777f6fbddd70e5563d756fe9676 Mon Sep 17 00:00:00 2001 From: EmanueleBVtech Date: Tue, 10 Dec 2024 08:59:59 +0100 Subject: [PATCH 07/52] fix --- .../ecommerce-checkout/v1/_openapi.json.tpl | 24 +++++++++---------- .../api/ecommerce-io/v2/_openapi.json.tpl | 24 +++++++++---------- .../v1/_openapi.json.tpl | 24 +++++++++---------- .../ecommerce-webview/v1/_openapi.json.tpl | 24 +++++++++---------- 4 files changed, 48 insertions(+), 48 deletions(-) diff --git a/src/domains/ecommerce-app/api/ecommerce-checkout/v1/_openapi.json.tpl b/src/domains/ecommerce-app/api/ecommerce-checkout/v1/_openapi.json.tpl index 6bc775978..509b2451b 100644 --- a/src/domains/ecommerce-app/api/ecommerce-checkout/v1/_openapi.json.tpl +++ b/src/domains/ecommerce-app/api/ecommerce-checkout/v1/_openapi.json.tpl @@ -1687,18 +1687,6 @@ "type": "string", "example": "idCartFromCreditorInstitution" }, - "closePaymentResultError": { - "type": "object", - "description": "Error details for close payment result", - "properties": { - "statusCode": { - "type": "number" - }, - "description": { - "type": "string" - } - } - }, "sendPaymentResultOutcome": { "description": "The outcome of sendPaymentResult api (OK, KO, NOT_RECEIVED)", "type": "string", @@ -1954,6 +1942,18 @@ { "$ref": "#/components/schemas/NewTransactionResponse" }, + "closePaymentResultError": { + "type": "object", + "description": "Error details for close payment result", + "properties": { + "statusCode": { + "type": "number" + }, + "description": { + "type": "string" + } + } + }, { "type": "object", "properties": { diff --git a/src/domains/ecommerce-app/api/ecommerce-io/v2/_openapi.json.tpl b/src/domains/ecommerce-app/api/ecommerce-io/v2/_openapi.json.tpl index fd7e951b7..419a0d2ad 100644 --- a/src/domains/ecommerce-app/api/ecommerce-io/v2/_openapi.json.tpl +++ b/src/domains/ecommerce-app/api/ecommerce-io/v2/_openapi.json.tpl @@ -1496,18 +1496,6 @@ "IO" ] }, - "closePaymentResultError": { - "type": "object", - "description": "Error details for close payment result", - "properties": { - "statusCode": { - "type": "number" - }, - "description": { - "type": "string" - } - } - }, "sendPaymentResultOutcome": { "description": "The outcome of sendPaymentResult api (OK, KO, NOT_RECEIVED)", "type": "string", @@ -1728,6 +1716,18 @@ { "$ref": "#/components/schemas/NewTransactionResponse" }, + "closePaymentResultError": { + "type": "object", + "description": "Error details for close payment result", + "properties": { + "statusCode": { + "type": "number" + }, + "description": { + "type": "string" + } + } + }, { "type": "object", "properties": { diff --git a/src/domains/ecommerce-app/api/ecommerce-transactions-service/v1/_openapi.json.tpl b/src/domains/ecommerce-app/api/ecommerce-transactions-service/v1/_openapi.json.tpl index 1310ddf56..f9a238ffe 100644 --- a/src/domains/ecommerce-app/api/ecommerce-transactions-service/v1/_openapi.json.tpl +++ b/src/domains/ecommerce-app/api/ecommerce-transactions-service/v1/_openapi.json.tpl @@ -561,18 +561,6 @@ "type": "string", "example": "idCartFromCreditorInstitution" }, - "closePaymentResultError": { - "type": "object", - "description": "Error details for close payment result", - "properties": { - "statusCode": { - "type": "number" - }, - "description": { - "type": "string" - } - } - }, "sendPaymentResultOutcome": { "description": "The outcome of sendPaymentResult api (OK, KO, NOT_RECEIVED)", "type": "string", @@ -850,6 +838,18 @@ { "$ref": "#/components/schemas/NewTransactionResponse" }, + "closePaymentResultError": { + "type": "object", + "description": "Error details for close payment result", + "properties": { + "statusCode": { + "type": "number" + }, + "description": { + "type": "string" + } + } + }, { "type": "object", "properties": { diff --git a/src/domains/ecommerce-app/api/ecommerce-webview/v1/_openapi.json.tpl b/src/domains/ecommerce-app/api/ecommerce-webview/v1/_openapi.json.tpl index cf62cdeb0..665648036 100644 --- a/src/domains/ecommerce-app/api/ecommerce-webview/v1/_openapi.json.tpl +++ b/src/domains/ecommerce-app/api/ecommerce-webview/v1/_openapi.json.tpl @@ -250,18 +250,6 @@ "IO" ] }, - "closePaymentResultError": { - "type": "object", - "description": "Error details for close payment result", - "properties": { - "statusCode": { - "type": "number" - }, - "description": { - "type": "string" - } - } - }, "sendPaymentResultOutcome": { "description": "The outcome of sendPaymentResult api (OK, KO, NOT_RECEIVED)", "type": "string", @@ -328,6 +316,18 @@ { "$ref": "#/components/schemas/NewTransactionResponse" }, + "closePaymentResultError": { + "type": "object", + "description": "Error details for close payment result", + "properties": { + "statusCode": { + "type": "number" + }, + "description": { + "type": "string" + } + } + }, { "type": "object", "properties": { From 23bdb9d78b8521d4fc0ac339fa209e0001fb1c3f Mon Sep 17 00:00:00 2001 From: EmanueleBVtech Date: Tue, 10 Dec 2024 09:02:31 +0100 Subject: [PATCH 08/52] fix --- .../ecommerce-checkout/v1/_openapi.json.tpl | 24 +++++++++---------- .../api/ecommerce-io/v2/_openapi.json.tpl | 24 +++++++++---------- .../v1/_openapi.json.tpl | 24 +++++++++---------- .../ecommerce-webview/v1/_openapi.json.tpl | 24 +++++++++---------- 4 files changed, 48 insertions(+), 48 deletions(-) diff --git a/src/domains/ecommerce-app/api/ecommerce-checkout/v1/_openapi.json.tpl b/src/domains/ecommerce-app/api/ecommerce-checkout/v1/_openapi.json.tpl index 509b2451b..832562ca3 100644 --- a/src/domains/ecommerce-app/api/ecommerce-checkout/v1/_openapi.json.tpl +++ b/src/domains/ecommerce-app/api/ecommerce-checkout/v1/_openapi.json.tpl @@ -1942,21 +1942,21 @@ { "$ref": "#/components/schemas/NewTransactionResponse" }, - "closePaymentResultError": { - "type": "object", - "description": "Error details for close payment result", - "properties": { - "statusCode": { - "type": "number" - }, - "description": { - "type": "string" - } - } - }, { "type": "object", "properties": { + "closePaymentResultError": { + "type": "object", + "description": "Error details for close payment result", + "properties": { + "statusCode": { + "type": "number" + }, + "description": { + "type": "string" + } + } + }, "status": { "$ref": "#/components/schemas/TransactionStatus" }, diff --git a/src/domains/ecommerce-app/api/ecommerce-io/v2/_openapi.json.tpl b/src/domains/ecommerce-app/api/ecommerce-io/v2/_openapi.json.tpl index 419a0d2ad..318f5dbfe 100644 --- a/src/domains/ecommerce-app/api/ecommerce-io/v2/_openapi.json.tpl +++ b/src/domains/ecommerce-app/api/ecommerce-io/v2/_openapi.json.tpl @@ -1716,21 +1716,21 @@ { "$ref": "#/components/schemas/NewTransactionResponse" }, - "closePaymentResultError": { - "type": "object", - "description": "Error details for close payment result", - "properties": { - "statusCode": { - "type": "number" - }, - "description": { - "type": "string" - } - } - }, { "type": "object", "properties": { + "closePaymentResultError": { + "type": "object", + "description": "Error details for close payment result", + "properties": { + "statusCode": { + "type": "number" + }, + "description": { + "type": "string" + } + } + }, "status": { "$ref": "#/components/schemas/TransactionStatus" }, diff --git a/src/domains/ecommerce-app/api/ecommerce-transactions-service/v1/_openapi.json.tpl b/src/domains/ecommerce-app/api/ecommerce-transactions-service/v1/_openapi.json.tpl index f9a238ffe..f269e352a 100644 --- a/src/domains/ecommerce-app/api/ecommerce-transactions-service/v1/_openapi.json.tpl +++ b/src/domains/ecommerce-app/api/ecommerce-transactions-service/v1/_openapi.json.tpl @@ -838,21 +838,21 @@ { "$ref": "#/components/schemas/NewTransactionResponse" }, - "closePaymentResultError": { - "type": "object", - "description": "Error details for close payment result", - "properties": { - "statusCode": { - "type": "number" - }, - "description": { - "type": "string" - } - } - }, { "type": "object", "properties": { + "closePaymentResultError": { + "type": "object", + "description": "Error details for close payment result", + "properties": { + "statusCode": { + "type": "number" + }, + "description": { + "type": "string" + } + } + }, "feeTotal": { "$ref": "#/components/schemas/AmountEuroCents" } diff --git a/src/domains/ecommerce-app/api/ecommerce-webview/v1/_openapi.json.tpl b/src/domains/ecommerce-app/api/ecommerce-webview/v1/_openapi.json.tpl index 665648036..4935a0d1c 100644 --- a/src/domains/ecommerce-app/api/ecommerce-webview/v1/_openapi.json.tpl +++ b/src/domains/ecommerce-app/api/ecommerce-webview/v1/_openapi.json.tpl @@ -316,21 +316,21 @@ { "$ref": "#/components/schemas/NewTransactionResponse" }, - "closePaymentResultError": { - "type": "object", - "description": "Error details for close payment result", - "properties": { - "statusCode": { - "type": "number" - }, - "description": { - "type": "string" - } - } - }, { "type": "object", "properties": { + "closePaymentResultError": { + "type": "object", + "description": "Error details for close payment result", + "properties": { + "statusCode": { + "type": "number" + }, + "description": { + "type": "string" + } + } + }, "status": { "$ref": "#/components/schemas/TransactionStatus" }, From 11c08e76f7546a5e6a7800f30735b2f69b13394d Mon Sep 17 00:00:00 2001 From: EmanueleBVtech Date: Tue, 10 Dec 2024 12:22:14 +0100 Subject: [PATCH 09/52] moving to v2 --- .../ecommerce-checkout/v1/_openapi.json.tpl | 12 -- .../ecommerce-checkout/v2/_openapi.json.tpl | 177 ++++++++++++++++++ 2 files changed, 177 insertions(+), 12 deletions(-) diff --git a/src/domains/ecommerce-app/api/ecommerce-checkout/v1/_openapi.json.tpl b/src/domains/ecommerce-app/api/ecommerce-checkout/v1/_openapi.json.tpl index 832562ca3..40b5a96c7 100644 --- a/src/domains/ecommerce-app/api/ecommerce-checkout/v1/_openapi.json.tpl +++ b/src/domains/ecommerce-app/api/ecommerce-checkout/v1/_openapi.json.tpl @@ -1945,18 +1945,6 @@ { "type": "object", "properties": { - "closePaymentResultError": { - "type": "object", - "description": "Error details for close payment result", - "properties": { - "statusCode": { - "type": "number" - }, - "description": { - "type": "string" - } - } - }, "status": { "$ref": "#/components/schemas/TransactionStatus" }, diff --git a/src/domains/ecommerce-app/api/ecommerce-checkout/v2/_openapi.json.tpl b/src/domains/ecommerce-app/api/ecommerce-checkout/v2/_openapi.json.tpl index 78de87f7e..4ebdeb568 100644 --- a/src/domains/ecommerce-app/api/ecommerce-checkout/v2/_openapi.json.tpl +++ b/src/domains/ecommerce-app/api/ecommerce-checkout/v2/_openapi.json.tpl @@ -28,6 +28,148 @@ "description": "Design review" }, "paths": { + "/transactions/{transactionId}": { + "get": { + "tags": [ + "ecommerce-transactions" + ], + "operationId": "getTransactionInfo", + "parameters": [ + { + "in": "path", + "name": "transactionId", + "schema": { + "type": "string" + }, + "required": true, + "description": "Transaction ID" + } + ], + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "Get transaction information", + "description": "Return information for the input specific transaction resource", + "responses": { + "200": { + "description": "Transaction data successfully retrieved", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TransactionInfo" + } + } + } + }, + "400": { + "description": "Invalid transaction id", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + }, + "401": { + "description": "Unauthorized, access token missing or invalid" + }, + "404": { + "description": "Transaction not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + }, + "504": { + "description": "Gateway timeout", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + } + } + }, + "delete": { + "tags": [ + "ecommerce-transactions" + ], + "operationId": "requestTransactionUserCancellation", + "parameters": [ + { + "in": "path", + "name": "transactionId", + "schema": { + "type": "string" + }, + "required": true, + "description": "Transaction ID" + } + ], + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "Performs the transaction cancellation", + "responses": { + "202": { + "description": "Transaction cancellation request successfully accepted" + }, + "401": { + "description": "Unauthorized, access token missing or invalid" + }, + "404": { + "description": "Transaction not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + }, + "409": { + "description": "Transaction already processed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + }, + "504": { + "description": "Timeout from PagoPA services", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + } + } + } + }, "/transactions": { "post": { "tags": [ @@ -351,6 +493,41 @@ "faultCodeDetail" ] }, + "TransactionInfo": { + "description": "Transaction data returned when querying for an existing transaction", + "allOf": [ + { + "$ref": "#/components/schemas/NewTransactionResponse" + }, + { + "type": "object", + "properties": { + "closePaymentResultError": { + "type": "object", + "description": "Error details for close payment result", + "properties": { + "statusCode": { + "type": "number" + }, + "description": { + "type": "string" + } + } + }, + "status": { + "$ref": "#/components/schemas/TransactionStatus" + }, + "gatewayAuthorizationStatus": { + "type": "string", + "description": "Payment gateway authorization status" + } + }, + "required": [ + "status" + ] + } + ] + }, "ValidationFaultPaymentUnknownProblemJson": { "description": "A PaymentProblemJson-like type specific for the GetPayment operations.\nPossible values of `detail_v2` are limited to faults pertaining to validation errors.", "type": "object", From 4f6e61081721a12c48673fa30e57fbf649fa83ec Mon Sep 17 00:00:00 2001 From: EmanueleBVtech Date: Tue, 10 Dec 2024 12:24:25 +0100 Subject: [PATCH 10/52] moving to v2 --- .../v2/_openapi.json.tpl | 160 ++++++++++++++++++ 1 file changed, 160 insertions(+) diff --git a/src/domains/ecommerce-app/api/ecommerce-transactions-service/v2/_openapi.json.tpl b/src/domains/ecommerce-app/api/ecommerce-transactions-service/v2/_openapi.json.tpl index 18d740468..6f42895fc 100644 --- a/src/domains/ecommerce-app/api/ecommerce-transactions-service/v2/_openapi.json.tpl +++ b/src/domains/ecommerce-app/api/ecommerce-transactions-service/v2/_openapi.json.tpl @@ -33,6 +33,135 @@ } ], "paths": { + "/transactions/{transactionId}": { + "get": { + "tags": [ + "transactions" + ], + "operationId": "getTransactionInfo", + "summary": "Get transaction information", + "description": "Return information for the input specific transaction resource", + "parameters": [ + { + "in": "path", + "name": "transactionId", + "schema": { + "type": "string" + }, + "required": true, + "description": "Transaction ID" + } + ], + "responses": { + "200": { + "description": "Transaction data successfully retrieved", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TransactionInfo" + } + } + } + }, + "400": { + "description": "Invalid transaction id", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + }, + "401": { + "description": "Unauthorized, access token missing or invalid" + }, + "404": { + "description": "Transaction not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + }, + "504": { + "description": "Gateway timeout", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + } + } + }, + "delete": { + "tags": [ + "transactions" + ], + "operationId": "requestTransactionUserCancellation", + "parameters": [ + { + "in": "path", + "name": "transactionId", + "schema": { + "type": "string" + }, + "required": true, + "description": "Transaction ID" + } + ], + "summary": "Performs the transaction cancellation", + "responses": { + "202": { + "description": "Transaction cancellation request successfully accepted" + }, + "404": { + "description": "Transaction not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + }, + "409": { + "description": "Transaction already processed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + }, + "504": { + "description": "Timeout from PagoPA services", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + } + } + } + }, "/transactions": { "post": { "operationId": "newTransaction", @@ -221,6 +350,37 @@ ] } }, + "TransactionInfo": { + "description": "Transaction data returned when querying for an existing transaction", + "allOf": [ + { + "$ref": "#/components/schemas/NewTransactionResponse" + }, + { + "type": "object", + "properties": { + "closePaymentResultError": { + "type": "object", + "description": "Error details for close payment result", + "properties": { + "statusCode": { + "type": "number" + }, + "description": { + "type": "string" + } + } + }, + "feeTotal": { + "$ref": "#/components/schemas/AmountEuroCents" + } + }, + "required": [ + "status" + ] + } + ] + }, "NewTransactionRequest": { "description": "Request body for creating a new transaction", "type": "object", From 7971c2bbeb731557d15ca48a9205be9dd0c24107 Mon Sep 17 00:00:00 2001 From: EmanueleBVtech Date: Tue, 10 Dec 2024 12:24:57 +0100 Subject: [PATCH 11/52] moving to v2 --- .../v1/_openapi.json.tpl | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/domains/ecommerce-app/api/ecommerce-transactions-service/v1/_openapi.json.tpl b/src/domains/ecommerce-app/api/ecommerce-transactions-service/v1/_openapi.json.tpl index f269e352a..d0175d992 100644 --- a/src/domains/ecommerce-app/api/ecommerce-transactions-service/v1/_openapi.json.tpl +++ b/src/domains/ecommerce-app/api/ecommerce-transactions-service/v1/_openapi.json.tpl @@ -841,18 +841,6 @@ { "type": "object", "properties": { - "closePaymentResultError": { - "type": "object", - "description": "Error details for close payment result", - "properties": { - "statusCode": { - "type": "number" - }, - "description": { - "type": "string" - } - } - }, "feeTotal": { "$ref": "#/components/schemas/AmountEuroCents" } From 3d9539609c287082308dcd6fd284f26f9c5b93a8 Mon Sep 17 00:00:00 2001 From: EmanueleBVtech Date: Tue, 10 Dec 2024 12:26:41 +0100 Subject: [PATCH 12/52] moving to v2 --- .../ecommerce-webview/v1/_openapi.json.tpl | 12 - .../ecommerce-webview/v2/_openapi.json.tpl | 384 ++++++++++++++++++ 2 files changed, 384 insertions(+), 12 deletions(-) create mode 100644 src/domains/ecommerce-app/api/ecommerce-webview/v2/_openapi.json.tpl diff --git a/src/domains/ecommerce-app/api/ecommerce-webview/v1/_openapi.json.tpl b/src/domains/ecommerce-app/api/ecommerce-webview/v1/_openapi.json.tpl index 4935a0d1c..64ea0b282 100644 --- a/src/domains/ecommerce-app/api/ecommerce-webview/v1/_openapi.json.tpl +++ b/src/domains/ecommerce-app/api/ecommerce-webview/v1/_openapi.json.tpl @@ -319,18 +319,6 @@ { "type": "object", "properties": { - "closePaymentResultError": { - "type": "object", - "description": "Error details for close payment result", - "properties": { - "statusCode": { - "type": "number" - }, - "description": { - "type": "string" - } - } - }, "status": { "$ref": "#/components/schemas/TransactionStatus" }, diff --git a/src/domains/ecommerce-app/api/ecommerce-webview/v2/_openapi.json.tpl b/src/domains/ecommerce-app/api/ecommerce-webview/v2/_openapi.json.tpl new file mode 100644 index 000000000..4935a0d1c --- /dev/null +++ b/src/domains/ecommerce-app/api/ecommerce-webview/v2/_openapi.json.tpl @@ -0,0 +1,384 @@ +{ + "openapi": "3.0.0", + "info": { + "version": "0.0.1", + "title": "Pagopa eCommerce services for app IO", + "description": "API's exposed from eCommerce services to io webview to allow get transaction.", + "contact": { + "name": "pagoPA - Touchpoints team" + } + }, + "tags": [ + { + "name": "ecommerce-transactions", + "description": "Api's for performing a transaction", + "externalDocs": { + "url": "https://pagopa.atlassian.net/wiki/spaces/I/pages/611287199/-servizio+transactions+service", + "description": "Technical specifications" + } + } + ], + "servers": [ + { + "url": "https://${host}" + } + ], + "externalDocs": { + "url": "https://pagopa.atlassian.net/wiki/spaces/I/pages/492339720/pagoPA+eCommerce+Design+Review", + "description": "Design review" + }, + "paths": { + "/transactions/{transactionId}": { + "get": { + "tags": [ + "ecommerce-transactions" + ], + "operationId": "getTransactionInfo", + "parameters": [ + { + "in": "path", + "name": "transactionId", + "schema": { + "type": "string" + }, + "required": true, + "description": "Transaction ID" + } + ], + "security": [ + { + "eCommerceSessionToken": [] + } + ], + "summary": "Get transaction information", + "description": "Return information for the input specific transaction resource", + "responses": { + "200": { + "description": "Transaction data successfully retrieved", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TransactionInfo" + } + } + } + }, + "400": { + "description": "Invalid transaction id", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + }, + "401": { + "description": "Unauthorized, access token missing or invalid" + }, + "404": { + "description": "Transaction not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + }, + "504": { + "description": "Gateway timeout", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "ProblemJson": { + "type": "object", + "properties": { + "type": { + "type": "string", + "format": "uri", + "description": "An absolute URI that identifies the problem type. When dereferenced,\nit SHOULD provide human-readable documentation for the problem type\n(e.g., using HTML).", + "default": "about:blank", + "example": "https://example.com/problem/constraint-violation" + }, + "title": { + "type": "string", + "description": "A short, summary of the problem type. Written in english and readable\nfor engineers (usually not suited for non technical stakeholders and\nnot localized); example: Service Unavailable" + }, + "status": { + "$ref": "#/components/schemas/HttpStatusCode" + }, + "detail": { + "type": "string", + "description": "A human readable explanation specific to this occurrence of the\nproblem.", + "example": "There was an error processing the request" + }, + "instance": { + "type": "string", + "format": "uri", + "description": "An absolute URI that identifies the specific occurrence of the problem.\nIt may or may not yield further information if dereferenced." + } + } + }, + "HttpStatusCode": { + "type": "integer", + "format": "int32", + "description": "The HTTP status code generated by the origin server for this occurrence\nof the problem.", + "minimum": 100, + "maximum": 600, + "exclusiveMaximum": true, + "example": 500 + }, + "RptId": { + "type": "string", + "pattern": "([a-zA-Z0-9]{1,35})|(RFd{2}[a-zA-Z0-9]{1,21})" + }, + "PaymentInfo": { + "description": "Informations about transaction payments", + "type": "object", + "properties": { + "paymentToken": { + "type": "string" + }, + "rptId": { + "$ref": "#/components/schemas/RptId" + }, + "reason": { + "type": "string" + }, + "amount": { + "$ref": "#/components/schemas/AmountEuroCents" + }, + "isAllCCP": { + "description": "Flag for the inclusion of Poste bundles. false -> excluded, true -> included", + "type": "boolean" + }, + "transferList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Transfer" + }, + "minItems": 1, + "maxItems": 5 + } + }, + "required": [ + "rptId", + "amount" + ], + "example": { + "rptId": "77777777777302012387654312384", + "paymentToken": "paymentToken1", + "reason": "reason1", + "amount": 600, + "authToken": "authToken1", + "isAllCCP": false, + "transferList": [ + { + "paFiscalCode": "77777777777", + "digitalStamp": false, + "transferCategory": "transferCategory1", + "transferAmount": 500 + }, + { + "paFiscalCode": "11111111111", + "digitalStamp": true, + "transferCategory": "transferCategory2", + "transferAmount": 100 + } + ] + } + }, + "NewTransactionResponse": { + "type": "object", + "description": "Transaction data returned when creating a new transaction", + "properties": { + "transactionId": { + "type": "string" + }, + "payments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PaymentInfo" + }, + "minItems": 1, + "maxItems": 1, + "example": [ + { + "rptId": "77777777777302012387654312384", + "paymentToken": "paymentToken1", + "reason": "reason1", + "amount": 600, + "transferList": [ + { + "paFiscalCode": "77777777777", + "digitalStamp": false, + "transferCategory": "transferCategory1", + "transferAmount": 500 + }, + { + "paFiscalCode": "11111111111", + "digitalStamp": true, + "transferCategory": "transferCategory2", + "transferAmount": 100 + } + ] + } + ] + }, + "status": { + "$ref": "#/components/schemas/TransactionStatus" + }, + "feeTotal": { + "$ref": "#/components/schemas/AmountEuroCents" + }, + "clientId": { + "description": "transaction client id", + "type": "string", + "enum": [ + "IO" + ] + }, + "sendPaymentResultOutcome": { + "description": "The outcome of sendPaymentResult api (OK, KO, NOT_RECEIVED)", + "type": "string", + "enum": [ + "OK", + "KO", + "NOT_RECEIVED" + ] + }, + "authorizationCode": { + "type": "string", + "description": "Payment gateway-specific authorization code related to the transaction" + }, + "errorCode": { + "type": "string", + "description": "Payment gateway-specific error code from the gateway" + }, + "gateway": { + "type": "string", + "pattern": "XPAY|VPOS|NPG|REDIRECT", + "description": "Pgs identifier" + } + }, + "required": [ + "transactionId", + "status", + "payments" + ] + }, + "AmountEuroCents": { + "description": "Amount for payments, in euro cents", + "type": "integer", + "minimum": 0, + "maximum": 99999999 + }, + "TransactionStatus": { + "type": "string", + "description": "Possible statuses a transaction can be in", + "enum": [ + "ACTIVATED", + "AUTHORIZATION_REQUESTED", + "AUTHORIZATION_COMPLETED", + "CLOSURE_REQUESTED", + "CLOSED", + "CLOSURE_ERROR", + "NOTIFIED_OK", + "NOTIFIED_KO", + "NOTIFICATION_ERROR", + "NOTIFICATION_REQUESTED", + "EXPIRED", + "REFUNDED", + "CANCELED", + "EXPIRED_NOT_AUTHORIZED", + "UNAUTHORIZED", + "REFUND_ERROR", + "REFUND_REQUESTED", + "CANCELLATION_REQUESTED", + "CANCELLATION_EXPIRED" + ] + }, + "TransactionInfo": { + "description": "Transaction data returned when querying for an existing transaction", + "allOf": [ + { + "$ref": "#/components/schemas/NewTransactionResponse" + }, + { + "type": "object", + "properties": { + "closePaymentResultError": { + "type": "object", + "description": "Error details for close payment result", + "properties": { + "statusCode": { + "type": "number" + }, + "description": { + "type": "string" + } + } + }, + "status": { + "$ref": "#/components/schemas/TransactionStatus" + }, + "gatewayAuthorizationStatus": { + "type": "string", + "description": "Payment gateway authorization status" + } + }, + "required": [ + "status" + ] + } + ] + }, + "Transfer": { + "type": "object", + "description": "The dto that contains information about the creditor entities", + "properties": { + "paFiscalCode": { + "type": "string", + "description": "The creditor institution fiscal code", + "pattern": "^[a-zA-Z0-9]{11}" + }, + "digitalStamp": { + "type": "boolean", + "description": "True if it is a digital stamp. False otherwise" + }, + "transferCategory": { + "type": "string", + "description": "The taxonomy of the transfer" + }, + "transferAmount": { + "$ref": "#/components/schemas/AmountEuroCents" + } + }, + "required": [ + "paFiscalCode", + "digitalStamp", + "transferAmount" + ] + } + }, + "securitySchemes": { + "eCommerceSessionToken": { + "type": "http", + "scheme": "bearer", + "description": "JWT session token taken from /sessions response body" + } + } + } +} \ No newline at end of file From 65bd87228b03c9a2596ce22057bb638d616eb660 Mon Sep 17 00:00:00 2001 From: EmanueleBVtech Date: Tue, 10 Dec 2024 12:29:04 +0100 Subject: [PATCH 13/52] fix --- .../ecommerce-checkout/v2/_openapi.json.tpl | 71 ------------------- .../v2/_openapi.json.tpl | 63 ---------------- 2 files changed, 134 deletions(-) diff --git a/src/domains/ecommerce-app/api/ecommerce-checkout/v2/_openapi.json.tpl b/src/domains/ecommerce-app/api/ecommerce-checkout/v2/_openapi.json.tpl index 4ebdeb568..fa91b8660 100644 --- a/src/domains/ecommerce-app/api/ecommerce-checkout/v2/_openapi.json.tpl +++ b/src/domains/ecommerce-app/api/ecommerce-checkout/v2/_openapi.json.tpl @@ -98,77 +98,6 @@ } } }, - "delete": { - "tags": [ - "ecommerce-transactions" - ], - "operationId": "requestTransactionUserCancellation", - "parameters": [ - { - "in": "path", - "name": "transactionId", - "schema": { - "type": "string" - }, - "required": true, - "description": "Transaction ID" - } - ], - "security": [ - { - "bearerAuth": [] - } - ], - "summary": "Performs the transaction cancellation", - "responses": { - "202": { - "description": "Transaction cancellation request successfully accepted" - }, - "401": { - "description": "Unauthorized, access token missing or invalid" - }, - "404": { - "description": "Transaction not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - }, - "409": { - "description": "Transaction already processed", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - }, - "500": { - "description": "Internal server error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - }, - "504": { - "description": "Timeout from PagoPA services", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - } - } - } }, "/transactions": { "post": { diff --git a/src/domains/ecommerce-app/api/ecommerce-transactions-service/v2/_openapi.json.tpl b/src/domains/ecommerce-app/api/ecommerce-transactions-service/v2/_openapi.json.tpl index 6f42895fc..0add03c8e 100644 --- a/src/domains/ecommerce-app/api/ecommerce-transactions-service/v2/_openapi.json.tpl +++ b/src/domains/ecommerce-app/api/ecommerce-transactions-service/v2/_openapi.json.tpl @@ -97,69 +97,6 @@ } } } - }, - "delete": { - "tags": [ - "transactions" - ], - "operationId": "requestTransactionUserCancellation", - "parameters": [ - { - "in": "path", - "name": "transactionId", - "schema": { - "type": "string" - }, - "required": true, - "description": "Transaction ID" - } - ], - "summary": "Performs the transaction cancellation", - "responses": { - "202": { - "description": "Transaction cancellation request successfully accepted" - }, - "404": { - "description": "Transaction not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - }, - "409": { - "description": "Transaction already processed", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - }, - "500": { - "description": "Internal server error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - }, - "504": { - "description": "Timeout from PagoPA services", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - } - } } }, "/transactions": { From 53222c42555326dfd5ce0d8dd2a529747ada1658 Mon Sep 17 00:00:00 2001 From: EmanueleBVtech Date: Tue, 10 Dec 2024 12:53:01 +0100 Subject: [PATCH 14/52] cloned parameters from NewTransactionResponse --- .../ecommerce-checkout/v2/_openapi.json.tpl | 114 ++++++++++++++---- .../api/ecommerce-io/v2/_openapi.json.tpl | 114 ++++++++++++++---- .../v2/_openapi.json.tpl | 110 +++++++++++++---- .../ecommerce-webview/v2/_openapi.json.tpl | 114 ++++++++++++++---- 4 files changed, 356 insertions(+), 96 deletions(-) diff --git a/src/domains/ecommerce-app/api/ecommerce-checkout/v2/_openapi.json.tpl b/src/domains/ecommerce-app/api/ecommerce-checkout/v2/_openapi.json.tpl index fa91b8660..23aac74a3 100644 --- a/src/domains/ecommerce-app/api/ecommerce-checkout/v2/_openapi.json.tpl +++ b/src/domains/ecommerce-app/api/ecommerce-checkout/v2/_openapi.json.tpl @@ -424,37 +424,101 @@ }, "TransactionInfo": { "description": "Transaction data returned when querying for an existing transaction", - "allOf": [ - { - "$ref": "#/components/schemas/NewTransactionResponse" + "type": "object", + "properties": { + "transactionId": { + "type": "string" }, - { - "type": "object", - "properties": { - "closePaymentResultError": { - "type": "object", - "description": "Error details for close payment result", - "properties": { - "statusCode": { - "type": "number" + "payments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PaymentInfo" + }, + "minItems": 1, + "maxItems": 1, + "example": [ + { + "rptId": "77777777777302012387654312384", + "paymentToken": "paymentToken1", + "reason": "reason1", + "amount": 600, + "transferList": [ + { + "paFiscalCode": "77777777777", + "digitalStamp": false, + "transferCategory": "transferCategory1", + "transferAmount": 500 }, - "description": { - "type": "string" + { + "paFiscalCode": "11111111111", + "digitalStamp": true, + "transferCategory": "transferCategory2", + "transferAmount": 100 } - } - }, - "status": { - "$ref": "#/components/schemas/TransactionStatus" - }, - "gatewayAuthorizationStatus": { - "type": "string", - "description": "Payment gateway authorization status" + ] } - }, - "required": [ - "status" ] + }, + "status": { + "$ref": "#/components/schemas/TransactionStatus" + }, + "feeTotal": { + "$ref": "#/components/schemas/AmountEuroCents" + }, + "clientId": { + "description": "transaction client id", + "type": "string", + "enum": [ + "IO" + ] + }, + "sendPaymentResultOutcome": { + "description": "The outcome of sendPaymentResult api (OK, KO, NOT_RECEIVED)", + "type": "string", + "enum": [ + "OK", + "KO", + "NOT_RECEIVED" + ] + }, + "authorizationCode": { + "type": "string", + "description": "Payment gateway-specific authorization code related to the transaction" + }, + "errorCode": { + "type": "string", + "description": "Payment gateway-specific error code from the gateway" + }, + "gateway": { + "type": "string", + "pattern": "XPAY|VPOS|NPG|REDIRECT", + "description": "Pgs identifier" + }, + "closePaymentResultError": { + "type": "object", + "description": "Error details for close payment result", + "properties": { + "statusCode": { + "type": "number" + }, + "description": { + "type": "string" + } + } + }, + "status": { + "$ref": "#/components/schemas/TransactionStatus" + }, + "gatewayAuthorizationStatus": { + "type": "string", + "description": "Payment gateway authorization status" } + }, + "required": [ + "status", + "transactionId", + "status", + "payments" ] }, "ValidationFaultPaymentUnknownProblemJson": { diff --git a/src/domains/ecommerce-app/api/ecommerce-io/v2/_openapi.json.tpl b/src/domains/ecommerce-app/api/ecommerce-io/v2/_openapi.json.tpl index 318f5dbfe..b4dbfbbcc 100644 --- a/src/domains/ecommerce-app/api/ecommerce-io/v2/_openapi.json.tpl +++ b/src/domains/ecommerce-app/api/ecommerce-io/v2/_openapi.json.tpl @@ -1712,37 +1712,101 @@ }, "TransactionInfo": { "description": "Transaction data returned when querying for an existing transaction", - "allOf": [ - { - "$ref": "#/components/schemas/NewTransactionResponse" + "type": "object", + "properties": { + "transactionId": { + "type": "string" }, - { - "type": "object", - "properties": { - "closePaymentResultError": { - "type": "object", - "description": "Error details for close payment result", - "properties": { - "statusCode": { - "type": "number" + "payments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PaymentInfo" + }, + "minItems": 1, + "maxItems": 1, + "example": [ + { + "rptId": "77777777777302012387654312384", + "paymentToken": "paymentToken1", + "reason": "reason1", + "amount": 600, + "transferList": [ + { + "paFiscalCode": "77777777777", + "digitalStamp": false, + "transferCategory": "transferCategory1", + "transferAmount": 500 }, - "description": { - "type": "string" + { + "paFiscalCode": "11111111111", + "digitalStamp": true, + "transferCategory": "transferCategory2", + "transferAmount": 100 } - } - }, - "status": { - "$ref": "#/components/schemas/TransactionStatus" - }, - "gatewayAuthorizationStatus": { - "type": "string", - "description": "payment gateway authorization status" + ] } - }, - "required": [ - "status" ] + }, + "status": { + "$ref": "#/components/schemas/TransactionStatus" + }, + "feeTotal": { + "$ref": "#/components/schemas/AmountEuroCents" + }, + "clientId": { + "description": "transaction client id", + "type": "string", + "enum": [ + "IO" + ] + }, + "sendPaymentResultOutcome": { + "description": "The outcome of sendPaymentResult api (OK, KO, NOT_RECEIVED)", + "type": "string", + "enum": [ + "OK", + "KO", + "NOT_RECEIVED" + ] + }, + "authorizationCode": { + "type": "string", + "description": "Payment gateway-specific authorization code related to the transaction" + }, + "errorCode": { + "type": "string", + "description": "Payment gateway-specific error code from the gateway" + }, + "gateway": { + "type": "string", + "pattern": "XPAY|VPOS|NPG|REDIRECT", + "description": "Pgs identifier" + }, + "closePaymentResultError": { + "type": "object", + "description": "Error details for close payment result", + "properties": { + "statusCode": { + "type": "number" + }, + "description": { + "type": "string" + } + } + }, + "status": { + "$ref": "#/components/schemas/TransactionStatus" + }, + "gatewayAuthorizationStatus": { + "type": "string", + "description": "Payment gateway authorization status" } + }, + "required": [ + "status", + "transactionId", + "status", + "payments" ] }, "AmountEuroCents": { diff --git a/src/domains/ecommerce-app/api/ecommerce-transactions-service/v2/_openapi.json.tpl b/src/domains/ecommerce-app/api/ecommerce-transactions-service/v2/_openapi.json.tpl index 0add03c8e..1b8aa76c6 100644 --- a/src/domains/ecommerce-app/api/ecommerce-transactions-service/v2/_openapi.json.tpl +++ b/src/domains/ecommerce-app/api/ecommerce-transactions-service/v2/_openapi.json.tpl @@ -289,33 +289,101 @@ }, "TransactionInfo": { "description": "Transaction data returned when querying for an existing transaction", - "allOf": [ - { - "$ref": "#/components/schemas/NewTransactionResponse" + "type": "object", + "properties": { + "transactionId": { + "type": "string" }, - { - "type": "object", - "properties": { - "closePaymentResultError": { - "type": "object", - "description": "Error details for close payment result", - "properties": { - "statusCode": { - "type": "number" + "payments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PaymentInfo" + }, + "minItems": 1, + "maxItems": 1, + "example": [ + { + "rptId": "77777777777302012387654312384", + "paymentToken": "paymentToken1", + "reason": "reason1", + "amount": 600, + "transferList": [ + { + "paFiscalCode": "77777777777", + "digitalStamp": false, + "transferCategory": "transferCategory1", + "transferAmount": 500 }, - "description": { - "type": "string" + { + "paFiscalCode": "11111111111", + "digitalStamp": true, + "transferCategory": "transferCategory2", + "transferAmount": 100 } - } - }, - "feeTotal": { - "$ref": "#/components/schemas/AmountEuroCents" + ] } - }, - "required": [ - "status" ] + }, + "status": { + "$ref": "#/components/schemas/TransactionStatus" + }, + "feeTotal": { + "$ref": "#/components/schemas/AmountEuroCents" + }, + "clientId": { + "description": "transaction client id", + "type": "string", + "enum": [ + "IO" + ] + }, + "sendPaymentResultOutcome": { + "description": "The outcome of sendPaymentResult api (OK, KO, NOT_RECEIVED)", + "type": "string", + "enum": [ + "OK", + "KO", + "NOT_RECEIVED" + ] + }, + "authorizationCode": { + "type": "string", + "description": "Payment gateway-specific authorization code related to the transaction" + }, + "errorCode": { + "type": "string", + "description": "Payment gateway-specific error code from the gateway" + }, + "gateway": { + "type": "string", + "pattern": "XPAY|VPOS|NPG|REDIRECT", + "description": "Pgs identifier" + }, + "closePaymentResultError": { + "type": "object", + "description": "Error details for close payment result", + "properties": { + "statusCode": { + "type": "number" + }, + "description": { + "type": "string" + } + } + }, + "status": { + "$ref": "#/components/schemas/TransactionStatus" + }, + "gatewayAuthorizationStatus": { + "type": "string", + "description": "Payment gateway authorization status" } + }, + "required": [ + "status", + "transactionId", + "status", + "payments" ] }, "NewTransactionRequest": { diff --git a/src/domains/ecommerce-app/api/ecommerce-webview/v2/_openapi.json.tpl b/src/domains/ecommerce-app/api/ecommerce-webview/v2/_openapi.json.tpl index 4935a0d1c..a1b77439e 100644 --- a/src/domains/ecommerce-app/api/ecommerce-webview/v2/_openapi.json.tpl +++ b/src/domains/ecommerce-app/api/ecommerce-webview/v2/_openapi.json.tpl @@ -312,37 +312,101 @@ }, "TransactionInfo": { "description": "Transaction data returned when querying for an existing transaction", - "allOf": [ - { - "$ref": "#/components/schemas/NewTransactionResponse" + "type": "object", + "properties": { + "transactionId": { + "type": "string" }, - { - "type": "object", - "properties": { - "closePaymentResultError": { - "type": "object", - "description": "Error details for close payment result", - "properties": { - "statusCode": { - "type": "number" + "payments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PaymentInfo" + }, + "minItems": 1, + "maxItems": 1, + "example": [ + { + "rptId": "77777777777302012387654312384", + "paymentToken": "paymentToken1", + "reason": "reason1", + "amount": 600, + "transferList": [ + { + "paFiscalCode": "77777777777", + "digitalStamp": false, + "transferCategory": "transferCategory1", + "transferAmount": 500 }, - "description": { - "type": "string" + { + "paFiscalCode": "11111111111", + "digitalStamp": true, + "transferCategory": "transferCategory2", + "transferAmount": 100 } - } - }, - "status": { - "$ref": "#/components/schemas/TransactionStatus" - }, - "gatewayAuthorizationStatus": { - "type": "string", - "description": "Payment gateway authorization status" + ] } - }, - "required": [ - "status" ] + }, + "status": { + "$ref": "#/components/schemas/TransactionStatus" + }, + "feeTotal": { + "$ref": "#/components/schemas/AmountEuroCents" + }, + "clientId": { + "description": "transaction client id", + "type": "string", + "enum": [ + "IO" + ] + }, + "sendPaymentResultOutcome": { + "description": "The outcome of sendPaymentResult api (OK, KO, NOT_RECEIVED)", + "type": "string", + "enum": [ + "OK", + "KO", + "NOT_RECEIVED" + ] + }, + "authorizationCode": { + "type": "string", + "description": "Payment gateway-specific authorization code related to the transaction" + }, + "errorCode": { + "type": "string", + "description": "Payment gateway-specific error code from the gateway" + }, + "gateway": { + "type": "string", + "pattern": "XPAY|VPOS|NPG|REDIRECT", + "description": "Pgs identifier" + }, + "closePaymentResultError": { + "type": "object", + "description": "Error details for close payment result", + "properties": { + "statusCode": { + "type": "number" + }, + "description": { + "type": "string" + } + } + }, + "status": { + "$ref": "#/components/schemas/TransactionStatus" + }, + "gatewayAuthorizationStatus": { + "type": "string", + "description": "Payment gateway authorization status" } + }, + "required": [ + "status", + "transactionId", + "status", + "payments" ] }, "Transfer": { From 92bb2e3a22b4b06106a7591ecffaafbcf6137399 Mon Sep 17 00:00:00 2001 From: EmanueleBVtech Date: Tue, 10 Dec 2024 12:53:19 +0100 Subject: [PATCH 15/52] cloned parameters from NewTransactionResponse --- .../ecommerce-webview/v2/_openapi.json.tpl | 98 +++++++++++++++++++ 1 file changed, 98 insertions(+) diff --git a/src/domains/ecommerce-app/api/ecommerce-webview/v2/_openapi.json.tpl b/src/domains/ecommerce-app/api/ecommerce-webview/v2/_openapi.json.tpl index a1b77439e..d203332aa 100644 --- a/src/domains/ecommerce-app/api/ecommerce-webview/v2/_openapi.json.tpl +++ b/src/domains/ecommerce-app/api/ecommerce-webview/v2/_openapi.json.tpl @@ -278,6 +278,104 @@ "status", "payments" ] + }, "TransactionInfo": { + "description": "Transaction data returned when querying for an existing transaction", + "type": "object", + "properties": { + "transactionId": { + "type": "string" + }, + "payments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PaymentInfo" + }, + "minItems": 1, + "maxItems": 1, + "example": [ + { + "rptId": "77777777777302012387654312384", + "paymentToken": "paymentToken1", + "reason": "reason1", + "amount": 600, + "transferList": [ + { + "paFiscalCode": "77777777777", + "digitalStamp": false, + "transferCategory": "transferCategory1", + "transferAmount": 500 + }, + { + "paFiscalCode": "11111111111", + "digitalStamp": true, + "transferCategory": "transferCategory2", + "transferAmount": 100 + } + ] + } + ] + }, + "status": { + "$ref": "#/components/schemas/TransactionStatus" + }, + "feeTotal": { + "$ref": "#/components/schemas/AmountEuroCents" + }, + "clientId": { + "description": "transaction client id", + "type": "string", + "enum": [ + "IO" + ] + }, + "sendPaymentResultOutcome": { + "description": "The outcome of sendPaymentResult api (OK, KO, NOT_RECEIVED)", + "type": "string", + "enum": [ + "OK", + "KO", + "NOT_RECEIVED" + ] + }, + "authorizationCode": { + "type": "string", + "description": "Payment gateway-specific authorization code related to the transaction" + }, + "errorCode": { + "type": "string", + "description": "Payment gateway-specific error code from the gateway" + }, + "gateway": { + "type": "string", + "pattern": "XPAY|VPOS|NPG|REDIRECT", + "description": "Pgs identifier" + }, + "closePaymentResultError": { + "type": "object", + "description": "Error details for close payment result", + "properties": { + "statusCode": { + "type": "number" + }, + "description": { + "type": "string" + } + } + }, + "status": { + "$ref": "#/components/schemas/TransactionStatus" + }, + "gatewayAuthorizationStatus": { + "type": "string", + "description": "Payment gateway authorization status" + } + }, + "required": [ + "status", + "transactionId", + "status", + "payments" + ] }, "AmountEuroCents": { "description": "Amount for payments, in euro cents", From b16b0000d109a58a39e868e83cef3861eb8966d9 Mon Sep 17 00:00:00 2001 From: EmanueleBVtech Date: Tue, 10 Dec 2024 14:11:41 +0100 Subject: [PATCH 16/52] united gateway items --- .../ecommerce-checkout/v2/_openapi.json.tpl | 22 ++- .../api/ecommerce-io/v2/_openapi.json.tpl | 22 ++- .../v2/_openapi.json.tpl | 22 ++- .../ecommerce-webview/v2/_openapi.json.tpl | 138 +++--------------- 4 files changed, 65 insertions(+), 139 deletions(-) diff --git a/src/domains/ecommerce-app/api/ecommerce-checkout/v2/_openapi.json.tpl b/src/domains/ecommerce-app/api/ecommerce-checkout/v2/_openapi.json.tpl index 23aac74a3..6e6992cdb 100644 --- a/src/domains/ecommerce-app/api/ecommerce-checkout/v2/_openapi.json.tpl +++ b/src/domains/ecommerce-app/api/ecommerce-checkout/v2/_openapi.json.tpl @@ -489,10 +489,20 @@ "type": "string", "description": "Payment gateway-specific error code from the gateway" }, - "gateway": { - "type": "string", - "pattern": "XPAY|VPOS|NPG|REDIRECT", - "description": "Pgs identifier" + "gateway":{ + "type": "object", + "description": "Gateway infos", + "properties": { + "gatewayType": { + "type": "string", + "pattern": "XPAY|VPOS|NPG|REDIRECT", + "description": "Pgs identifier" + }, + "gatewayAuthorizationStatus": { + "type": "string", + "description": "Payment gateway authorization status" + } + } }, "closePaymentResultError": { "type": "object", @@ -509,10 +519,6 @@ "status": { "$ref": "#/components/schemas/TransactionStatus" }, - "gatewayAuthorizationStatus": { - "type": "string", - "description": "Payment gateway authorization status" - } }, "required": [ "status", diff --git a/src/domains/ecommerce-app/api/ecommerce-io/v2/_openapi.json.tpl b/src/domains/ecommerce-app/api/ecommerce-io/v2/_openapi.json.tpl index b4dbfbbcc..96d0a6b45 100644 --- a/src/domains/ecommerce-app/api/ecommerce-io/v2/_openapi.json.tpl +++ b/src/domains/ecommerce-app/api/ecommerce-io/v2/_openapi.json.tpl @@ -1777,10 +1777,20 @@ "type": "string", "description": "Payment gateway-specific error code from the gateway" }, - "gateway": { - "type": "string", - "pattern": "XPAY|VPOS|NPG|REDIRECT", - "description": "Pgs identifier" + "gateway":{ + "type": "object", + "description": "Gateway infos", + "properties": { + "gatewayType": { + "type": "string", + "pattern": "XPAY|VPOS|NPG|REDIRECT", + "description": "Pgs identifier" + }, + "gatewayAuthorizationStatus": { + "type": "string", + "description": "Payment gateway authorization status" + } + } }, "closePaymentResultError": { "type": "object", @@ -1797,10 +1807,6 @@ "status": { "$ref": "#/components/schemas/TransactionStatus" }, - "gatewayAuthorizationStatus": { - "type": "string", - "description": "Payment gateway authorization status" - } }, "required": [ "status", diff --git a/src/domains/ecommerce-app/api/ecommerce-transactions-service/v2/_openapi.json.tpl b/src/domains/ecommerce-app/api/ecommerce-transactions-service/v2/_openapi.json.tpl index 1b8aa76c6..915de978a 100644 --- a/src/domains/ecommerce-app/api/ecommerce-transactions-service/v2/_openapi.json.tpl +++ b/src/domains/ecommerce-app/api/ecommerce-transactions-service/v2/_openapi.json.tpl @@ -354,10 +354,20 @@ "type": "string", "description": "Payment gateway-specific error code from the gateway" }, - "gateway": { - "type": "string", - "pattern": "XPAY|VPOS|NPG|REDIRECT", - "description": "Pgs identifier" + "gateway":{ + "type": "object", + "description": "Gateway infos", + "properties": { + "gatewayType": { + "type": "string", + "pattern": "XPAY|VPOS|NPG|REDIRECT", + "description": "Pgs identifier" + }, + "gatewayAuthorizationStatus": { + "type": "string", + "description": "Payment gateway authorization status" + } + } }, "closePaymentResultError": { "type": "object", @@ -374,10 +384,6 @@ "status": { "$ref": "#/components/schemas/TransactionStatus" }, - "gatewayAuthorizationStatus": { - "type": "string", - "description": "Payment gateway authorization status" - } }, "required": [ "status", diff --git a/src/domains/ecommerce-app/api/ecommerce-webview/v2/_openapi.json.tpl b/src/domains/ecommerce-app/api/ecommerce-webview/v2/_openapi.json.tpl index d203332aa..33bbdf820 100644 --- a/src/domains/ecommerce-app/api/ecommerce-webview/v2/_openapi.json.tpl +++ b/src/domains/ecommerce-app/api/ecommerce-webview/v2/_openapi.json.tpl @@ -278,7 +278,8 @@ "status", "payments" ] - }, "TransactionInfo": { + }, + "TransactionInfo": { "description": "Transaction data returned when querying for an existing transaction", "type": "object", "properties": { @@ -328,6 +329,18 @@ "IO" ] }, + "closePaymentResultError": { + "type": "object", + "description": "Error details for close payment result", + "properties": { + "statusCode": { + "type": "number" + }, + "description": { + "type": "string" + } + } + }, "sendPaymentResultOutcome": { "description": "The outcome of sendPaymentResult api (OK, KO, NOT_RECEIVED)", "type": "string", @@ -345,30 +358,24 @@ "type": "string", "description": "Payment gateway-specific error code from the gateway" }, - "gateway": { - "type": "string", - "pattern": "XPAY|VPOS|NPG|REDIRECT", - "description": "Pgs identifier" - }, - "closePaymentResultError": { + "gateway":{ "type": "object", - "description": "Error details for close payment result", + "description": "Gateway infos", "properties": { - "statusCode": { - "type": "number" + "gatewayType": { + "type": "string", + "pattern": "XPAY|VPOS|NPG|REDIRECT", + "description": "Pgs identifier" }, - "description": { - "type": "string" + "gatewayAuthorizationStatus": { + "type": "string", + "description": "Payment gateway authorization status" } } }, "status": { "$ref": "#/components/schemas/TransactionStatus" }, - "gatewayAuthorizationStatus": { - "type": "string", - "description": "Payment gateway authorization status" - } }, "required": [ "status", @@ -408,105 +415,6 @@ "CANCELLATION_EXPIRED" ] }, - "TransactionInfo": { - "description": "Transaction data returned when querying for an existing transaction", - "type": "object", - "properties": { - "transactionId": { - "type": "string" - }, - "payments": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PaymentInfo" - }, - "minItems": 1, - "maxItems": 1, - "example": [ - { - "rptId": "77777777777302012387654312384", - "paymentToken": "paymentToken1", - "reason": "reason1", - "amount": 600, - "transferList": [ - { - "paFiscalCode": "77777777777", - "digitalStamp": false, - "transferCategory": "transferCategory1", - "transferAmount": 500 - }, - { - "paFiscalCode": "11111111111", - "digitalStamp": true, - "transferCategory": "transferCategory2", - "transferAmount": 100 - } - ] - } - ] - }, - "status": { - "$ref": "#/components/schemas/TransactionStatus" - }, - "feeTotal": { - "$ref": "#/components/schemas/AmountEuroCents" - }, - "clientId": { - "description": "transaction client id", - "type": "string", - "enum": [ - "IO" - ] - }, - "sendPaymentResultOutcome": { - "description": "The outcome of sendPaymentResult api (OK, KO, NOT_RECEIVED)", - "type": "string", - "enum": [ - "OK", - "KO", - "NOT_RECEIVED" - ] - }, - "authorizationCode": { - "type": "string", - "description": "Payment gateway-specific authorization code related to the transaction" - }, - "errorCode": { - "type": "string", - "description": "Payment gateway-specific error code from the gateway" - }, - "gateway": { - "type": "string", - "pattern": "XPAY|VPOS|NPG|REDIRECT", - "description": "Pgs identifier" - }, - "closePaymentResultError": { - "type": "object", - "description": "Error details for close payment result", - "properties": { - "statusCode": { - "type": "number" - }, - "description": { - "type": "string" - } - } - }, - "status": { - "$ref": "#/components/schemas/TransactionStatus" - }, - "gatewayAuthorizationStatus": { - "type": "string", - "description": "Payment gateway authorization status" - } - }, - "required": [ - "status", - "transactionId", - "status", - "payments" - ] - }, "Transfer": { "type": "object", "description": "The dto that contains information about the creditor entities", From 7e3890bf9e95361e21eb3eedae395b1286731227 Mon Sep 17 00:00:00 2001 From: EmanueleBVtech Date: Tue, 10 Dec 2024 14:15:33 +0100 Subject: [PATCH 17/52] fix --- .../ecommerce-app/api/ecommerce-checkout/v2/_openapi.json.tpl | 3 --- .../ecommerce-app/api/ecommerce-io/v2/_openapi.json.tpl | 3 --- .../api/ecommerce-transactions-service/v2/_openapi.json.tpl | 3 --- .../ecommerce-app/api/ecommerce-webview/v2/_openapi.json.tpl | 3 --- 4 files changed, 12 deletions(-) diff --git a/src/domains/ecommerce-app/api/ecommerce-checkout/v2/_openapi.json.tpl b/src/domains/ecommerce-app/api/ecommerce-checkout/v2/_openapi.json.tpl index 6e6992cdb..5c400ae3f 100644 --- a/src/domains/ecommerce-app/api/ecommerce-checkout/v2/_openapi.json.tpl +++ b/src/domains/ecommerce-app/api/ecommerce-checkout/v2/_openapi.json.tpl @@ -516,9 +516,6 @@ } } }, - "status": { - "$ref": "#/components/schemas/TransactionStatus" - }, }, "required": [ "status", diff --git a/src/domains/ecommerce-app/api/ecommerce-io/v2/_openapi.json.tpl b/src/domains/ecommerce-app/api/ecommerce-io/v2/_openapi.json.tpl index 96d0a6b45..9dad2cbb8 100644 --- a/src/domains/ecommerce-app/api/ecommerce-io/v2/_openapi.json.tpl +++ b/src/domains/ecommerce-app/api/ecommerce-io/v2/_openapi.json.tpl @@ -1804,9 +1804,6 @@ } } }, - "status": { - "$ref": "#/components/schemas/TransactionStatus" - }, }, "required": [ "status", diff --git a/src/domains/ecommerce-app/api/ecommerce-transactions-service/v2/_openapi.json.tpl b/src/domains/ecommerce-app/api/ecommerce-transactions-service/v2/_openapi.json.tpl index 915de978a..1c6ff3d7c 100644 --- a/src/domains/ecommerce-app/api/ecommerce-transactions-service/v2/_openapi.json.tpl +++ b/src/domains/ecommerce-app/api/ecommerce-transactions-service/v2/_openapi.json.tpl @@ -381,9 +381,6 @@ } } }, - "status": { - "$ref": "#/components/schemas/TransactionStatus" - }, }, "required": [ "status", diff --git a/src/domains/ecommerce-app/api/ecommerce-webview/v2/_openapi.json.tpl b/src/domains/ecommerce-app/api/ecommerce-webview/v2/_openapi.json.tpl index 33bbdf820..c060ace95 100644 --- a/src/domains/ecommerce-app/api/ecommerce-webview/v2/_openapi.json.tpl +++ b/src/domains/ecommerce-app/api/ecommerce-webview/v2/_openapi.json.tpl @@ -373,9 +373,6 @@ } } }, - "status": { - "$ref": "#/components/schemas/TransactionStatus" - }, }, "required": [ "status", From ed9ecfdb0f7035999841f2bf4b648cc382a432f4 Mon Sep 17 00:00:00 2001 From: EmanueleBVtech Date: Tue, 10 Dec 2024 14:24:37 +0100 Subject: [PATCH 18/52] fix --- .../ecommerce-app/api/ecommerce-checkout/v2/_openapi.json.tpl | 1 - src/domains/ecommerce-app/api/ecommerce-io/v2/_openapi.json.tpl | 1 - .../api/ecommerce-transactions-service/v2/_openapi.json.tpl | 1 - .../ecommerce-app/api/ecommerce-webview/v2/_openapi.json.tpl | 1 - 4 files changed, 4 deletions(-) diff --git a/src/domains/ecommerce-app/api/ecommerce-checkout/v2/_openapi.json.tpl b/src/domains/ecommerce-app/api/ecommerce-checkout/v2/_openapi.json.tpl index 5c400ae3f..33a918845 100644 --- a/src/domains/ecommerce-app/api/ecommerce-checkout/v2/_openapi.json.tpl +++ b/src/domains/ecommerce-app/api/ecommerce-checkout/v2/_openapi.json.tpl @@ -520,7 +520,6 @@ "required": [ "status", "transactionId", - "status", "payments" ] }, diff --git a/src/domains/ecommerce-app/api/ecommerce-io/v2/_openapi.json.tpl b/src/domains/ecommerce-app/api/ecommerce-io/v2/_openapi.json.tpl index 9dad2cbb8..85baa112a 100644 --- a/src/domains/ecommerce-app/api/ecommerce-io/v2/_openapi.json.tpl +++ b/src/domains/ecommerce-app/api/ecommerce-io/v2/_openapi.json.tpl @@ -1808,7 +1808,6 @@ "required": [ "status", "transactionId", - "status", "payments" ] }, diff --git a/src/domains/ecommerce-app/api/ecommerce-transactions-service/v2/_openapi.json.tpl b/src/domains/ecommerce-app/api/ecommerce-transactions-service/v2/_openapi.json.tpl index 1c6ff3d7c..b1c492cc6 100644 --- a/src/domains/ecommerce-app/api/ecommerce-transactions-service/v2/_openapi.json.tpl +++ b/src/domains/ecommerce-app/api/ecommerce-transactions-service/v2/_openapi.json.tpl @@ -385,7 +385,6 @@ "required": [ "status", "transactionId", - "status", "payments" ] }, diff --git a/src/domains/ecommerce-app/api/ecommerce-webview/v2/_openapi.json.tpl b/src/domains/ecommerce-app/api/ecommerce-webview/v2/_openapi.json.tpl index c060ace95..22e1b11ee 100644 --- a/src/domains/ecommerce-app/api/ecommerce-webview/v2/_openapi.json.tpl +++ b/src/domains/ecommerce-app/api/ecommerce-webview/v2/_openapi.json.tpl @@ -377,7 +377,6 @@ "required": [ "status", "transactionId", - "status", "payments" ] }, From e5a4954834283723a003da64b69758dc71c4574c Mon Sep 17 00:00:00 2001 From: EmanueleBVtech Date: Tue, 10 Dec 2024 15:35:28 +0100 Subject: [PATCH 19/52] update --- .../ecommerce-checkout/v2/_openapi.json.tpl | 66 ++++++++++--------- .../api/ecommerce-io/v2/_openapi.json.tpl | 66 ++++++++++--------- .../v2/_openapi.json.tpl | 66 ++++++++++--------- .../ecommerce-webview/v2/_openapi.json.tpl | 60 +++++++++-------- 4 files changed, 141 insertions(+), 117 deletions(-) diff --git a/src/domains/ecommerce-app/api/ecommerce-checkout/v2/_openapi.json.tpl b/src/domains/ecommerce-app/api/ecommerce-checkout/v2/_openapi.json.tpl index 33a918845..8b7240df2 100644 --- a/src/domains/ecommerce-app/api/ecommerce-checkout/v2/_openapi.json.tpl +++ b/src/domains/ecommerce-app/api/ecommerce-checkout/v2/_openapi.json.tpl @@ -472,28 +472,38 @@ "IO" ] }, - "sendPaymentResultOutcome": { - "description": "The outcome of sendPaymentResult api (OK, KO, NOT_RECEIVED)", - "type": "string", - "enum": [ - "OK", - "KO", - "NOT_RECEIVED" - ] - }, - "authorizationCode": { - "type": "string", - "description": "Payment gateway-specific authorization code related to the transaction" - }, - "errorCode": { - "type": "string", - "description": "Payment gateway-specific error code from the gateway" + "nodeInfo":{ + "type": "object", + "description": "Gateway infos", + "properties": { + "closePaymentResultError": { + "type": "object", + "description": "Error details for close payment result", + "properties": { + "statusCode": { + "type": "number" + }, + "description": { + "type": "string" + } + } + }, + "sendPaymentResultOutcome": { + "description": "The outcome of sendPaymentResult api (OK, KO, NOT_RECEIVED)", + "type": "string", + "enum": [ + "OK", + "KO", + "NOT_RECEIVED" + ] + }, + } }, - "gateway":{ + "gatewayInfo":{ "type": "object", "description": "Gateway infos", "properties": { - "gatewayType": { + "gateway": { "type": "string", "pattern": "XPAY|VPOS|NPG|REDIRECT", "description": "Pgs identifier" @@ -501,19 +511,15 @@ "gatewayAuthorizationStatus": { "type": "string", "description": "Payment gateway authorization status" - } - } - }, - "closePaymentResultError": { - "type": "object", - "description": "Error details for close payment result", - "properties": { - "statusCode": { - "type": "number" }, - "description": { - "type": "string" - } + "authorizationCode": { + "type": "string", + "description": "Payment gateway-specific authorization code related to the transaction" + }, + "errorCode": { + "type": "string", + "description": "Payment gateway-specific error code from the gateway" + }, } }, }, diff --git a/src/domains/ecommerce-app/api/ecommerce-io/v2/_openapi.json.tpl b/src/domains/ecommerce-app/api/ecommerce-io/v2/_openapi.json.tpl index 85baa112a..438ffedbf 100644 --- a/src/domains/ecommerce-app/api/ecommerce-io/v2/_openapi.json.tpl +++ b/src/domains/ecommerce-app/api/ecommerce-io/v2/_openapi.json.tpl @@ -1760,28 +1760,38 @@ "IO" ] }, - "sendPaymentResultOutcome": { - "description": "The outcome of sendPaymentResult api (OK, KO, NOT_RECEIVED)", - "type": "string", - "enum": [ - "OK", - "KO", - "NOT_RECEIVED" - ] - }, - "authorizationCode": { - "type": "string", - "description": "Payment gateway-specific authorization code related to the transaction" - }, - "errorCode": { - "type": "string", - "description": "Payment gateway-specific error code from the gateway" + "nodeInfo":{ + "type": "object", + "description": "Gateway infos", + "properties": { + "closePaymentResultError": { + "type": "object", + "description": "Error details for close payment result", + "properties": { + "statusCode": { + "type": "number" + }, + "description": { + "type": "string" + } + } + }, + "sendPaymentResultOutcome": { + "description": "The outcome of sendPaymentResult api (OK, KO, NOT_RECEIVED)", + "type": "string", + "enum": [ + "OK", + "KO", + "NOT_RECEIVED" + ] + }, + } }, - "gateway":{ + "gatewayInfo":{ "type": "object", "description": "Gateway infos", "properties": { - "gatewayType": { + "gateway": { "type": "string", "pattern": "XPAY|VPOS|NPG|REDIRECT", "description": "Pgs identifier" @@ -1789,19 +1799,15 @@ "gatewayAuthorizationStatus": { "type": "string", "description": "Payment gateway authorization status" - } - } - }, - "closePaymentResultError": { - "type": "object", - "description": "Error details for close payment result", - "properties": { - "statusCode": { - "type": "number" }, - "description": { - "type": "string" - } + "authorizationCode": { + "type": "string", + "description": "Payment gateway-specific authorization code related to the transaction" + }, + "errorCode": { + "type": "string", + "description": "Payment gateway-specific error code from the gateway" + }, } }, }, diff --git a/src/domains/ecommerce-app/api/ecommerce-transactions-service/v2/_openapi.json.tpl b/src/domains/ecommerce-app/api/ecommerce-transactions-service/v2/_openapi.json.tpl index b1c492cc6..3c1dcce81 100644 --- a/src/domains/ecommerce-app/api/ecommerce-transactions-service/v2/_openapi.json.tpl +++ b/src/domains/ecommerce-app/api/ecommerce-transactions-service/v2/_openapi.json.tpl @@ -337,28 +337,38 @@ "IO" ] }, - "sendPaymentResultOutcome": { - "description": "The outcome of sendPaymentResult api (OK, KO, NOT_RECEIVED)", - "type": "string", - "enum": [ - "OK", - "KO", - "NOT_RECEIVED" - ] - }, - "authorizationCode": { - "type": "string", - "description": "Payment gateway-specific authorization code related to the transaction" - }, - "errorCode": { - "type": "string", - "description": "Payment gateway-specific error code from the gateway" + "nodeInfo":{ + "type": "object", + "description": "Gateway infos", + "properties": { + "closePaymentResultError": { + "type": "object", + "description": "Error details for close payment result", + "properties": { + "statusCode": { + "type": "number" + }, + "description": { + "type": "string" + } + } + }, + "sendPaymentResultOutcome": { + "description": "The outcome of sendPaymentResult api (OK, KO, NOT_RECEIVED)", + "type": "string", + "enum": [ + "OK", + "KO", + "NOT_RECEIVED" + ] + }, + } }, - "gateway":{ + "gatewayInfo":{ "type": "object", "description": "Gateway infos", "properties": { - "gatewayType": { + "gateway": { "type": "string", "pattern": "XPAY|VPOS|NPG|REDIRECT", "description": "Pgs identifier" @@ -366,19 +376,15 @@ "gatewayAuthorizationStatus": { "type": "string", "description": "Payment gateway authorization status" - } - } - }, - "closePaymentResultError": { - "type": "object", - "description": "Error details for close payment result", - "properties": { - "statusCode": { - "type": "number" }, - "description": { - "type": "string" - } + "authorizationCode": { + "type": "string", + "description": "Payment gateway-specific authorization code related to the transaction" + }, + "errorCode": { + "type": "string", + "description": "Payment gateway-specific error code from the gateway" + }, } }, }, diff --git a/src/domains/ecommerce-app/api/ecommerce-webview/v2/_openapi.json.tpl b/src/domains/ecommerce-app/api/ecommerce-webview/v2/_openapi.json.tpl index 22e1b11ee..cf6d74c3c 100644 --- a/src/domains/ecommerce-app/api/ecommerce-webview/v2/_openapi.json.tpl +++ b/src/domains/ecommerce-app/api/ecommerce-webview/v2/_openapi.json.tpl @@ -329,40 +329,38 @@ "IO" ] }, - "closePaymentResultError": { + "nodeInfo":{ "type": "object", - "description": "Error details for close payment result", + "description": "Gateway infos", "properties": { - "statusCode": { - "type": "number" + "closePaymentResultError": { + "type": "object", + "description": "Error details for close payment result", + "properties": { + "statusCode": { + "type": "number" + }, + "description": { + "type": "string" + } + } + }, + "sendPaymentResultOutcome": { + "description": "The outcome of sendPaymentResult api (OK, KO, NOT_RECEIVED)", + "type": "string", + "enum": [ + "OK", + "KO", + "NOT_RECEIVED" + ] }, - "description": { - "type": "string" - } } }, - "sendPaymentResultOutcome": { - "description": "The outcome of sendPaymentResult api (OK, KO, NOT_RECEIVED)", - "type": "string", - "enum": [ - "OK", - "KO", - "NOT_RECEIVED" - ] - }, - "authorizationCode": { - "type": "string", - "description": "Payment gateway-specific authorization code related to the transaction" - }, - "errorCode": { - "type": "string", - "description": "Payment gateway-specific error code from the gateway" - }, - "gateway":{ + "gatewayInfo":{ "type": "object", "description": "Gateway infos", "properties": { - "gatewayType": { + "gateway": { "type": "string", "pattern": "XPAY|VPOS|NPG|REDIRECT", "description": "Pgs identifier" @@ -370,7 +368,15 @@ "gatewayAuthorizationStatus": { "type": "string", "description": "Payment gateway authorization status" - } + }, + "authorizationCode": { + "type": "string", + "description": "Payment gateway-specific authorization code related to the transaction" + }, + "errorCode": { + "type": "string", + "description": "Payment gateway-specific error code from the gateway" + }, } }, }, From a5ed23fc8a4af3f5c09401cd50cf17019f6f4b47 Mon Sep 17 00:00:00 2001 From: EmanueleBVtech Date: Tue, 10 Dec 2024 17:02:50 +0100 Subject: [PATCH 20/52] minor update --- .../api/ecommerce-checkout/v2/_openapi.json.tpl | 5 ++++- .../api/ecommerce-transactions-service/v2/_openapi.json.tpl | 5 +++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/domains/ecommerce-app/api/ecommerce-checkout/v2/_openapi.json.tpl b/src/domains/ecommerce-app/api/ecommerce-checkout/v2/_openapi.json.tpl index 8b7240df2..4643871fd 100644 --- a/src/domains/ecommerce-app/api/ecommerce-checkout/v2/_openapi.json.tpl +++ b/src/domains/ecommerce-app/api/ecommerce-checkout/v2/_openapi.json.tpl @@ -469,7 +469,10 @@ "description": "transaction client id", "type": "string", "enum": [ - "IO" + "IO", + "CHECKOUT", + "CHECKOUT_CART", + "UNKNOWN" ] }, "nodeInfo":{ diff --git a/src/domains/ecommerce-app/api/ecommerce-transactions-service/v2/_openapi.json.tpl b/src/domains/ecommerce-app/api/ecommerce-transactions-service/v2/_openapi.json.tpl index 3c1dcce81..19e3febd9 100644 --- a/src/domains/ecommerce-app/api/ecommerce-transactions-service/v2/_openapi.json.tpl +++ b/src/domains/ecommerce-app/api/ecommerce-transactions-service/v2/_openapi.json.tpl @@ -332,9 +332,10 @@ }, "clientId": { "description": "transaction client id", - "type": "string", "enum": [ - "IO" + "IO", + "CHECKOUT", + "CHECKOUT_CART" ] }, "nodeInfo":{ From b3cc853b79cff1cde17d730bcc8fe4e225174223 Mon Sep 17 00:00:00 2001 From: EmanueleBVtech Date: Tue, 10 Dec 2024 17:07:41 +0100 Subject: [PATCH 21/52] update --- .../ecommerce-app/api/ecommerce-checkout/v2/_openapi.json.tpl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/domains/ecommerce-app/api/ecommerce-checkout/v2/_openapi.json.tpl b/src/domains/ecommerce-app/api/ecommerce-checkout/v2/_openapi.json.tpl index 4643871fd..48d04afc7 100644 --- a/src/domains/ecommerce-app/api/ecommerce-checkout/v2/_openapi.json.tpl +++ b/src/domains/ecommerce-app/api/ecommerce-checkout/v2/_openapi.json.tpl @@ -944,6 +944,9 @@ "email": { "type": "string" }, + "authToken": { + "type": "string" + }, "idCart": { "description": "Cart identifier provided by creditor institution", "type": "string", From 8be211b49cf78e4cf22c82da13d737cb7cd9bf3d Mon Sep 17 00:00:00 2001 From: EmanueleBVtech Date: Tue, 10 Dec 2024 17:09:46 +0100 Subject: [PATCH 22/52] update --- .../api/ecommerce-checkout/v2/_openapi.json.tpl | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/domains/ecommerce-app/api/ecommerce-checkout/v2/_openapi.json.tpl b/src/domains/ecommerce-app/api/ecommerce-checkout/v2/_openapi.json.tpl index 48d04afc7..5078cf6e0 100644 --- a/src/domains/ecommerce-app/api/ecommerce-checkout/v2/_openapi.json.tpl +++ b/src/domains/ecommerce-app/api/ecommerce-checkout/v2/_openapi.json.tpl @@ -465,6 +465,14 @@ "feeTotal": { "$ref": "#/components/schemas/AmountEuroCents" }, + "authToken": { + "type": "string" + }, + "idCart": { + "description": "Cart identifier provided by creditor institution", + "type": "string", + "example": "idCartFromCreditorInstitution" + }, "clientId": { "description": "transaction client id", "type": "string", From 9c479f62729f525c9731a655ccddd018fe1c2e3b Mon Sep 17 00:00:00 2001 From: EmanueleBVtech Date: Thu, 12 Dec 2024 10:10:04 +0100 Subject: [PATCH 23/52] Update src/domains/ecommerce-app/api/ecommerce-checkout/v2/_openapi.json.tpl Co-authored-by: Pietro Tota <115724836+pietro-tota@users.noreply.github.com> --- .../ecommerce-app/api/ecommerce-checkout/v2/_openapi.json.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/domains/ecommerce-app/api/ecommerce-checkout/v2/_openapi.json.tpl b/src/domains/ecommerce-app/api/ecommerce-checkout/v2/_openapi.json.tpl index 5078cf6e0..a419cb328 100644 --- a/src/domains/ecommerce-app/api/ecommerce-checkout/v2/_openapi.json.tpl +++ b/src/domains/ecommerce-app/api/ecommerce-checkout/v2/_openapi.json.tpl @@ -485,7 +485,7 @@ }, "nodeInfo":{ "type": "object", - "description": "Gateway infos", + "description": "Node operation info", "properties": { "closePaymentResultError": { "type": "object", From 355365b0040f94471e6d70c9199b909bd64f02b0 Mon Sep 17 00:00:00 2001 From: EmanueleBVtech Date: Thu, 12 Dec 2024 10:11:25 +0100 Subject: [PATCH 24/52] Update _openapi.json.tpl --- .../api/ecommerce-io/v2/_openapi.json.tpl | 110 +++--------------- 1 file changed, 13 insertions(+), 97 deletions(-) diff --git a/src/domains/ecommerce-app/api/ecommerce-io/v2/_openapi.json.tpl b/src/domains/ecommerce-app/api/ecommerce-io/v2/_openapi.json.tpl index 438ffedbf..fc23a19ef 100644 --- a/src/domains/ecommerce-app/api/ecommerce-io/v2/_openapi.json.tpl +++ b/src/domains/ecommerce-app/api/ecommerce-io/v2/_openapi.json.tpl @@ -1712,109 +1712,25 @@ }, "TransactionInfo": { "description": "Transaction data returned when querying for an existing transaction", - "type": "object", - "properties": { - "transactionId": { - "type": "string" - }, - "payments": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PaymentInfo" - }, - "minItems": 1, - "maxItems": 1, - "example": [ - { - "rptId": "77777777777302012387654312384", - "paymentToken": "paymentToken1", - "reason": "reason1", - "amount": 600, - "transferList": [ - { - "paFiscalCode": "77777777777", - "digitalStamp": false, - "transferCategory": "transferCategory1", - "transferAmount": 500 - }, - { - "paFiscalCode": "11111111111", - "digitalStamp": true, - "transferCategory": "transferCategory2", - "transferAmount": 100 - } - ] - } - ] - }, - "status": { - "$ref": "#/components/schemas/TransactionStatus" - }, - "feeTotal": { - "$ref": "#/components/schemas/AmountEuroCents" - }, - "clientId": { - "description": "transaction client id", - "type": "string", - "enum": [ - "IO" - ] - }, - "nodeInfo":{ - "type": "object", - "description": "Gateway infos", - "properties": { - "closePaymentResultError": { - "type": "object", - "description": "Error details for close payment result", - "properties": { - "statusCode": { - "type": "number" - }, - "description": { - "type": "string" - } - } - }, - "sendPaymentResultOutcome": { - "description": "The outcome of sendPaymentResult api (OK, KO, NOT_RECEIVED)", - "type": "string", - "enum": [ - "OK", - "KO", - "NOT_RECEIVED" - ] - }, - } + "allOf": [ + { + "$ref": "#/components/schemas/NewTransactionResponse" }, - "gatewayInfo":{ + { "type": "object", - "description": "Gateway infos", "properties": { - "gateway": { - "type": "string", - "pattern": "XPAY|VPOS|NPG|REDIRECT", - "description": "Pgs identifier" + "status": { + "$ref": "#/components/schemas/TransactionStatus" }, "gatewayAuthorizationStatus": { "type": "string", - "description": "Payment gateway authorization status" - }, - "authorizationCode": { - "type": "string", - "description": "Payment gateway-specific authorization code related to the transaction" - }, - "errorCode": { - "type": "string", - "description": "Payment gateway-specific error code from the gateway" - }, - } - }, - }, - "required": [ - "status", - "transactionId", - "payments" + "description": "payment gateway authorization status" + } + }, + "required": [ + "status" + ] + } ] }, "AmountEuroCents": { From de24445534594f89ab896ed458174842182cb576 Mon Sep 17 00:00:00 2001 From: EmanueleBVtech Date: Thu, 12 Dec 2024 10:14:03 +0100 Subject: [PATCH 25/52] Update _openapi.json.tpl --- .../ecommerce-app/api/ecommerce-checkout/v2/_openapi.json.tpl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/domains/ecommerce-app/api/ecommerce-checkout/v2/_openapi.json.tpl b/src/domains/ecommerce-app/api/ecommerce-checkout/v2/_openapi.json.tpl index a419cb328..2ac1f1067 100644 --- a/src/domains/ecommerce-app/api/ecommerce-checkout/v2/_openapi.json.tpl +++ b/src/domains/ecommerce-app/api/ecommerce-checkout/v2/_openapi.json.tpl @@ -492,9 +492,11 @@ "description": "Error details for close payment result", "properties": { "statusCode": { + "description": "Status code (4xx, 5xx) of the error received on the node", "type": "number" }, "description": { + "description": "Description of the error received on the node", "type": "string" } } From 07d749dfa0901bd9f5394ce9931e0e32f5a57c7b Mon Sep 17 00:00:00 2001 From: EmanueleBVtech Date: Thu, 12 Dec 2024 10:15:34 +0100 Subject: [PATCH 26/52] Update _openapi.json.tpl --- .../api/ecommerce-transactions-service/v2/_openapi.json.tpl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/domains/ecommerce-app/api/ecommerce-transactions-service/v2/_openapi.json.tpl b/src/domains/ecommerce-app/api/ecommerce-transactions-service/v2/_openapi.json.tpl index 19e3febd9..53935f5b4 100644 --- a/src/domains/ecommerce-app/api/ecommerce-transactions-service/v2/_openapi.json.tpl +++ b/src/domains/ecommerce-app/api/ecommerce-transactions-service/v2/_openapi.json.tpl @@ -347,9 +347,11 @@ "description": "Error details for close payment result", "properties": { "statusCode": { + "description": "Status code (4xx, 5xx) of the error received on the node", "type": "number" }, "description": { + "description": "Description of the error received on the node", "type": "string" } } From ddd4a27248d60325665de294c8ce5699ebe9b7f4 Mon Sep 17 00:00:00 2001 From: EmanueleBVtech Date: Thu, 12 Dec 2024 10:16:42 +0100 Subject: [PATCH 27/52] Update _openapi.json.tpl --- .../ecommerce-app/api/ecommerce-webview/v2/_openapi.json.tpl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/domains/ecommerce-app/api/ecommerce-webview/v2/_openapi.json.tpl b/src/domains/ecommerce-app/api/ecommerce-webview/v2/_openapi.json.tpl index cf6d74c3c..23d5802ba 100644 --- a/src/domains/ecommerce-app/api/ecommerce-webview/v2/_openapi.json.tpl +++ b/src/domains/ecommerce-app/api/ecommerce-webview/v2/_openapi.json.tpl @@ -338,9 +338,11 @@ "description": "Error details for close payment result", "properties": { "statusCode": { + "description": "Status code (4xx, 5xx) of the error received on the node", "type": "number" }, "description": { + "description": "Description of the error received on the node", "type": "string" } } @@ -453,4 +455,4 @@ } } } -} \ No newline at end of file +} From 755cef96dba78f459e209fd58834c33b6fa93896 Mon Sep 17 00:00:00 2001 From: EmanueleBVtech Date: Thu, 12 Dec 2024 10:19:00 +0100 Subject: [PATCH 28/52] Update _openapi.json.tpl --- .../ecommerce-app/api/ecommerce-checkout/v2/_openapi.json.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/domains/ecommerce-app/api/ecommerce-checkout/v2/_openapi.json.tpl b/src/domains/ecommerce-app/api/ecommerce-checkout/v2/_openapi.json.tpl index 2ac1f1067..b15e7c480 100644 --- a/src/domains/ecommerce-app/api/ecommerce-checkout/v2/_openapi.json.tpl +++ b/src/domains/ecommerce-app/api/ecommerce-checkout/v2/_openapi.json.tpl @@ -521,7 +521,7 @@ "pattern": "XPAY|VPOS|NPG|REDIRECT", "description": "Pgs identifier" }, - "gatewayAuthorizationStatus": { + "authorizationStatus": { "type": "string", "description": "Payment gateway authorization status" }, From 0547fd0d29d147c25339880e69493697d68191ea Mon Sep 17 00:00:00 2001 From: EmanueleBVtech Date: Thu, 12 Dec 2024 10:19:28 +0100 Subject: [PATCH 29/52] Update _openapi.json.tpl --- .../api/ecommerce-transactions-service/v2/_openapi.json.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/domains/ecommerce-app/api/ecommerce-transactions-service/v2/_openapi.json.tpl b/src/domains/ecommerce-app/api/ecommerce-transactions-service/v2/_openapi.json.tpl index 53935f5b4..5c34cb4a8 100644 --- a/src/domains/ecommerce-app/api/ecommerce-transactions-service/v2/_openapi.json.tpl +++ b/src/domains/ecommerce-app/api/ecommerce-transactions-service/v2/_openapi.json.tpl @@ -376,7 +376,7 @@ "pattern": "XPAY|VPOS|NPG|REDIRECT", "description": "Pgs identifier" }, - "gatewayAuthorizationStatus": { + "authorizationStatus": { "type": "string", "description": "Payment gateway authorization status" }, From 56610dd06b7f9d946909bb116733314b58ea209e Mon Sep 17 00:00:00 2001 From: EmanueleBVtech Date: Thu, 12 Dec 2024 10:19:53 +0100 Subject: [PATCH 30/52] Update _openapi.json.tpl --- .../ecommerce-app/api/ecommerce-webview/v2/_openapi.json.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/domains/ecommerce-app/api/ecommerce-webview/v2/_openapi.json.tpl b/src/domains/ecommerce-app/api/ecommerce-webview/v2/_openapi.json.tpl index 23d5802ba..f3c3803c1 100644 --- a/src/domains/ecommerce-app/api/ecommerce-webview/v2/_openapi.json.tpl +++ b/src/domains/ecommerce-app/api/ecommerce-webview/v2/_openapi.json.tpl @@ -367,7 +367,7 @@ "pattern": "XPAY|VPOS|NPG|REDIRECT", "description": "Pgs identifier" }, - "gatewayAuthorizationStatus": { + "authorizationStatus": { "type": "string", "description": "Payment gateway authorization status" }, From 254f7eeac6e95e525750dfb6acff440202a34091 Mon Sep 17 00:00:00 2001 From: EmanueleBVtech Date: Thu, 12 Dec 2024 10:59:15 +0100 Subject: [PATCH 31/52] Update _openapi.json.tpl --- .../ecommerce-webview/v2/_openapi.json.tpl | 79 ------------------- 1 file changed, 79 deletions(-) diff --git a/src/domains/ecommerce-app/api/ecommerce-webview/v2/_openapi.json.tpl b/src/domains/ecommerce-app/api/ecommerce-webview/v2/_openapi.json.tpl index f3c3803c1..3704bea90 100644 --- a/src/domains/ecommerce-app/api/ecommerce-webview/v2/_openapi.json.tpl +++ b/src/domains/ecommerce-app/api/ecommerce-webview/v2/_openapi.json.tpl @@ -200,85 +200,6 @@ ] } }, - "NewTransactionResponse": { - "type": "object", - "description": "Transaction data returned when creating a new transaction", - "properties": { - "transactionId": { - "type": "string" - }, - "payments": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PaymentInfo" - }, - "minItems": 1, - "maxItems": 1, - "example": [ - { - "rptId": "77777777777302012387654312384", - "paymentToken": "paymentToken1", - "reason": "reason1", - "amount": 600, - "transferList": [ - { - "paFiscalCode": "77777777777", - "digitalStamp": false, - "transferCategory": "transferCategory1", - "transferAmount": 500 - }, - { - "paFiscalCode": "11111111111", - "digitalStamp": true, - "transferCategory": "transferCategory2", - "transferAmount": 100 - } - ] - } - ] - }, - "status": { - "$ref": "#/components/schemas/TransactionStatus" - }, - "feeTotal": { - "$ref": "#/components/schemas/AmountEuroCents" - }, - "clientId": { - "description": "transaction client id", - "type": "string", - "enum": [ - "IO" - ] - }, - "sendPaymentResultOutcome": { - "description": "The outcome of sendPaymentResult api (OK, KO, NOT_RECEIVED)", - "type": "string", - "enum": [ - "OK", - "KO", - "NOT_RECEIVED" - ] - }, - "authorizationCode": { - "type": "string", - "description": "Payment gateway-specific authorization code related to the transaction" - }, - "errorCode": { - "type": "string", - "description": "Payment gateway-specific error code from the gateway" - }, - "gateway": { - "type": "string", - "pattern": "XPAY|VPOS|NPG|REDIRECT", - "description": "Pgs identifier" - } - }, - "required": [ - "transactionId", - "status", - "payments" - ] - }, "TransactionInfo": { "description": "Transaction data returned when querying for an existing transaction", "type": "object", From d8c3fe064599d6147f90d2d422ee8c6bc1ea9db9 Mon Sep 17 00:00:00 2001 From: EmanueleBVtech Date: Thu, 12 Dec 2024 14:35:09 +0100 Subject: [PATCH 32/52] Update 04_apim_ecommerce_webview.tf --- .../04_apim_ecommerce_webview.tf | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/src/domains/ecommerce-app/04_apim_ecommerce_webview.tf b/src/domains/ecommerce-app/04_apim_ecommerce_webview.tf index d4ef8b18a..cf68c27c8 100644 --- a/src/domains/ecommerce-app/04_apim_ecommerce_webview.tf +++ b/src/domains/ecommerce-app/04_apim_ecommerce_webview.tf @@ -79,3 +79,30 @@ module "apim_ecommerce_webview_api_v1" { ecommerce_ingress_hostname = local.ecommerce_hostname }) } + +module "apim_ecommerce_webview_api_v2" { + source = "./.terraform/modules/__v3__/api_management_api" + + name = "${local.project}-ecommerce-webview-api" + resource_group_name = local.pagopa_apim_rg + api_management_name = local.pagopa_apim_name + product_ids = [module.apim_ecommerce_webview_product.product_id] + subscription_required = local.apim_ecommerce_webview_api.subscription_required + version_set_id = azurerm_api_management_api_version_set.apim_ecommerce_webview_api.id + api_version = "v2" + service_url = local.apim_ecommerce_webview_api.service_url + + description = local.apim_ecommerce_webview_api.description + display_name = local.apim_ecommerce_webview_api.display_name + path = local.apim_ecommerce_webview_api.path + protocols = ["https"] + + content_format = "openapi" + content_value = templatefile("./api/ecommerce-webview/v2/_openapi.json.tpl", { + host = local.apim_hostname + }) + + xml_content = templatefile("./api/ecommerce-webview/v2/_base_policy.xml.tpl", { + ecommerce_ingress_hostname = local.ecommerce_hostname + }) +} From 5a1e5cf9cea24e9413b3a22baeae09defed14dee Mon Sep 17 00:00:00 2001 From: EmanueleBVtech Date: Thu, 12 Dec 2024 14:37:37 +0100 Subject: [PATCH 33/52] Update 04_apim_ecommerce_webview.tf --- src/domains/ecommerce-app/04_apim_ecommerce_webview.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/domains/ecommerce-app/04_apim_ecommerce_webview.tf b/src/domains/ecommerce-app/04_apim_ecommerce_webview.tf index cf68c27c8..04bf256b2 100644 --- a/src/domains/ecommerce-app/04_apim_ecommerce_webview.tf +++ b/src/domains/ecommerce-app/04_apim_ecommerce_webview.tf @@ -102,7 +102,7 @@ module "apim_ecommerce_webview_api_v2" { host = local.apim_hostname }) - xml_content = templatefile("./api/ecommerce-webview/v2/_base_policy.xml.tpl", { + xml_content = templatefile("./api/ecommerce-webview/v1/_base_policy.xml.tpl", { ecommerce_ingress_hostname = local.ecommerce_hostname }) } From 61da446fd444d447d44c4a4db2b78ef07405af9b Mon Sep 17 00:00:00 2001 From: EmanueleBVtech Date: Thu, 12 Dec 2024 17:54:33 +0100 Subject: [PATCH 34/52] Update _openapi.json.tpl --- .../ecommerce-app/api/ecommerce-checkout/v2/_openapi.json.tpl | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/domains/ecommerce-app/api/ecommerce-checkout/v2/_openapi.json.tpl b/src/domains/ecommerce-app/api/ecommerce-checkout/v2/_openapi.json.tpl index b15e7c480..b2a0a9ba4 100644 --- a/src/domains/ecommerce-app/api/ecommerce-checkout/v2/_openapi.json.tpl +++ b/src/domains/ecommerce-app/api/ecommerce-checkout/v2/_openapi.json.tpl @@ -465,9 +465,6 @@ "feeTotal": { "$ref": "#/components/schemas/AmountEuroCents" }, - "authToken": { - "type": "string" - }, "idCart": { "description": "Cart identifier provided by creditor institution", "type": "string", From 2fa9742564a974041e422df2618ef00b6ec0a82d Mon Sep 17 00:00:00 2001 From: EmanueleBVtech Date: Thu, 12 Dec 2024 17:56:42 +0100 Subject: [PATCH 35/52] Update _openapi.json.tpl --- .../ecommerce-app/api/ecommerce-checkout/v2/_openapi.json.tpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/domains/ecommerce-app/api/ecommerce-checkout/v2/_openapi.json.tpl b/src/domains/ecommerce-app/api/ecommerce-checkout/v2/_openapi.json.tpl index b2a0a9ba4..bed98aafa 100644 --- a/src/domains/ecommerce-app/api/ecommerce-checkout/v2/_openapi.json.tpl +++ b/src/domains/ecommerce-app/api/ecommerce-checkout/v2/_openapi.json.tpl @@ -515,8 +515,8 @@ "properties": { "gateway": { "type": "string", - "pattern": "XPAY|VPOS|NPG|REDIRECT", - "description": "Pgs identifier" + "pattern": "NPG|REDIRECT", + "description": "Payment gateway identifier" }, "authorizationStatus": { "type": "string", From aceb3c26b1788eb7ec9eaac2b8d09ac10a281eca Mon Sep 17 00:00:00 2001 From: EmanueleBVtech Date: Thu, 12 Dec 2024 17:57:01 +0100 Subject: [PATCH 36/52] Update _openapi.json.tpl --- .../api/ecommerce-transactions-service/v2/_openapi.json.tpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/domains/ecommerce-app/api/ecommerce-transactions-service/v2/_openapi.json.tpl b/src/domains/ecommerce-app/api/ecommerce-transactions-service/v2/_openapi.json.tpl index 5c34cb4a8..fef119187 100644 --- a/src/domains/ecommerce-app/api/ecommerce-transactions-service/v2/_openapi.json.tpl +++ b/src/domains/ecommerce-app/api/ecommerce-transactions-service/v2/_openapi.json.tpl @@ -373,8 +373,8 @@ "properties": { "gateway": { "type": "string", - "pattern": "XPAY|VPOS|NPG|REDIRECT", - "description": "Pgs identifier" + "pattern": "NPG|REDIRECT", + "description": "Payment gateway identifier" }, "authorizationStatus": { "type": "string", From 841f243a959a27e4bc106f5ade75e3ea2064420f Mon Sep 17 00:00:00 2001 From: EmanueleBVtech Date: Thu, 12 Dec 2024 17:57:19 +0100 Subject: [PATCH 37/52] Update _openapi.json.tpl --- .../ecommerce-app/api/ecommerce-webview/v2/_openapi.json.tpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/domains/ecommerce-app/api/ecommerce-webview/v2/_openapi.json.tpl b/src/domains/ecommerce-app/api/ecommerce-webview/v2/_openapi.json.tpl index 3704bea90..ea55a7e0d 100644 --- a/src/domains/ecommerce-app/api/ecommerce-webview/v2/_openapi.json.tpl +++ b/src/domains/ecommerce-app/api/ecommerce-webview/v2/_openapi.json.tpl @@ -285,8 +285,8 @@ "properties": { "gateway": { "type": "string", - "pattern": "XPAY|VPOS|NPG|REDIRECT", - "description": "Pgs identifier" + "pattern": "NPG|REDIRECT", + "description": "Payment gateway identifier" }, "authorizationStatus": { "type": "string", From 9ea6c504eff4d02cf549703d2f86f3040dea8f0a Mon Sep 17 00:00:00 2001 From: EmanueleBVtech Date: Thu, 12 Dec 2024 17:59:06 +0100 Subject: [PATCH 38/52] Update _openapi.json.tpl --- .../ecommerce-app/api/ecommerce-checkout/v2/_openapi.json.tpl | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/domains/ecommerce-app/api/ecommerce-checkout/v2/_openapi.json.tpl b/src/domains/ecommerce-app/api/ecommerce-checkout/v2/_openapi.json.tpl index bed98aafa..d545ee94f 100644 --- a/src/domains/ecommerce-app/api/ecommerce-checkout/v2/_openapi.json.tpl +++ b/src/domains/ecommerce-app/api/ecommerce-checkout/v2/_openapi.json.tpl @@ -951,9 +951,6 @@ "email": { "type": "string" }, - "authToken": { - "type": "string" - }, "idCart": { "description": "Cart identifier provided by creditor institution", "type": "string", From 4829a917f8dd07cbeecd9960a540f2b287a9814f Mon Sep 17 00:00:00 2001 From: EmanueleBVtech Date: Fri, 13 Dec 2024 09:24:53 +0100 Subject: [PATCH 39/52] Update _openapi.json.tpl --- .../ecommerce-app/api/ecommerce-checkout/v2/_openapi.json.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/domains/ecommerce-app/api/ecommerce-checkout/v2/_openapi.json.tpl b/src/domains/ecommerce-app/api/ecommerce-checkout/v2/_openapi.json.tpl index d545ee94f..91faf283e 100644 --- a/src/domains/ecommerce-app/api/ecommerce-checkout/v2/_openapi.json.tpl +++ b/src/domains/ecommerce-app/api/ecommerce-checkout/v2/_openapi.json.tpl @@ -435,7 +435,7 @@ "$ref": "#/components/schemas/PaymentInfo" }, "minItems": 1, - "maxItems": 1, + "maxItems": 5, "example": [ { "rptId": "77777777777302012387654312384", From 89b2b6e4ad66ff8ddcf1e643ba10a59f9d832968 Mon Sep 17 00:00:00 2001 From: EmanueleBVtech Date: Fri, 13 Dec 2024 09:25:19 +0100 Subject: [PATCH 40/52] Update _openapi.json.tpl --- .../api/ecommerce-transactions-service/v2/_openapi.json.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/domains/ecommerce-app/api/ecommerce-transactions-service/v2/_openapi.json.tpl b/src/domains/ecommerce-app/api/ecommerce-transactions-service/v2/_openapi.json.tpl index fef119187..bd63fb6ea 100644 --- a/src/domains/ecommerce-app/api/ecommerce-transactions-service/v2/_openapi.json.tpl +++ b/src/domains/ecommerce-app/api/ecommerce-transactions-service/v2/_openapi.json.tpl @@ -300,7 +300,7 @@ "$ref": "#/components/schemas/PaymentInfo" }, "minItems": 1, - "maxItems": 1, + "maxItems": 5, "example": [ { "rptId": "77777777777302012387654312384", From 6bc0a7d8ccd3bcbed0ad2f37c1d37546e65d91f9 Mon Sep 17 00:00:00 2001 From: EmanueleBVtech Date: Fri, 13 Dec 2024 09:25:40 +0100 Subject: [PATCH 41/52] Update _openapi.json.tpl --- .../ecommerce-app/api/ecommerce-webview/v2/_openapi.json.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/domains/ecommerce-app/api/ecommerce-webview/v2/_openapi.json.tpl b/src/domains/ecommerce-app/api/ecommerce-webview/v2/_openapi.json.tpl index ea55a7e0d..056444a63 100644 --- a/src/domains/ecommerce-app/api/ecommerce-webview/v2/_openapi.json.tpl +++ b/src/domains/ecommerce-app/api/ecommerce-webview/v2/_openapi.json.tpl @@ -213,7 +213,7 @@ "$ref": "#/components/schemas/PaymentInfo" }, "minItems": 1, - "maxItems": 1, + "maxItems": 5, "example": [ { "rptId": "77777777777302012387654312384", From d642d1566642d6ca3f98d0047f220462ead27f25 Mon Sep 17 00:00:00 2001 From: EmanueleBVtech Date: Fri, 13 Dec 2024 09:28:58 +0100 Subject: [PATCH 42/52] Create _base_policy.xml.tpl --- .../ecommerce-webview/v2/_base_policy.xml.tpl | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 src/domains/ecommerce-app/api/ecommerce-webview/v2/_base_policy.xml.tpl diff --git a/src/domains/ecommerce-app/api/ecommerce-webview/v2/_base_policy.xml.tpl b/src/domains/ecommerce-app/api/ecommerce-webview/v2/_base_policy.xml.tpl new file mode 100644 index 000000000..bf1755f2e --- /dev/null +++ b/src/domains/ecommerce-app/api/ecommerce-webview/v2/_base_policy.xml.tpl @@ -0,0 +1,60 @@ + + + + + + * + + + GET + + +
Content-Type
+
Authorization
+
+
+ + + + + + {{ecommerce-webview-jwt-signing-key}} + {{ecommerce-checkout-transaction-jwt-signing-key}} + {{wallet-session-jwt-signing-key}} + + + + + + + @((string)context.Variables.GetValueOrDefault("xUserId","")) + + + + + + + + + +
+ + + + + + + + + + + + + +
From 69258468904ee9a06b851452eb1681473bdfe5f8 Mon Sep 17 00:00:00 2001 From: EmanueleBVtech Date: Fri, 13 Dec 2024 09:29:58 +0100 Subject: [PATCH 43/52] Update 04_apim_ecommerce_webview.tf --- src/domains/ecommerce-app/04_apim_ecommerce_webview.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/domains/ecommerce-app/04_apim_ecommerce_webview.tf b/src/domains/ecommerce-app/04_apim_ecommerce_webview.tf index 04bf256b2..cf68c27c8 100644 --- a/src/domains/ecommerce-app/04_apim_ecommerce_webview.tf +++ b/src/domains/ecommerce-app/04_apim_ecommerce_webview.tf @@ -102,7 +102,7 @@ module "apim_ecommerce_webview_api_v2" { host = local.apim_hostname }) - xml_content = templatefile("./api/ecommerce-webview/v1/_base_policy.xml.tpl", { + xml_content = templatefile("./api/ecommerce-webview/v2/_base_policy.xml.tpl", { ecommerce_ingress_hostname = local.ecommerce_hostname }) } From 50b9b29e3d8669e061eec995282510a45841a759 Mon Sep 17 00:00:00 2001 From: EmanueleBVtech Date: Fri, 13 Dec 2024 12:19:02 +0100 Subject: [PATCH 44/52] Update src/domains/ecommerce-app/api/ecommerce-webview/v2/_base_policy.xml.tpl Co-authored-by: Pietro Tota <115724836+pietro-tota@users.noreply.github.com> --- .../ecommerce-app/api/ecommerce-webview/v2/_base_policy.xml.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/domains/ecommerce-app/api/ecommerce-webview/v2/_base_policy.xml.tpl b/src/domains/ecommerce-app/api/ecommerce-webview/v2/_base_policy.xml.tpl index bf1755f2e..b8e753749 100644 --- a/src/domains/ecommerce-app/api/ecommerce-webview/v2/_base_policy.xml.tpl +++ b/src/domains/ecommerce-app/api/ecommerce-webview/v2/_base_policy.xml.tpl @@ -40,7 +40,7 @@ - + From f620c384443c74b321c4d4fe311629e4f3277ee0 Mon Sep 17 00:00:00 2001 From: "e.serrao" Date: Fri, 13 Dec 2024 12:39:26 +0100 Subject: [PATCH 45/52] run precommit --- src/domains/ecommerce-app/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/src/domains/ecommerce-app/README.md b/src/domains/ecommerce-app/README.md index fd6f825b7..9472baff7 100644 --- a/src/domains/ecommerce-app/README.md +++ b/src/domains/ecommerce-app/README.md @@ -37,6 +37,7 @@ | [apim\_ecommerce\_transactions\_service\_api\_v2](#module\_apim\_ecommerce\_transactions\_service\_api\_v2) | ./.terraform/modules/__v3__/api_management_api | n/a | | [apim\_ecommerce\_user\_stats\_service\_api\_v1](#module\_apim\_ecommerce\_user\_stats\_service\_api\_v1) | ./.terraform/modules/__v3__/api_management_api | n/a | | [apim\_ecommerce\_webview\_api\_v1](#module\_apim\_ecommerce\_webview\_api\_v1) | ./.terraform/modules/__v3__/api_management_api | n/a | +| [apim\_ecommerce\_webview\_api\_v2](#module\_apim\_ecommerce\_webview\_api\_v2) | ./.terraform/modules/__v3__/api_management_api | n/a | | [apim\_ecommerce\_webview\_product](#module\_apim\_ecommerce\_webview\_product) | ./.terraform/modules/__v3__/api_management_product | n/a | | [apim\_pagopa\_ecommerce\_helpdesk\_commands\_service\_api\_v1](#module\_apim\_pagopa\_ecommerce\_helpdesk\_commands\_service\_api\_v1) | ./.terraform/modules/__v3__/api_management_api | n/a | | [apim\_pagopa\_ecommerce\_helpdesk\_service\_api\_v1](#module\_apim\_pagopa\_ecommerce\_helpdesk\_service\_api\_v1) | ./.terraform/modules/__v3__/api_management_api | n/a | From 562acda9e82b62656c0db81b590d4103808c7bef Mon Sep 17 00:00:00 2001 From: "e.serrao" Date: Fri, 13 Dec 2024 13:16:01 +0100 Subject: [PATCH 46/52] fixed infra --- .../ecommerce-app/api/ecommerce-checkout/v2/_base_policy.xml.tpl | 1 + 1 file changed, 1 insertion(+) diff --git a/src/domains/ecommerce-app/api/ecommerce-checkout/v2/_base_policy.xml.tpl b/src/domains/ecommerce-app/api/ecommerce-checkout/v2/_base_policy.xml.tpl index babe1e431..eba9447ac 100644 --- a/src/domains/ecommerce-app/api/ecommerce-checkout/v2/_base_policy.xml.tpl +++ b/src/domains/ecommerce-app/api/ecommerce-checkout/v2/_base_policy.xml.tpl @@ -7,6 +7,7 @@ POST + GET OPTIONS From 153f461a446ce556b7c12f1442835a9dcefbc6a8 Mon Sep 17 00:00:00 2001 From: Pietro Tota Date: Fri, 13 Dec 2024 14:48:00 +0100 Subject: [PATCH 47/52] fix: api call routing --- .../api/ecommerce-checkout/v2/_base_policy.xml.tpl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/domains/ecommerce-app/api/ecommerce-checkout/v2/_base_policy.xml.tpl b/src/domains/ecommerce-app/api/ecommerce-checkout/v2/_base_policy.xml.tpl index eba9447ac..00282258b 100644 --- a/src/domains/ecommerce-app/api/ecommerce-checkout/v2/_base_policy.xml.tpl +++ b/src/domains/ecommerce-app/api/ecommerce-checkout/v2/_base_policy.xml.tpl @@ -25,8 +25,11 @@ CHECKOUT - + + + + From a88e3902a1dcc404f4cfda5309e5c0baced053bf Mon Sep 17 00:00:00 2001 From: "e.serrao" Date: Mon, 16 Dec 2024 12:58:12 +0100 Subject: [PATCH 48/52] added token validation policy on v2 api --- src/domains/ecommerce-app/04_apim_ecommerce_checkout.tf | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/domains/ecommerce-app/04_apim_ecommerce_checkout.tf b/src/domains/ecommerce-app/04_apim_ecommerce_checkout.tf index 9c4c08546..f7c19b052 100644 --- a/src/domains/ecommerce-app/04_apim_ecommerce_checkout.tf +++ b/src/domains/ecommerce-app/04_apim_ecommerce_checkout.tf @@ -108,6 +108,15 @@ resource "azurerm_api_management_api_operation_policy" "get_transaction_info" { xml_content = file("./api/ecommerce-checkout/v1/_validate_transactions_jwt_token.tpl") } +resource "azurerm_api_management_api_V2_operation_policy" "get_transaction_info" { + api_name = "${local.project}-ecommerce-checkout-api-v2" + resource_group_name = local.pagopa_apim_rg + api_management_name = local.pagopa_apim_name + operation_id = "getTransactionInfo" + + xml_content = file("./api/ecommerce-checkout/v2/_validate_transactions_jwt_token.tpl") +} + resource "azurerm_api_management_api_operation_policy" "delete_transaction" { api_name = "${local.project}-ecommerce-checkout-api-v1" resource_group_name = local.pagopa_apim_rg From 3348cb054271cef8d7f71fde6c4c5f77ab15b03c Mon Sep 17 00:00:00 2001 From: "e.serrao" Date: Mon, 16 Dec 2024 13:01:49 +0100 Subject: [PATCH 49/52] run precommit --- src/domains/ecommerce-app/04_apim_ecommerce_checkout.tf | 2 +- src/domains/ecommerce-app/README.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/domains/ecommerce-app/04_apim_ecommerce_checkout.tf b/src/domains/ecommerce-app/04_apim_ecommerce_checkout.tf index f7c19b052..3e1fe36cc 100644 --- a/src/domains/ecommerce-app/04_apim_ecommerce_checkout.tf +++ b/src/domains/ecommerce-app/04_apim_ecommerce_checkout.tf @@ -108,7 +108,7 @@ resource "azurerm_api_management_api_operation_policy" "get_transaction_info" { xml_content = file("./api/ecommerce-checkout/v1/_validate_transactions_jwt_token.tpl") } -resource "azurerm_api_management_api_V2_operation_policy" "get_transaction_info" { +resource "azurerm_api_management_api_V2_operation_policy" "get_transaction_info_v2" { api_name = "${local.project}-ecommerce-checkout-api-v2" resource_group_name = local.pagopa_apim_rg api_management_name = local.pagopa_apim_name diff --git a/src/domains/ecommerce-app/README.md b/src/domains/ecommerce-app/README.md index 9472baff7..5991b2436 100644 --- a/src/domains/ecommerce-app/README.md +++ b/src/domains/ecommerce-app/README.md @@ -60,6 +60,7 @@ | [azurerm_api_management_api.apim_ecommerce_npg_mock](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management_api) | resource | | [azurerm_api_management_api.apim_ecommerce_npg_notifications](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management_api) | resource | | [azurerm_api_management_api.apim_ecommerce_pdv_mock](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management_api) | resource | +| [azurerm_api_management_api_V2_operation_policy.get_transaction_info_v2](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management_api_V2_operation_policy) | resource | | [azurerm_api_management_api_operation_policy.auth_request_gateway_policy](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management_api_operation_policy) | resource | | [azurerm_api_management_api_operation_policy.confirm_payment](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management_api_operation_policy) | resource | | [azurerm_api_management_api_operation_policy.create_session](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management_api_operation_policy) | resource | From 317a43645ca4b546ac1b7d5231f29420ae67aca3 Mon Sep 17 00:00:00 2001 From: EmanueleBVtech Date: Mon, 16 Dec 2024 13:21:45 +0100 Subject: [PATCH 50/52] Update src/domains/ecommerce-app/04_apim_ecommerce_checkout.tf Co-authored-by: Pietro Tota <115724836+pietro-tota@users.noreply.github.com> --- src/domains/ecommerce-app/04_apim_ecommerce_checkout.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/domains/ecommerce-app/04_apim_ecommerce_checkout.tf b/src/domains/ecommerce-app/04_apim_ecommerce_checkout.tf index 3e1fe36cc..d34448a1f 100644 --- a/src/domains/ecommerce-app/04_apim_ecommerce_checkout.tf +++ b/src/domains/ecommerce-app/04_apim_ecommerce_checkout.tf @@ -108,7 +108,7 @@ resource "azurerm_api_management_api_operation_policy" "get_transaction_info" { xml_content = file("./api/ecommerce-checkout/v1/_validate_transactions_jwt_token.tpl") } -resource "azurerm_api_management_api_V2_operation_policy" "get_transaction_info_v2" { +resource "azurerm_api_management_api_operation_policy" "get_transaction_info_v2" { api_name = "${local.project}-ecommerce-checkout-api-v2" resource_group_name = local.pagopa_apim_rg api_management_name = local.pagopa_apim_name From 0703df0d93e193e3e664384126a72f63d1a51ed9 Mon Sep 17 00:00:00 2001 From: Pietro Tota Date: Tue, 17 Dec 2024 14:10:34 +0100 Subject: [PATCH 51/52] fix(IAC deploy): restore missing test repo --- .devops/ecommerce-deploy-pipelines.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.devops/ecommerce-deploy-pipelines.yml b/.devops/ecommerce-deploy-pipelines.yml index 8b951e2b4..35a31f0fb 100644 --- a/.devops/ecommerce-deploy-pipelines.yml +++ b/.devops/ecommerce-deploy-pipelines.yml @@ -36,6 +36,12 @@ resources: name: pagopa/azure-pipeline-templates ref: refs/tags/v6.9.0 endpoint: "io-azure-devops-github-ro" + #Checkout tests repo that contains e2e tests to be executed after domain apply + - repository: pagopaCheckoutTests + type: github + name: pagopa/pagopa-checkout-tests + ref: main + endpoint: 'io-azure-devops-github-ro' variables: From d21afdc2b5846ce3664ff535c3fb2824a2212c3c Mon Sep 17 00:00:00 2001 From: Pietro Tota Date: Tue, 17 Dec 2024 14:12:19 +0100 Subject: [PATCH 52/52] fix: e2e tests --- .devops/ecommerce-deploy-pipelines.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.devops/ecommerce-deploy-pipelines.yml b/.devops/ecommerce-deploy-pipelines.yml index 35a31f0fb..a904b3ed0 100644 --- a/.devops/ecommerce-deploy-pipelines.yml +++ b/.devops/ecommerce-deploy-pipelines.yml @@ -99,17 +99,17 @@ stages: AKS_NAME: '$(TF_AKS_UAT_NAME)' POOL_NAME: '$(TF_POOL_NAME_UAT)' # E2E test - - stage: "E2E_Tests_Checkout_DEV_environment" - displayName: '🧪 Running E2E test on DEV env' + - stage: "E2E_Tests_Checkout_UAT_environment" + displayName: '🧪 Running E2E test on UAT env' pool: vmImage: 'ubuntu-latest' - dependsOn: dev_apply_ecommerce_app + dependsOn: uat_apply_ecommerce_app jobs: - job: e2e_tests steps: - template: .devops/azure-templates/e2e-tests.yaml@pagopaCheckoutTests parameters: - ENVIRONMENT: DEV + ENVIRONMENT: UAT CHECKOUT_RESOURCE_REPO_NAME: pagopaCheckoutTests #PROD - ${{ if eq(parameters['PROD'], true) }}: