Skip to content

Commit

Permalink
Corretto problema nella testsuite dove i pagamenti modello 3 SANP 2.3…
Browse files Browse the repository at this point in the history
… non venivano attivati a causa di un'errore di impostazione del simulatore.
  • Loading branch information
pintorig committed Oct 18, 2021
1 parent ec1fa58 commit 413fa91
Show file tree
Hide file tree
Showing 10 changed files with 61 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,15 +105,15 @@ And match response == read('classpath:test/api/backoffice/v1/pendenze/put/msg/pe

# Verifico il pagamento

* call read('classpath:utils/psp-verifica-rpt.feature')
* call read('classpath:utils/psp-paVerifyPaymentNotice.feature')
* match response == esitoVerifyPayment
* def ccp = response.ccp
* def ccp_numero_avviso = response.ccp

# Attivo il pagamento

* def tipoRicevuta = "R01"
* call read('classpath:utils/psp-attiva-rpt.feature')
* call read('classpath:utils/psp-paGetPayment.feature')
* match response.dati == esitoGetPayment

# Verifico la notifica di attivazione
Expand Down Expand Up @@ -198,15 +198,15 @@ And match response == read('classpath:test/api/backoffice/v1/pendenze/put/msg/pe

# Verifico il pagamento

* call read('classpath:utils/psp-verifica-rpt.feature')
* call read('classpath:utils/psp-paVerifyPaymentNotice.feature')
* match response == esitoVerifyPayment
* def ccp = response.ccp
* def ccp_numero_avviso = response.ccp

# Attivo il pagamento

* def tipoRicevuta = "R01"
* call read('classpath:utils/psp-attiva-rpt.feature')
* call read('classpath:utils/psp-paGetPayment.feature')
* match response.dati == esitoGetPayment

# Verifico la notifica di attivazione
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Then assert responseStatus == 200 || responseStatus == 201
Scenario: Verifica pagamento

* def numeroAvviso = '000000000000000000'
* call read('classpath:utils/psp-verifica-rpt.feature')
* call read('classpath:utils/psp-paVerifyPaymentNotice.feature')
* match response.faultBean == faultBean

Scenario: Attiva pagamento
Expand All @@ -46,6 +46,6 @@ Scenario: Attiva pagamento
* def ccp = '1'
* def importo = 10.01
* def tipoRicevuta = "R01"
* call read('classpath:utils/psp-attiva-rpt.feature')
* call read('classpath:utils/psp-paGetPayment.feature')
* match response.faultBean == faultBean

Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ Then assert responseStatus == 200 || responseStatus == 201

# Verifico il pagamento

* call read('classpath:utils/psp-verifica-rpt.feature')
* call read('classpath:utils/psp-paVerifyPaymentNotice.feature')
* match response == esitoVerifyPayment
* def ccp = response.ccp
* def ccp_numero_avviso = response.ccp

# Attivo il pagamento

* def tipoRicevuta = "R01"
* call read('classpath:utils/psp-attiva-rpt.feature')
* call read('classpath:utils/psp-paGetPayment.feature')
* match response.dati == esitoGetPayment

# Verifico la notifica di attivazione
Expand Down Expand Up @@ -77,7 +77,7 @@ Then assert responseStatus == 200 || responseStatus == 201

# Verifico il pagamento

* call read('classpath:utils/psp-verifica-rpt.feature')
* call read('classpath:utils/psp-paVerifyPaymentNotice.feature')
* match response.faultBean ==
"""
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ Then assert responseStatus == 200 || responseStatus == 201

# Verifico il pagamento

* call read('classpath:utils/psp-verifica-rpt.feature')
* call read('classpath:utils/psp-paVerifyPaymentNotice.feature')
* match response == esitoVerifyPayment
* def ccp = response.ccp
* def ccp_numero_avviso = response.ccp

# Attivo il pagamento

* def tipoRicevuta = "R01"
* call read('classpath:utils/psp-attiva-rpt.feature')
* call read('classpath:utils/psp-paGetPayment.feature')
* match response.dati == esitoGetPayment

# Verifico la notifica di attivazione
Expand Down Expand Up @@ -103,7 +103,7 @@ Then assert responseStatus == 200 || responseStatus == 201

# Verifico il pagamento

* call read('classpath:utils/psp-verifica-rpt.feature')
* call read('classpath:utils/psp-paVerifyPaymentNotice.feature')
* match response == esitoVerifyPayment
* def ccp = response.ccp
* def ccp_numero_avviso = response.ccp
Expand All @@ -113,7 +113,7 @@ Then assert responseStatus == 200 || responseStatus == 201
# NON_ESEGUITO_SANP_24("R22")

* def tipoRicevuta = "R22"
* call read('classpath:utils/psp-attiva-rpt.feature')
* call read('classpath:utils/psp-paGetPayment.feature')
* match response.dati == esitoGetPayment

# Verifico la notifica di attivazione
Expand All @@ -132,15 +132,15 @@ Then assert responseStatus == 200 || responseStatus == 201

# Verifico il pagamento

* call read('classpath:utils/psp-verifica-rpt.feature')
* call read('classpath:utils/psp-paVerifyPaymentNotice.feature')
* match response == esitoVerifyPayment
* def ccp = response.ccp
* def ccp_numero_avviso = response.ccp

# Attivo il pagamento

* def tipoRicevuta = "R01"
* call read('classpath:utils/psp-attiva-rpt.feature')
* call read('classpath:utils/psp-paGetPayment.feature')
* match response.dati == esitoGetPayment

# Verifico la notifica di attivazione
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Then assert responseStatus == 200 || responseStatus == 201

# Verifico il pagamento

* call read('classpath:utils/psp-verifica-rpt.feature')
* call read('classpath:utils/psp-paVerifyPaymentNotice.feature')
* match response == esitoVerifyPayment
* def ccp = response.ccp
* def ccp_numero_avviso = response.ccp
Expand All @@ -51,7 +51,7 @@ Then assert responseStatus == 200 || responseStatus == 201
# NON_ESEGUITO_SANP_24("R22")

* def tipoRicevuta = "R22"
* call read('classpath:utils/psp-attiva-rpt.feature')
* call read('classpath:utils/psp-paGetPayment.feature')
* match response.dati == esitoGetPayment

# Verifico la notifica di attivazione
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,5 @@ And param ccp = ccp
And param importo = importo
And param tipoRicevuta = tipoRicevuta
And param ibanAccredito = ibanAccredito
And param versione = versionePagamento
When method get
Then assert responseStatus == 200
27 changes: 27 additions & 0 deletions integration-test/src/test/java/utils/psp-paGetPayment.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Feature: Attivazione della rpt API SANP 2.4

# PAGAMENTO_ESEGUITO_SENZA_RPT ("R00"),
# PAGAMENTO_ESEGUITO ("R01"),
# PAGAMENTO_NON_ESEGUITO ("R02"),
# PAGAMENTO_PARZIALMENTE_ESEGUITO ("R03"),
# DECORRENZA_TERMINI ("R04"),
# DECORRENZA_TERMINI_PARZIALE ("R05"),
# PAGAMENTO_ESEGUITO_SENZA_RPT_CON_RT("R12");

Background:

* def ndpsym_psp_url = ndpsym_url + '/psp/rs/psp'

Scenario:

Given url ndpsym_psp_url
And path 'attiva'
And param codDominio = idDominio
And param numeroAvviso = numeroAvviso
And param ccp = ccp
And param importo = importo
And param tipoRicevuta = tipoRicevuta
And param ibanAccredito = ibanAccredito
And param versione = versionePagamento
When method get
Then assert responseStatus == 200
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Feature: Verifica della rpt API SANP 2.4

Background:

* def ndpsym_psp_url = ndpsym_url + '/psp/rs/psp'

Scenario:

Given url ndpsym_psp_url
And path 'verifica'
And param codDominio = idDominio
And param numeroAvviso = numeroAvviso
And param versione = versionePagamento
When method get
Then assert responseStatus == 200
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,5 @@ Given url ndpsym_psp_url
And path 'verifica'
And param codDominio = idDominio
And param numeroAvviso = numeroAvviso
And param versione = versionePagamento
When method get
Then assert responseStatus == 200
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,8 @@ public static Rpt acquisisciRT(String codDominio, String iuv, PaSendRTReq ctRt,
ctx.getApplicationLogger().log("rt.acquisizione");
}

// aggiornamento del campo CCP con il valore RecepitID
rpt.setCcp(ctReceipt.getReceiptId());
rpt.setCodMsgRicevuta(ctReceipt.getReceiptId());
rpt.setDataMsgRicevuta(new Date());
rpt.setEsitoPagamento(rptEsito);
Expand Down

0 comments on commit 413fa91

Please sign in to comment.