-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
949 additions
and
1,279 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
113 changes: 113 additions & 0 deletions
113
...bdd-test/features/NewMod3/flows/sendPaymentOutcome/sendPaymentOutcome_IDMP_SPO_08.feature
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,113 @@ | ||
Feature: semantic check for sendPaymentOutcomeReq regarding idempotency | ||
|
||
Background: | ||
Given systems up | ||
And initial XML activatePaymentNotice | ||
""" | ||
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:nod="http://pagopa-api.pagopa.gov.it/node/nodeForPsp.xsd"> | ||
<soapenv:Header/> | ||
<soapenv:Body> | ||
<nod:activatePaymentNoticeReq> | ||
<idPSP>70000000001</idPSP> | ||
<idBrokerPSP>70000000001</idBrokerPSP> | ||
<idChannel>70000000001_01</idChannel> | ||
<password>pwdpwdpwd</password> | ||
<idempotencyKey>#idempotency_key#</idempotencyKey> | ||
<qrCode> | ||
<fiscalCode>#creditor_institution_code_old#</fiscalCode> | ||
<noticeNumber>#notice_number_old#</noticeNumber> | ||
</qrCode> | ||
<expirationTime>15000</expirationTime> | ||
<amount>10.00</amount> | ||
<dueDate>2021-12-31</dueDate> | ||
<paymentNote>causale</paymentNote> | ||
</nod:activatePaymentNoticeReq> | ||
</soapenv:Body> | ||
</soapenv:Envelope> | ||
""" | ||
And nodo-dei-pagamenti has config parameter scheduler.jobName_idempotencyCacheClean.enabled set to false | ||
And nodo-dei-pagamenti has config parameter useIdempotency set to true | ||
|
||
# Activate Phase | ||
Scenario: Execute activatePaymentNotice1 request | ||
When PSP sends SOAP activatePaymentNotice to nodo-dei-pagamenti | ||
Then check outcome is OK of activatePaymentNotice response | ||
And saving activatePaymentNotice request in activatePaymentNotice1 | ||
|
||
Scenario: Execute activatePaymentNotice2 request | ||
Given the Execute activatePaymentNotice1 request scenario executed successfully | ||
And initial XML activatePaymentNotice | ||
""" | ||
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:nod="http://pagopa-api.pagopa.gov.it/node/nodeForPsp.xsd"> | ||
<soapenv:Header/> | ||
<soapenv:Body> | ||
<nod:activatePaymentNoticeReq> | ||
<idPSP>70000000001</idPSP> | ||
<idBrokerPSP>70000000001</idBrokerPSP> | ||
<idChannel>70000000001_01</idChannel> | ||
<password>pwdpwdpwd</password> | ||
<idempotencyKey>#idempotency_key#</idempotencyKey> | ||
<qrCode> | ||
<fiscalCode>#creditor_institution_code_old#</fiscalCode> | ||
<noticeNumber>#notice_number_old#</noticeNumber> | ||
</qrCode> | ||
<expirationTime>15000</expirationTime> | ||
<amount>10.00</amount> | ||
<dueDate>2021-12-31</dueDate> | ||
<paymentNote>causale</paymentNote> | ||
</nod:activatePaymentNoticeReq> | ||
</soapenv:Body> | ||
</soapenv:Envelope> | ||
""" | ||
When PSP sends SOAP activatePaymentNotice to nodo-dei-pagamenti | ||
Then check outcome is OK of activatePaymentNotice response | ||
And saving activatePaymentNotice request in activatePaymentNotice2 | ||
And save activatePaymentNotice response in activatePaymentNotice2 | ||
And checks the value NotNone of the record at column ID of the table IDEMPOTENCY_CACHE retrived by the query idempotency_cache_psp_1 on db nodo_online under macro NewMod3 | ||
And checks the value NotNone of the record at column ID of the table IDEMPOTENCY_CACHE retrived by the query idempotency_cache_psp_2 on db nodo_online under macro NewMod3 | ||
|
||
# Send payment outcome Phase | ||
Scenario: Execute sendPaymentOutcome request | ||
Given the Execute activatePaymentNotice2 request scenario executed successfully | ||
And initial XML sendPaymentOutcome | ||
""" | ||
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:nod="http://pagopa-api.pagopa.gov.it/node/nodeForPsp.xsd"> | ||
<soapenv:Header/> | ||
<soapenv:Body> | ||
<nod:sendPaymentOutcomeReq> | ||
<idPSP>70000000001</idPSP> | ||
<idBrokerPSP>70000000001</idBrokerPSP> | ||
<idChannel>70000000001_01</idChannel> | ||
<password>pwdpwdpwd</password> | ||
<idempotencyKey>#idempotency_key#</idempotencyKey> | ||
<paymentToken>$activatePaymentNotice2Response.paymentToken</paymentToken> | ||
<outcome>OK</outcome> | ||
<details> | ||
<paymentMethod>creditCard</paymentMethod> | ||
<paymentChannel>app</paymentChannel> | ||
<fee>2.00</fee> | ||
<payer> | ||
<uniqueIdentifier> | ||
<entityUniqueIdentifierType>F</entityUniqueIdentifierType> | ||
<entityUniqueIdentifierValue>JHNDOE00A01F205N</entityUniqueIdentifierValue> | ||
</uniqueIdentifier> | ||
<fullName>John Doe</fullName> | ||
<streetName>street</streetName> | ||
<civicNumber>12</civicNumber> | ||
<postalCode>89020</postalCode> | ||
<city>city</city> | ||
<stateProvinceRegion>MI</stateProvinceRegion> | ||
<country>IT</country> | ||
<e-mail>john.doe@test.it</e-mail> | ||
</payer> | ||
<applicationDate>2021-10-01</applicationDate> | ||
<transferDate>2021-10-02</transferDate> | ||
</details> | ||
</nod:sendPaymentOutcomeReq> | ||
</soapenv:Body> | ||
</soapenv:Envelope> | ||
""" | ||
When psp sends SOAP sendPaymentOutcome to nodo-dei-pagamenti | ||
Then check outcome is OK of sendPaymentOutcome response | ||
And checks the value NotNone of the record at column ID of the table IDEMPOTENCY_CACHE retrived by the query idempotency_cache_psp_1 on db nodo_online under macro NewMod3 | ||
And verify 0 record for the table IDEMPOTENCY_CACHE retrived by the query idempotency_cache_psp_2 on db nodo_online under macro NewMod3 |
111 changes: 111 additions & 0 deletions
111
...-test/features/NewMod3/flows/sendPaymentOutcome/sendPaymentOutcome_IDMP_SPO_08_01.feature
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,111 @@ | ||
Feature: semantic check for sendPaymentOutcomeReq regarding idempotency | ||
|
||
Background: | ||
Given systems up | ||
And initial XML activatePaymentNotice | ||
""" | ||
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:nod="http://pagopa-api.pagopa.gov.it/node/nodeForPsp.xsd"> | ||
<soapenv:Header/> | ||
<soapenv:Body> | ||
<nod:activatePaymentNoticeReq> | ||
<idPSP>70000000001</idPSP> | ||
<idBrokerPSP>70000000001</idBrokerPSP> | ||
<idChannel>70000000001_01</idChannel> | ||
<password>pwdpwdpwd</password> | ||
<idempotencyKey>#idempotency_key#</idempotencyKey> | ||
<qrCode> | ||
<fiscalCode>#creditor_institution_code_old#</fiscalCode> | ||
<noticeNumber>#notice_number_old#</noticeNumber> | ||
</qrCode> | ||
<expirationTime>15000</expirationTime> | ||
<amount>10.00</amount> | ||
<dueDate>2021-12-31</dueDate> | ||
<paymentNote>causale</paymentNote> | ||
</nod:activatePaymentNoticeReq> | ||
</soapenv:Body> | ||
</soapenv:Envelope> | ||
""" | ||
And nodo-dei-pagamenti has config parameter scheduler.jobName_idempotencyCacheClean.enabled set to false | ||
And nodo-dei-pagamenti has config parameter useIdempotency set to true | ||
|
||
# Activate Phase | ||
Scenario: Execute activatePaymentNotice1 request | ||
When PSP sends SOAP activatePaymentNotice to nodo-dei-pagamenti | ||
Then check outcome is OK of activatePaymentNotice response | ||
And saving activatePaymentNotice request in activatePaymentNotice1 | ||
|
||
Scenario: Execute activatePaymentNotice2 request | ||
Given the Execute activatePaymentNotice1 request scenario executed successfully | ||
And initial XML activatePaymentNotice | ||
""" | ||
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:nod="http://pagopa-api.pagopa.gov.it/node/nodeForPsp.xsd"> | ||
<soapenv:Header/> | ||
<soapenv:Body> | ||
<nod:activatePaymentNoticeReq> | ||
<idPSP>70000000001</idPSP> | ||
<idBrokerPSP>70000000001</idBrokerPSP> | ||
<idChannel>70000000001_01</idChannel> | ||
<password>pwdpwdpwd</password> | ||
<idempotencyKey>#idempotency_key#</idempotencyKey> | ||
<qrCode> | ||
<fiscalCode>#creditor_institution_code_old#</fiscalCode> | ||
<noticeNumber>#notice_number_old#</noticeNumber> | ||
</qrCode> | ||
<expirationTime>15000</expirationTime> | ||
<amount>10.00</amount> | ||
<dueDate>2021-12-31</dueDate> | ||
<paymentNote>causale</paymentNote> | ||
</nod:activatePaymentNoticeReq> | ||
</soapenv:Body> | ||
</soapenv:Envelope> | ||
""" | ||
When PSP sends SOAP activatePaymentNotice to nodo-dei-pagamenti | ||
Then check outcome is OK of activatePaymentNotice response | ||
And saving activatePaymentNotice request in activatePaymentNotice2 | ||
And save activatePaymentNotice response in activatePaymentNotice2 | ||
And checks the value NotNone of the record at column ID of the table IDEMPOTENCY_CACHE retrived by the query idempotency_cache_psp_2 on db nodo_online under macro NewMod3 | ||
|
||
# Send payment outcome Phase | ||
Scenario: Execute sendPaymentOutcome request | ||
Given the Execute activatePaymentNotice2 request scenario executed successfully | ||
And initial XML sendPaymentOutcome | ||
""" | ||
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:nod="http://pagopa-api.pagopa.gov.it/node/nodeForPsp.xsd"> | ||
<soapenv:Header/> | ||
<soapenv:Body> | ||
<nod:sendPaymentOutcomeReq> | ||
<idPSP>70000000001</idPSP> | ||
<idBrokerPSP>70000000001</idBrokerPSP> | ||
<idChannel>70000000001_01</idChannel> | ||
<password>pwdpwdpwd</password> | ||
<paymentToken>$activatePaymentNotice2Response.paymentToken</paymentToken> | ||
<outcome>OK</outcome> | ||
<details> | ||
<paymentMethod>creditCard</paymentMethod> | ||
<paymentChannel>app</paymentChannel> | ||
<fee>2.00</fee> | ||
<payer> | ||
<uniqueIdentifier> | ||
<entityUniqueIdentifierType>F</entityUniqueIdentifierType> | ||
<entityUniqueIdentifierValue>JHNDOE00A01F205N</entityUniqueIdentifierValue> | ||
</uniqueIdentifier> | ||
<fullName>John Doe</fullName> | ||
<streetName>street</streetName> | ||
<civicNumber>12</civicNumber> | ||
<postalCode>89020</postalCode> | ||
<city>city</city> | ||
<stateProvinceRegion>MI</stateProvinceRegion> | ||
<country>IT</country> | ||
<e-mail>john.doe@test.it</e-mail> | ||
</payer> | ||
<applicationDate>2021-10-01</applicationDate> | ||
<transferDate>2021-10-02</transferDate> | ||
</details> | ||
</nod:sendPaymentOutcomeReq> | ||
</soapenv:Body> | ||
</soapenv:Envelope> | ||
""" | ||
When psp sends SOAP sendPaymentOutcome to nodo-dei-pagamenti | ||
Then check outcome is OK of sendPaymentOutcome response | ||
And checks the value NotNone of the record at column ID of the table IDEMPOTENCY_CACHE retrived by the query idempotency_cache_psp_1 on db nodo_online under macro NewMod3 | ||
And verify 0 record for the table IDEMPOTENCY_CACHE retrived by the query idempotency_cache_psp_2 on db nodo_online under macro NewMod3 |
125 changes: 125 additions & 0 deletions
125
...-test/features/NewMod3/flows/sendPaymentOutcome/sendPaymentOutcome_IDMP_SPO_08_02.feature
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,125 @@ | ||
Feature: semantic check for sendPaymentOutcomeReq regarding idempotency | ||
|
||
Background: | ||
Given systems up | ||
And initial XML activatePaymentNotice | ||
""" | ||
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:nod="http://pagopa-api.pagopa.gov.it/node/nodeForPsp.xsd"> | ||
<soapenv:Header/> | ||
<soapenv:Body> | ||
<nod:activatePaymentNoticeReq> | ||
<idPSP>70000000001</idPSP> | ||
<idBrokerPSP>70000000001</idBrokerPSP> | ||
<idChannel>70000000001_01</idChannel> | ||
<password>pwdpwdpwd</password> | ||
<idempotencyKey>#idempotency_key#</idempotencyKey> | ||
<qrCode> | ||
<fiscalCode>#creditor_institution_code_old#</fiscalCode> | ||
<noticeNumber>#notice_number_old#</noticeNumber> | ||
</qrCode> | ||
<expirationTime>15000</expirationTime> | ||
<amount>10.00</amount> | ||
<dueDate>2021-12-31</dueDate> | ||
<paymentNote>causale</paymentNote> | ||
</nod:activatePaymentNoticeReq> | ||
</soapenv:Body> | ||
</soapenv:Envelope> | ||
""" | ||
And nodo-dei-pagamenti has config parameter scheduler.jobName_idempotencyCacheClean.enabled set to false | ||
And nodo-dei-pagamenti has config parameter useIdempotency set to true | ||
|
||
# Activate Phase | ||
Scenario: Execute activatePaymentNotice1 request | ||
When PSP sends SOAP activatePaymentNotice to nodo-dei-pagamenti | ||
Then check outcome is OK of activatePaymentNotice response | ||
And saving activatePaymentNotice request in activatePaymentNotice1 | ||
|
||
# Send payment outcome Phase | ||
Scenario: Execute sendPaymentOutcome request | ||
Given the Execute activatePaymentNotice1 request scenario executed successfully | ||
And initial XML sendPaymentOutcome | ||
""" | ||
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:nod="http://pagopa-api.pagopa.gov.it/node/nodeForPsp.xsd"> | ||
<soapenv:Header/> | ||
<soapenv:Body> | ||
<nod:sendPaymentOutcomeReq> | ||
<idPSP>70000000001</idPSP> | ||
<idBrokerPSP>70000000001</idBrokerPSP> | ||
<idChannel>70000000001_01</idChannel> | ||
<password>pwdpwdpwd</password> | ||
<paymentToken>$activatePaymentNoticeResponse.paymentToken</paymentToken> | ||
<outcome>OK</outcome> | ||
<details> | ||
<paymentMethod>creditCard</paymentMethod> | ||
<paymentChannel>app</paymentChannel> | ||
<fee>2.00</fee> | ||
<payer> | ||
<uniqueIdentifier> | ||
<entityUniqueIdentifierType>F</entityUniqueIdentifierType> | ||
<entityUniqueIdentifierValue>JHNDOE00A01F205N</entityUniqueIdentifierValue> | ||
</uniqueIdentifier> | ||
<fullName>John Doe</fullName> | ||
<streetName>street</streetName> | ||
<civicNumber>12</civicNumber> | ||
<postalCode>89020</postalCode> | ||
<city>city</city> | ||
<stateProvinceRegion>MI</stateProvinceRegion> | ||
<country>IT</country> | ||
<e-mail>john.doe@test.it</e-mail> | ||
</payer> | ||
<applicationDate>2021-10-01</applicationDate> | ||
<transferDate>2021-10-02</transferDate> | ||
</details> | ||
</nod:sendPaymentOutcomeReq> | ||
</soapenv:Body> | ||
</soapenv:Envelope> | ||
""" | ||
When psp sends SOAP sendPaymentOutcome to nodo-dei-pagamenti | ||
Then check outcome is OK of sendPaymentOutcome response | ||
And verify 0 record for the table IDEMPOTENCY_CACHE retrived by the query idempotency_cache_psp_1 on db nodo_online under macro NewMod3 | ||
|
||
Scenario: Execute activatePaymentNotice2 request | ||
Given the Execute sendPaymentOutcome request scenario executed successfully | ||
And initial XML activatePaymentNotice | ||
""" | ||
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:nod="http://pagopa-api.pagopa.gov.it/node/nodeForPsp.xsd"> | ||
<soapenv:Header/> | ||
<soapenv:Body> | ||
<nod:activatePaymentNoticeReq> | ||
<idPSP>70000000001</idPSP> | ||
<idBrokerPSP>70000000001</idBrokerPSP> | ||
<idChannel>70000000001_01</idChannel> | ||
<password>pwdpwdpwd</password> | ||
<idempotencyKey>$activatePaymentNotice1.idempotencyKey</idempotencyKey> | ||
<qrCode> | ||
<fiscalCode>#creditor_institution_code_old#</fiscalCode> | ||
<noticeNumber>#notice_number_old#</noticeNumber> | ||
</qrCode> | ||
<expirationTime>15000</expirationTime> | ||
<amount>10.00</amount> | ||
<dueDate>2021-12-31</dueDate> | ||
<paymentNote>causale</paymentNote> | ||
</nod:activatePaymentNoticeReq> | ||
</soapenv:Body> | ||
</soapenv:Envelope> | ||
""" | ||
When PSP sends SOAP activatePaymentNotice to nodo-dei-pagamenti | ||
Then check outcome is OK of activatePaymentNotice response | ||
And saving activatePaymentNotice request in activatePaymentNotice2 | ||
And save activatePaymentNotice response in activatePaymentNotice2 | ||
|
||
|
||
Scenario: DB check | ||
Given the Execute activatePaymentNotice2 request scenario executed successfully | ||
Then check datetime plus number of date 0 of the record at column VALID_TO of the table IDEMPOTENCY_CACHE retrived by the query idempotency_cache_psp_2 on db nodo_online under macro NewMod3 | ||
And checks the value NotNone of the record at column ID of the table IDEMPOTENCY_CACHE retrived by the query idempotency_cache_psp_2 on db nodo_online under macro NewMod3 | ||
And checks the value $activatePaymentNotice2.fiscalCode of the record at column PA_FISCAL_CODE of the table IDEMPOTENCY_CACHE retrived by the query idempotency_cache_psp_2 on db nodo_online under macro NewMod3 | ||
And checks the value $activatePaymentNotice2.idPSP of the record at column PSP_ID of the table IDEMPOTENCY_CACHE retrived by the query idempotency_cache_psp_2 on db nodo_online under macro NewMod3 | ||
And checks the value $activatePaymentNotice2.noticeNumber of the record at column NOTICE_ID of the table IDEMPOTENCY_CACHE retrived by the query idempotency_cache_psp_2 on db nodo_online under macro NewMod3 | ||
And checks the value $activatePaymentNotice2.idempotencyKey of the record at column IDEMPOTENCY_KEY of the table IDEMPOTENCY_CACHE retrived by the query idempotency_cache_psp_2 on db nodo_online under macro NewMod3 | ||
And checks the value $activatePaymentNotice2Response.paymentToken of the record at column TOKEN of the table IDEMPOTENCY_CACHE retrived by the query idempotency_cache_psp_2 on db nodo_online under macro NewMod3 | ||
And checks the value NotNone of the record at column HASH_REQUEST of the table IDEMPOTENCY_CACHE retrived by the query idempotency_cache_psp_2 on db nodo_online under macro NewMod3 | ||
And checks the value NotNone of the record at column RESPONSE of the table IDEMPOTENCY_CACHE retrived by the query idempotency_cache_psp_2 on db nodo_online under macro NewMod3 | ||
And checks the value NotNone of the record at column INSERTED_TIMESTAMP of the table IDEMPOTENCY_CACHE retrived by the query idempotency_cache_psp_2 on db nodo_online under macro NewMod3 | ||
|
||
|
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.