Skip to content

Commit

Permalink
Corrected the mock of Nodo to handle sendPaymentOutcome.
Browse files Browse the repository at this point in the history
  • Loading branch information
antoniotarricone committed Apr 17, 2024
1 parent e994415 commit 5e42878
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions src/core/policies/mil-mock-nodo-soap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,27 @@
<choose>
<when condition="@(((string)context.Variables["soapAction"]).Contains("verifyPaymentNotice"))">
<set-variable name="filePrefix" value="verifyPaymentNotice_" />
<!-- Retrieve the fiscalCode passed in the request body -->
<set-variable name="fiscalCodeRequest" value="@(
context.Request.Body.As<XElement>(preserveContent: true)
.Descendants()
.FirstOrDefault(x => x.Name.LocalName == "fiscalCode")?.Value
)" />
</when>
<when condition="@(((string)context.Variables["soapAction"]).Contains("activatePaymentNoticeV2"))">
<set-variable name="filePrefix" value="activatePaymentNotice_" />
<!-- Retrieve the fiscalCode passed in the request body -->
<set-variable name="fiscalCodeRequest" value="@(
context.Request.Body.As<XElement>(preserveContent: true)
.Descendants()
.FirstOrDefault(x => x.Name.LocalName == "fiscalCode")?.Value
)" />
</when>
<otherwise>
<set-variable name="filePrefix" value="sendPaymentOutcome_" />
<set-variable name="fiscalCodeRequest" value="00000000201" />
</otherwise>
</choose>
<!-- Retrieve the fiscalCode passed in the request body -->
<set-variable name="fiscalCodeRequest" value="@(
context.Request.Body.As<XElement>(preserveContent: true)
.Descendants()
.FirstOrDefault(x => x.Name.LocalName == "fiscalCode")?.Value
)" />
<!-- set the fiscalCodes001 as static string containing all fiscal code as stubs -->
<set-variable name="fiscalCodes" value="@(" 00000000001,00000000002,00000000003,00000000004,00000000005,00000000006,00000000007,00000000008,00000000009,00000000101,00000000102,00000000103,00000000104,00000000105,00000000106,00000000107,00000000108,00000000109,00000000201,00000000202,00000000203,00000000204,00000000205,00000000206,00000000207,00000000208,00000000209")" />
<choose>
Expand Down

0 comments on commit 5e42878

Please sign in to comment.