generated from pagopa/terraform-infrastructure-template
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into PAGOPA-2479-v3-gpd-api
- Loading branch information
Showing
97 changed files
with
2,400 additions
and
1,005 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 64 additions & 0 deletions
64
src/core/api/payment_manager_api/pm-per-nodo/v2/wisp-sendpaymentresult-uat.xml.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
<!-- | ||
IMPORTANT: | ||
- Policy elements can appear only within the <inbound>, <outbound>, <backend> section elements. | ||
- To apply a policy to the incoming request (before it is forwarded to the backend service), place a corresponding policy element within the <inbound> section element. | ||
- To apply a policy to the outgoing response (before it is sent back to the caller), place a corresponding policy element within the <outbound> section element. | ||
- To add a policy, place the cursor at the desired insertion point and select a policy from the sidebar. | ||
- To remove a policy, delete the corresponding policy statement from the policy document. | ||
- Position the <base> element within a section element to inherit all policies from the corresponding section element in the enclosing scope. | ||
- Remove the <base> element to prevent inheriting policies from the corresponding section element in the enclosing scope. | ||
- Policies are applied in the order of their appearance, from the top down. | ||
- Comments within policy elements are not supported and may disappear. Place your comments between policy elements or at a higher level scope. | ||
--> | ||
|
||
<!-- policy closePaymentV2 & sendPaymentResultV2 : | ||
- On outbound call /receipt/KO wisp-conv | ||
- On inbound call /receipt/timer wisp-conv | ||
--> | ||
|
||
<policies> | ||
<inbound> | ||
<base /> | ||
<set-variable name="clientId" value="@(context.Request.OriginalUrl.Query.GetValueOrDefault("clientId"))" /> | ||
<choose> | ||
<when condition="@("ecomm".Equals(context.Variables["clientId"]))"> | ||
<set-backend-service base-url="@("https://${ecommerce_ingress_hostname}/pagopa-ecommerce-transactions-service/")" /> | ||
</when> | ||
<otherwise> | ||
<set-header name="Ocp-Apim-Subscription-Key" exists-action="override"> | ||
<value>{{ecommerce-dev-sendpaymentresult-subscription-key-value}}</value> | ||
</set-header> | ||
<set-backend-service base-url="https://api.dev.platform.pagopa.it/ecommerce/transaction-user-receipts-service/v1" /> | ||
</otherwise> | ||
</choose> | ||
<!-- policy for WISP Dismantling --> | ||
<set-variable name="enable_wisp_dismantling_switch" value="{{enable-wisp-dismantling-switch}}" /> | ||
<choose> | ||
<when condition="@(context.Variables.GetValueOrDefault<string>("enable_wisp_dismantling_switch", "").Equals("true"))"> | ||
<set-variable name="primitive-ko" value="sendPaymentResultV2" /> | ||
<set-variable name="request-body" value="@(context.Request.Body.As<JObject>(preserveContent: true))" /> | ||
<set-variable name="wisp-payment-tokens" value="@{ | ||
try { | ||
JObject request = (JObject) context.Variables["request-body"]; | ||
JArray payments = (JArray) request.Property("payments").Value; | ||
return string.Join(",", payments.Select(payment => payment["paymentToken"].ToString())); | ||
} catch (Exception e) { | ||
return ""; | ||
} | ||
}" /> | ||
<include-fragment fragment-id="wisp-disable-payment-token-timer" /> | ||
</when> | ||
</choose> | ||
</inbound> | ||
<backend> | ||
<base /> | ||
</backend> | ||
<outbound> | ||
<base /> | ||
<!-- fragment necessary for WISP Dismantling --> | ||
<include-fragment fragment-id="wisp-receipt-ko" /> | ||
</outbound> | ||
<on-error> | ||
<base /> | ||
</on-error> | ||
</policies> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.