@@ -981,4 +981,334 @@ And match response /RT/versioneOggetto == '6.2.0'
981
981
982
982
983
983
984
+ Scenario : Filtro su retrocompatibilitaMessaggiPagoPAV1 per una RPT SANP 2.4.0 con MBT
985
+
986
+ * def versionePagamento = 3
987
+
988
+ * def dataRptStart = getDateTime()
989
+ * def idPendenza = getCurrentTimeMillis()
990
+ * def pendenzaPut = read('classpath:test/api/pendenza/v1/pendenze/put/msg/pendenza-put_monovoce_bollo.json' )
991
+ * def numeroAvviso = buildNumeroAvviso(dominio, applicazione)
992
+ * set pendenzaPut.numeroAvviso = numeroAvviso
993
+ # * set pendenzaPut.importo = 125.99
994
+ # * set pendenzaPut.voci[0].importo = 100.99
995
+
996
+ * call read('classpath:utils/pa-carica-avviso.feature' )
997
+ * def responsePut = response
998
+ # * def numeroAvviso = response.numeroAvviso
999
+ * def iuv = getIuvFromNumeroAvviso(numeroAvviso)
1000
+ * def importo = pendenzaPut.importo
1001
+
1002
+ Given url backofficeBaseurl
1003
+ And path '/pendenze' , idA2A, idPendenza
1004
+ And headers gpAdminBasicAutenticationHeader
1005
+ When method get
1006
+ Then status 200
1007
+ And match response == read('classpath:test/api/backoffice/v1/pendenze/put/msg/pendenza-get.json' )
1008
+
1009
+ * match response.numeroAvviso == responsePut.numeroAvviso
1010
+ * match response.stato == 'NON_ESEGUITA'
1011
+ * match response.voci == '#[1]'
1012
+ * match response.voci[0].indice == 1
1013
+ * match response.voci[0].stato == 'Non eseguito'
1014
+
1015
+ # Configurazione dell'applicazione
1016
+
1017
+ * def applicazione = read('classpath:configurazione/v1/msg/applicazione.json' )
1018
+ * set applicazione.servizioIntegrazione.url = ente_api_url + '/v2'
1019
+ * set applicazione.servizioIntegrazione.versioneApi = 'REST v1'
1020
+
1021
+ * def basicAutenticationHeader = getBasicAuthenticationHeader( { username: govpay_backoffice_user, password: govpay_backoffice_password } )
1022
+
1023
+ Given url backofficeBaseurl
1024
+ And path 'applicazioni' , idA2A
1025
+ And headers gpAdminBasicAutenticationHeader
1026
+ And request applicazione
1027
+ When method put
1028
+ Then assert responseStatus == 200 || responseStatus == 201
1029
+
1030
+ * call read('classpath:configurazione/v1/operazioni-resetCache.feature' )
1031
+
1032
+ * call read('classpath:utils/psp-paVerifyPaymentNotice.feature' )
1033
+ * match response == esitoVerifyPayment
1034
+ * def ccp = response.ccp
1035
+ * def ccp_numero_avviso = response.ccp
1036
+
1037
+ # Attivo il pagamento
1038
+
1039
+ * def tipoRicevuta = "R01"
1040
+ * call read('classpath:utils/psp-paGetPayment.feature' )
1041
+ * def esitoGetPaymentV2 = read('classpath:test/workflow/modello3/v2/msg/getPaymentV2-bollo-response-ok.json' )
1042
+ * match response.dati == esitoGetPaymentV2
1043
+
1044
+ # Verifico la notifica di attivazione
1045
+
1046
+ * def ccp = 'n_a'
1047
+ * call read('classpath:utils/pa-notifica-attivazione.feature' )
1048
+ * match response == read('classpath:test/workflow/modello3/v2/msg/notifica-attivazione_bollo.json' )
1049
+
1050
+ # Verifico la notifica di terminazione
1051
+
1052
+ * def ccp = 'n_a'
1053
+ * call read('classpath:utils/pa-notifica-terminazione.feature' )
1054
+
1055
+ * def ccp = ccp_numero_avviso
1056
+ * match response == read('classpath:test/workflow/modello3/v2/msg/notifica-terminazione-eseguito_bollo.json' )
1057
+
1058
+ * def dataRptEnd2 = getDateTime()
1059
+
1060
+ # Ho avviato due pagamenti. Verifico i filtri per la retrocompatibilita' valori: null, false e true
1061
+ # retrocompatibilitaMessaggiPagoPAV1 = null
1062
+
1063
+ Given url backofficeBaseurl
1064
+ And path '/rpp'
1065
+ And param esito = 'ESEGUITO'
1066
+ And param idPendenza = idPendenza
1067
+ And headers gpAdminBasicAutenticationHeader
1068
+ When method get
1069
+ Then status 200
1070
+ And match response ==
1071
+ """
1072
+ {
1073
+ numRisultati: 1,
1074
+ numPagine: 1,
1075
+ risultatiPerPagina: 25,
1076
+ pagina: 1,
1077
+ prossimiRisultati: '##null',
1078
+ risultati: '#[1]'
1079
+ }
1080
+ """
1081
+ And match response.risultati[0].pendenza.idPendenza == '#(""+idPendenza)'
1082
+ And match response.risultati[0].rt == '#notnull'
1083
+ And match response.risultati[0].rpt.versioneOggetto == '#notpresent'
1084
+ And match response.risultati[0].rt.versioneOggetto == '#notpresent'
1085
+
1086
+ * def idDominioDet = response.risultati[0].rt.fiscalCode
1087
+ * def iuvDet = response.risultati[0].rpt.creditorReferenceId
1088
+ * def ccpDet = response.risultati[0].rt.receiptId
1089
+
1090
+ # dettaglio rpp
1091
+
1092
+ Given url backofficeBaseurl
1093
+ And path '/rpp' , idDominioDet, iuvDet, ccpDet
1094
+ And headers gpAdminBasicAutenticationHeader
1095
+ When method get
1096
+ Then status 200
1097
+ And match response.pendenza.idPendenza == '#(""+idPendenza)'
1098
+ And match response.rt == '#notnull'
1099
+ And match response.rpt.versioneOggetto == '#notpresent'
1100
+ And match response.rt.versioneOggetto == '#notpresent'
1101
+
1102
+ # rpt formato json
1103
+
1104
+ Given url backofficeBaseurl
1105
+ And path '/rpp' , idDominioDet, iuvDet, ccpDet, 'rpt'
1106
+ And headers gpAdminBasicAutenticationHeader
1107
+ When method get
1108
+ Then status 200
1109
+ And match response.versioneOggetto == '#notpresent'
1110
+
1111
+ # rt formato json
1112
+
1113
+ Given url backofficeBaseurl
1114
+ And path '/rpp' , idDominioDet, iuvDet, ccpDet, 'rt'
1115
+ And headers gpAdminBasicAutenticationHeader
1116
+ When method get
1117
+ Then status 200
1118
+ And match response.versioneOggetto == '#notpresent'
1119
+
1120
+ # rpt formato xml
1121
+
1122
+ Given url backofficeBaseurl
1123
+ And path '/rpp' , idDominioDet, iuvDet, ccpDet, 'rpt'
1124
+ And header Accept = 'application/xml'
1125
+ And headers gpAdminBasicAutenticationHeader
1126
+ When method get
1127
+ Then status 200
1128
+ And match response /paGetPaymentV2Response/data/creditorReferenceId == iuvDet
1129
+
1130
+ # rt formato xml
1131
+
1132
+ Given url backofficeBaseurl
1133
+ And path '/rpp' , idDominioDet, iuvDet, ccpDet, 'rt'
1134
+ And header Accept = 'application/xml'
1135
+ And headers gpAdminBasicAutenticationHeader
1136
+ When method get
1137
+ Then status 200
1138
+ And match response /paSendRTV2Request/receipt/receiptId == ccpDet
1139
+
1140
+ # retrocompatibilitaMessaggiPagoPAV1 = false
1141
+
1142
+ Given url backofficeBaseurl
1143
+ And path '/rpp'
1144
+ And param esito = 'ESEGUITO'
1145
+ And param idPendenza = idPendenza
1146
+ And param retrocompatibilitaMessaggiPagoPAV1 = false
1147
+ And headers gpAdminBasicAutenticationHeader
1148
+ When method get
1149
+ Then status 200
1150
+ And match response ==
1151
+ """
1152
+ {
1153
+ numRisultati: 1,
1154
+ numPagine: 1,
1155
+ risultatiPerPagina: 25,
1156
+ pagina: 1,
1157
+ prossimiRisultati: '##null',
1158
+ risultati: '#[1]'
1159
+ }
1160
+ """
1161
+ And match response.risultati[0].pendenza.idPendenza == '#(""+idPendenza)'
1162
+ And match response.risultati[0].rt == '#notnull'
1163
+ And match response.risultati[0].rpt.versioneOggetto == '#notpresent'
1164
+ And match response.risultati[0].rt.versioneOggetto == '#notpresent'
1165
+
1166
+ * def idDominioDet = response.risultati[0].rt.fiscalCode
1167
+ * def iuvDet = response.risultati[0].rpt.creditorReferenceId
1168
+ * def ccpDet = response.risultati[0].rt.receiptId
1169
+
1170
+ # dettaglio rpp
1171
+
1172
+ Given url backofficeBaseurl
1173
+ And path '/rpp' , idDominioDet, iuvDet, ccpDet
1174
+ And param retrocompatibilitaMessaggiPagoPAV1 = false
1175
+ And headers gpAdminBasicAutenticationHeader
1176
+ When method get
1177
+ Then status 200
1178
+ And match response.pendenza.idPendenza == '#(""+idPendenza)'
1179
+ And match response.rt == '#notnull'
1180
+ And match response.rpt.versioneOggetto == '#notpresent'
1181
+ And match response.rt.versioneOggetto == '#notpresent'
1182
+
1183
+ # rpt formato json
1184
+
1185
+ Given url backofficeBaseurl
1186
+ And path '/rpp' , idDominioDet, iuvDet, ccpDet, 'rpt'
1187
+ And param retrocompatibilitaMessaggiPagoPAV1 = false
1188
+ And headers gpAdminBasicAutenticationHeader
1189
+ When method get
1190
+ Then status 200
1191
+ And match response.versioneOggetto == '#notpresent'
1192
+
1193
+ # rt formato json
1194
+
1195
+ Given url backofficeBaseurl
1196
+ And path '/rpp' , idDominioDet, iuvDet, ccpDet, 'rt'
1197
+ And param retrocompatibilitaMessaggiPagoPAV1 = false
1198
+ And headers gpAdminBasicAutenticationHeader
1199
+ When method get
1200
+ Then status 200
1201
+ And match response.versioneOggetto == '#notpresent'
1202
+
1203
+ # rpt formato xml
1204
+
1205
+ Given url backofficeBaseurl
1206
+ And path '/rpp' , idDominioDet, iuvDet, ccpDet, 'rpt'
1207
+ And param retrocompatibilitaMessaggiPagoPAV1 = false
1208
+ And header Accept = 'application/xml'
1209
+ And headers gpAdminBasicAutenticationHeader
1210
+ When method get
1211
+ Then status 200
1212
+ And match response /paGetPaymentV2Response/data/creditorReferenceId == iuvDet
1213
+
1214
+ # rt formato xml
1215
+
1216
+ Given url backofficeBaseurl
1217
+ And path '/rpp' , idDominioDet, iuvDet, ccpDet, 'rt'
1218
+ And param retrocompatibilitaMessaggiPagoPAV1 = false
1219
+ And header Accept = 'application/xml'
1220
+ And headers gpAdminBasicAutenticationHeader
1221
+ When method get
1222
+ Then status 200
1223
+ And match response /paSendRTV2Request/receipt/receiptId == ccpDet
1224
+
1225
+
1226
+ # retrocompatibilitaMessaggiPagoPAV1 = true
1227
+
1228
+ Given url backofficeBaseurl
1229
+ And path '/rpp'
1230
+ And param esito = 'ESEGUITO'
1231
+ And param idPendenza = idPendenza
1232
+ And param retrocompatibilitaMessaggiPagoPAV1 = true
1233
+ And headers gpAdminBasicAutenticationHeader
1234
+ When method get
1235
+ Then status 200
1236
+ And match response ==
1237
+ """
1238
+ {
1239
+ numRisultati: 1,
1240
+ numPagine: 1,
1241
+ risultatiPerPagina: 25,
1242
+ pagina: 1,
1243
+ prossimiRisultati: '##null',
1244
+ risultati: '#[1]'
1245
+ }
1246
+ """
1247
+ And match response.risultati[0].pendenza.idPendenza == '#(""+idPendenza)'
1248
+ And match response.risultati[0].rt == '#notnull'
1249
+ And match response.risultati[0].rt.datiPagamento.codiceEsitoPagamento == '0'
1250
+ And match response.risultati[0].rpt.versioneOggetto == '6.2.0'
1251
+ And match response.risultati[0].rt.versioneOggetto == '6.2.0'
1252
+
1253
+ * def idDominioDet = response.risultati[0].rpt.dominio.identificativoDominio
1254
+ * def iuvDet = response.risultati[0].rpt.datiVersamento.identificativoUnivocoVersamento
1255
+ * def ccpDet = response.risultati[0].rt.datiPagamento.CodiceContestoPagamento
1256
+
1257
+ # dettaglio rpp
1258
+
1259
+ Given url backofficeBaseurl
1260
+ And path '/rpp' , idDominioDet, iuvDet, ccpDet
1261
+ And param retrocompatibilitaMessaggiPagoPAV1 = true
1262
+ And headers gpAdminBasicAutenticationHeader
1263
+ When method get
1264
+ Then status 200
1265
+ And match response.pendenza.idPendenza == '#(""+idPendenza)'
1266
+ And match response.rt == '#notnull'
1267
+ And match response.rt.datiPagamento.codiceEsitoPagamento == '0'
1268
+ And match response.rpt.versioneOggetto == '6.2.0'
1269
+ And match response.rt.versioneOggetto == '6.2.0'
1270
+ And match response.rt.datiPagamento.datiSingoloPagamento[0].allegatoRicevuta == '#notnull'
1271
+
1272
+ # rpt formato json
1273
+
1274
+ Given url backofficeBaseurl
1275
+ And path '/rpp' , idDominioDet, iuvDet, ccpDet, 'rpt'
1276
+ And param retrocompatibilitaMessaggiPagoPAV1 = true
1277
+ And headers gpAdminBasicAutenticationHeader
1278
+ When method get
1279
+ Then status 200
1280
+ And match response.versioneOggetto == '6.2.0'
1281
+
1282
+ # rt formato json
1283
+
1284
+ Given url backofficeBaseurl
1285
+ And path '/rpp' , idDominioDet, iuvDet, ccpDet, 'rt'
1286
+ And param retrocompatibilitaMessaggiPagoPAV1 = true
1287
+ And headers gpAdminBasicAutenticationHeader
1288
+ When method get
1289
+ Then status 200
1290
+ And match response.versioneOggetto == '6.2.0'
1291
+ And match response.datiPagamento.datiSingoloPagamento[0].allegatoRicevuta == '#notnull'
1292
+
1293
+ # rpt formato xml
1294
+
1295
+ Given url backofficeBaseurl
1296
+ And path '/rpp' , idDominioDet, iuvDet, ccpDet, 'rpt'
1297
+ And param retrocompatibilitaMessaggiPagoPAV1 = true
1298
+ And header Accept = 'application/xml'
1299
+ And headers gpAdminBasicAutenticationHeader
1300
+ When method get
1301
+ Then status 200
1302
+ And match response /RPT/versioneOggetto == '6.2.0'
1303
+
1304
+ # rt formato xml
1305
+
1306
+ Given url backofficeBaseurl
1307
+ And path '/rpp' , idDominioDet, iuvDet, ccpDet, 'rt'
1308
+ And param retrocompatibilitaMessaggiPagoPAV1 = true
1309
+ And header Accept = 'application/xml'
1310
+ And headers gpAdminBasicAutenticationHeader
1311
+ When method get
1312
+ Then status 200
1313
+ And match response /RT/versioneOggetto == '6.2.0'
984
1314
0 commit comments