Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: [CHK-3613] Updated GET transactions to include optional fields for closePayment errors #2644

Merged
merged 61 commits into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from 38 commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
50a92d3
updated GET transactions
EmanueleBVtech Dec 9, 2024
7aeabed
updated Get transactions on webview
EmanueleBVtech Dec 9, 2024
ffc29af
updated get transactions for io
EmanueleBVtech Dec 9, 2024
447c6f4
updated GET transactions on transactions service
EmanueleBVtech Dec 9, 2024
9cd04be
revert
EmanueleBVtech Dec 9, 2024
66db362
restored
EmanueleBVtech Dec 10, 2024
351fb90
fix
EmanueleBVtech Dec 10, 2024
23bdb9d
fix
EmanueleBVtech Dec 10, 2024
11c08e7
moving to v2
EmanueleBVtech Dec 10, 2024
4f6e610
moving to v2
EmanueleBVtech Dec 10, 2024
7971c2b
moving to v2
EmanueleBVtech Dec 10, 2024
3d95396
moving to v2
EmanueleBVtech Dec 10, 2024
65bd872
fix
EmanueleBVtech Dec 10, 2024
53222c4
cloned parameters from NewTransactionResponse
EmanueleBVtech Dec 10, 2024
92bb2e3
cloned parameters from NewTransactionResponse
EmanueleBVtech Dec 10, 2024
b16b000
united gateway items
EmanueleBVtech Dec 10, 2024
7e3890b
fix
EmanueleBVtech Dec 10, 2024
ed9ecfd
fix
EmanueleBVtech Dec 10, 2024
e5a4954
update
EmanueleBVtech Dec 10, 2024
a5ed23f
minor update
EmanueleBVtech Dec 10, 2024
b3cc853
update
EmanueleBVtech Dec 10, 2024
8be211b
update
EmanueleBVtech Dec 10, 2024
5e9f32e
Merge branch 'main' into CHK-3613-update-get-transaction-definition
EmanueleBVtech Dec 11, 2024
384a078
Merge branch 'main' into CHK-3613-update-get-transaction-definition
EmanueleBVtech Dec 12, 2024
9c479f6
Update src/domains/ecommerce-app/api/ecommerce-checkout/v2/_openapi.j…
EmanueleBVtech Dec 12, 2024
355365b
Update _openapi.json.tpl
EmanueleBVtech Dec 12, 2024
de24445
Update _openapi.json.tpl
EmanueleBVtech Dec 12, 2024
07d749d
Update _openapi.json.tpl
EmanueleBVtech Dec 12, 2024
ddd4a27
Update _openapi.json.tpl
EmanueleBVtech Dec 12, 2024
755cef9
Update _openapi.json.tpl
EmanueleBVtech Dec 12, 2024
0547fd0
Update _openapi.json.tpl
EmanueleBVtech Dec 12, 2024
56610dd
Update _openapi.json.tpl
EmanueleBVtech Dec 12, 2024
254f7ee
Update _openapi.json.tpl
EmanueleBVtech Dec 12, 2024
d8c3fe0
Update 04_apim_ecommerce_webview.tf
EmanueleBVtech Dec 12, 2024
5a1e5cf
Update 04_apim_ecommerce_webview.tf
EmanueleBVtech Dec 12, 2024
61da446
Update _openapi.json.tpl
EmanueleBVtech Dec 12, 2024
2fa9742
Update _openapi.json.tpl
EmanueleBVtech Dec 12, 2024
aceb3c2
Update _openapi.json.tpl
EmanueleBVtech Dec 12, 2024
841f243
Update _openapi.json.tpl
EmanueleBVtech Dec 12, 2024
9ea6c50
Update _openapi.json.tpl
EmanueleBVtech Dec 12, 2024
4829a91
Update _openapi.json.tpl
EmanueleBVtech Dec 13, 2024
89b2b6e
Update _openapi.json.tpl
EmanueleBVtech Dec 13, 2024
6bc0a7d
Update _openapi.json.tpl
EmanueleBVtech Dec 13, 2024
d642d15
Create _base_policy.xml.tpl
EmanueleBVtech Dec 13, 2024
6925846
Update 04_apim_ecommerce_webview.tf
EmanueleBVtech Dec 13, 2024
af9becb
Merge branch 'main' into CHK-3613-update-get-transaction-definition
EmanueleBVtech Dec 13, 2024
50b9b29
Update src/domains/ecommerce-app/api/ecommerce-webview/v2/_base_polic…
EmanueleBVtech Dec 13, 2024
ef6455d
Merge branch 'main' into CHK-3613-update-get-transaction-definition
EmanueleBVtech Dec 13, 2024
f620c38
run precommit
EmanueleBVtech Dec 13, 2024
562acda
fixed infra
EmanueleBVtech Dec 13, 2024
153f461
fix: api call routing
pietro-tota Dec 13, 2024
6bb5a76
Merge branch 'main' into CHK-3613-update-get-transaction-definition
EmanueleBVtech Dec 16, 2024
a88e390
added token validation policy on v2 api
EmanueleBVtech Dec 16, 2024
3348cb0
run precommit
EmanueleBVtech Dec 16, 2024
317a436
Update src/domains/ecommerce-app/04_apim_ecommerce_checkout.tf
EmanueleBVtech Dec 16, 2024
b4cfc56
Merge branch 'main' into CHK-3613-update-get-transaction-definition
pietro-tota Dec 16, 2024
6fdb2eb
Merge branch 'main' into CHK-3613-update-get-transaction-definition
pietro-tota Dec 17, 2024
e8f9af7
Merge branch 'main' into CHK-3613-update-get-transaction-definition
pietro-tota Dec 17, 2024
5ba7119
Merge branch 'main' into CHK-3613-update-get-transaction-definition
ciuffagianluca Dec 17, 2024
0703df0
fix(IAC deploy): restore missing test repo
pietro-tota Dec 17, 2024
d21afdc
fix: e2e tests
pietro-tota Dec 17, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions src/domains/ecommerce-app/04_apim_ecommerce_webview.tf
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,30 @@ module "apim_ecommerce_webview_api_v1" {
ecommerce_ingress_hostname = local.ecommerce_hostname
})
}

module "apim_ecommerce_webview_api_v2" {
EmanueleBVtech marked this conversation as resolved.
Show resolved Hide resolved
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/v1/_base_policy.xml.tpl", {
EmanueleBVtech marked this conversation as resolved.
Show resolved Hide resolved
ecommerce_ingress_hostname = local.ecommerce_hostname
})
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,77 @@
"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"
}
}
}
}
}
},
},
"/transactions": {
"post": {
"tags": [
Expand Down Expand Up @@ -351,6 +422,123 @@
"faultCodeDetail"
]
},
"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,
EmanueleBVtech marked this conversation as resolved.
Show resolved Hide resolved
"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"
},
"idCart": {
"description": "Cart identifier provided by creditor institution",
"type": "string",
"example": "idCartFromCreditorInstitution"
},
"clientId": {
"description": "transaction client id",
"type": "string",
"enum": [
"IO",
"CHECKOUT",
"CHECKOUT_CART",
"UNKNOWN"
]
},
"nodeInfo":{
"type": "object",
"description": "Node operation info",
"properties": {
"closePaymentResultError": {
"type": "object",
"description": "Error details for close payment result",
"properties": {
"statusCode": {
EmanueleBVtech marked this conversation as resolved.
Show resolved Hide resolved
"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"
}
}
},
"sendPaymentResultOutcome": {
"description": "The outcome of sendPaymentResult api (OK, KO, NOT_RECEIVED)",
"type": "string",
"enum": [
"OK",
"KO",
"NOT_RECEIVED"
]
},
}
},
"gatewayInfo":{
"type": "object",
"description": "Gateway infos",
"properties": {
"gateway": {
"type": "string",
"pattern": "NPG|REDIRECT",
"description": "Payment gateway identifier"
},
"authorizationStatus": {
"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"
]
},
"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",
Expand Down Expand Up @@ -763,6 +951,9 @@
"email": {
"type": "string"
},
"authToken": {
"type": "string"
},
EmanueleBVtech marked this conversation as resolved.
Show resolved Hide resolved
"idCart": {
"description": "Cart identifier provided by creditor institution",
"type": "string",
Expand Down
Loading
Loading