diff --git a/integration-test/src/config/data.json b/integration-test/src/config/data.json index d8dcc68b..d034dd9e 100644 --- a/integration-test/src/config/data.json +++ b/integration-test/src/config/data.json @@ -208,6 +208,146 @@ "paymentType": "CP", "abi": "AMREX", "pspBusinessName": "psp business name int-test-10" + }, + { + "id": "int-test-cart-cart-1", + "idPsp": "PPAYITR1XXX", + "idBrokerPsp": "88888888899", + "idChannel": "88888888899_01_ONUS", + "digitalStamp": false, + "digitalStampRestriction": false, + "name": "pacchetto 1", + "description": "pacchetto 1", + "paymentAmount": 100, + "minPaymentAmount": 899999999999998, + "maxPaymentAmount": 899999999999999, + "type": "GLOBAL", + "validityDateFrom": null, + "validityDateTo": null, + "touchpoint": "ANY", + "paymentType": "CP", + "abi": 14156, + "pspBusinessName": "psp business name int-test-cart-1" + }, + { + "id": "int-test-cart-cart-2", + "idPsp": "PPAYITR1XXX", + "idBrokerPsp": "88888888899", + "idChannel": "88888888899_01_ONUS", + "digitalStamp": false, + "digitalStampRestriction": false, + "name": "pacchetto 2", + "description": "pacchetto 2", + "paymentAmount": 50, + "minPaymentAmount": 899999999999996, + "maxPaymentAmount": 899999999999998, + "type": "GLOBAL", + "validityDateFrom": null, + "validityDateTo": null, + "touchpoint": "ANY", + "paymentType": "CP", + "abi": 14156, + "pspBusinessName": "psp business name int-test-cart-2" + }, + { + "id": "int-test-cart-cart-3", + "idPsp": "PPAYITR1XXX", + "idBrokerPsp": "88888888899", + "idChannel": "88888888899_01_ONUS", + "digitalStamp": false, + "digitalStampRestriction": false, + "name": "pacchetto 3", + "description": "pacchetto 3", + "paymentAmount": 70, + "minPaymentAmount": 899999999999994, + "maxPaymentAmount": 899999999999996, + "type": "GLOBAL", + "validityDateFrom": null, + "validityDateTo": null, + "touchpoint": "ANY", + "paymentType": "CP", + "abi": 14156, + "pspBusinessName": "psp business name int-test-cart-3" + }, + { + "id": "int-test-cart-cart-4", + "idPsp": "PPAYITR1XXX", + "idBrokerPsp": "88888888899", + "idChannel": "88888888899_01_ONUS", + "digitalStamp": false, + "digitalStampRestriction": false, + "name": "pacchetto 4", + "description": "pacchetto 4", + "paymentAmount": 80, + "minPaymentAmount": 899999999999992, + "maxPaymentAmount": 899999999999994, + "type": "GLOBAL", + "validityDateFrom": null, + "validityDateTo": null, + "touchpoint": "ANY", + "paymentType": "CP", + "abi": 14156, + "pspBusinessName": "psp business name int-test-cart-4" + }, + { + "id": "int-test-cart-cart-5", + "idPsp": "PPAYITR1XXX", + "idBrokerPsp": "88888888899", + "idChannel": "88888888899_01_ONUS", + "digitalStamp": false, + "digitalStampRestriction": false, + "name": "pacchetto 5", + "description": "pacchetto 5", + "paymentAmount": 100, + "minPaymentAmount": 899999999999990, + "maxPaymentAmount": 899999999999992, + "type": "GLOBAL", + "validityDateFrom": null, + "validityDateTo": null, + "touchpoint": "ANY", + "paymentType": "CP", + "abi": 14156, + "pspBusinessName": "psp business name int-test-cart-5" + }, + { + "id": "int-test-cart-cart-6", + "idPsp": "PPAYITR1XXX", + "idBrokerPsp": "88888888899", + "idChannel": "88888888899_01_ONUS", + "digitalStamp": false, + "digitalStampRestriction": false, + "name": "pacchetto 6", + "description": "pacchetto 6", + "paymentAmount": 150, + "minPaymentAmount": 899999999999988, + "maxPaymentAmount": 899999999999990, + "type": "GLOBAL", + "validityDateFrom": null, + "validityDateTo": null, + "touchpoint": "ANY", + "paymentType": "CP", + "abi": 14156, + "pspBusinessName": "psp business name int-test-cart-6" + }, + { + "id": "int-test-cart-cart-7", + "idPsp": "UNCRITMM", + "idChannel": "00348170101_01", + "idBrokerPsp": "00348170101", + "digitalStamp": false, + "digitalStampRestriction": false, + "name": "pacchetto 7", + "description": "pacchetto 7", + "paymentAmount": 100, + "minPaymentAmount": 899999999999980, + "maxPaymentAmount": 899999999999999, + "type": "GLOBAL", + "validityDateFrom": null, + "validityDateTo": null, + "touchpoint": "ANY", + "paymentType": null, + "abi": 10101, + "pspBusinessName": "psp business name int-test-cart-7" } ], "ciBundles": [ @@ -247,6 +387,113 @@ "maxPaymentAmount": 20 } ] + }, + { + "id": "int-test-cart-1", + "ciFiscalCode": "77777777777", + "idBundle": "int-test-cart-cart-1", + "attributes": [ + { + "id": "int-test-cart-1", + "maxPaymentAmount": 20 + } + ] + }, + { + "id": "int-test-cart-2", + "ciFiscalCode": "77777777777", + "idBundle": "int-test-cart-cart-2", + "attributes": [ + { + "id": "int-test-cart-2", + "maxPaymentAmount": 60 + } + ] + }, + { + "id": "int-test-cart-3", + "ciFiscalCode": "77777777777", + "idBundle": "int-test-cart-cart-4", + "attributes": [ + { + "id": "int-test-cart-3", + "maxPaymentAmount": 50 + } + ] + }, + { + "id": "int-test-cart-4", + "ciFiscalCode": "88888888888", + "idBundle": "int-test-cart-cart-4", + "attributes": [ + { + "id": "int-test-cart-4", + "maxPaymentAmount": 60 + } + ] + }, + { + "id": "int-test-cart-5", + "ciFiscalCode": "77777777777", + "idBundle": "int-test-cart-cart-5", + "attributes": [ + { + "id": "int-test-cart-5", + "maxPaymentAmount": 60 + } + ] + }, + { + "id": "int-test-cart-6", + "ciFiscalCode": "88888888888", + "idBundle": "int-test-cart-cart-5", + "attributes": [ + { + "id": "int-test-cart-6", + "maxPaymentAmount": 80 + } + ] + }, + { + "id": "int-test-cart-7", + "ciFiscalCode": "77777777777", + "idBundle": "int-test-cart-cart-6", + "attributes": [ + { + "id": "int-test-cart-7", + "maxPaymentAmount": 80 + }, + { + "id": "int-test-cart-8", + "maxPaymentAmount": 50 + } + ] + }, + { + "id": "int-test-cart-8", + "ciFiscalCode": "88888888888", + "idBundle": "int-test-cart-cart-6", + "attributes": [ + { + "id": "int-test-cart-9", + "maxPaymentAmount": 20 + }, + { + "id": "int-test-cart-cart-10", + "maxPaymentAmount": 40 + } + ] + }, + { + "id": "int-test-cart-9", + "ciFiscalCode": "77777777777", + "idBundle": "int-test-cart-cart-7", + "attributes": [ + { + "id": "int-test-cart-9", + "maxPaymentAmount": 20 + } + ] } ], "touchpoints": [ diff --git a/integration-test/src/config/dataCart.json b/integration-test/src/config/dataCart.json deleted file mode 100644 index e03e1e9b..00000000 --- a/integration-test/src/config/dataCart.json +++ /dev/null @@ -1,273 +0,0 @@ -{ - "bundles": [ - { - "id": "int-test-cart-1", - "idPsp": "PPAYITR1XXX", - "idBrokerPsp": "88888888899", - "idChannel": "88888888899_01_ONUS", - "digitalStamp": false, - "digitalStampRestriction": false, - "name": "pacchetto 1", - "description": "pacchetto 1", - "paymentAmount": 100, - "minPaymentAmount": 899999999999998, - "maxPaymentAmount": 899999999999999, - "type": "GLOBAL", - "validityDateFrom": null, - "validityDateTo": null, - "touchpoint": "ANY", - "paymentType": "CP", - "abi": 14156, - "pspBusinessName": "psp business name int-test-1" - }, - { - "id": "int-test-cart-2", - "idPsp": "PPAYITR1XXX", - "idBrokerPsp": "88888888899", - "idChannel": "88888888899_01_ONUS", - "digitalStamp": false, - "digitalStampRestriction": false, - "name": "pacchetto 2", - "description": "pacchetto 2", - "paymentAmount": 50, - "minPaymentAmount": 899999999999996, - "maxPaymentAmount": 899999999999998, - "type": "GLOBAL", - "validityDateFrom": null, - "validityDateTo": null, - "touchpoint": "ANY", - "paymentType": "CP", - "abi": 14156, - "pspBusinessName": "psp business name int-test-2" - }, - { - "id": "int-test-cart-3", - "idPsp": "PPAYITR1XXX", - "idBrokerPsp": "88888888899", - "idChannel": "88888888899_01_ONUS", - "digitalStamp": false, - "digitalStampRestriction": false, - "name": "pacchetto 3", - "description": "pacchetto 3", - "paymentAmount": 70, - "minPaymentAmount": 899999999999994, - "maxPaymentAmount": 899999999999996, - "type": "GLOBAL", - "validityDateFrom": null, - "validityDateTo": null, - "touchpoint": "ANY", - "paymentType": "CP", - "abi": 14156, - "pspBusinessName": "psp business name int-test-3" - }, - { - "id": "int-test-cart-4", - "idPsp": "PPAYITR1XXX", - "idBrokerPsp": "88888888899", - "idChannel": "88888888899_01_ONUS", - "digitalStamp": false, - "digitalStampRestriction": false, - "name": "pacchetto 4", - "description": "pacchetto 4", - "paymentAmount": 80, - "minPaymentAmount": 899999999999992, - "maxPaymentAmount": 899999999999994, - "type": "GLOBAL", - "validityDateFrom": null, - "validityDateTo": null, - "touchpoint": "ANY", - "paymentType": "CP", - "abi": 14156, - "pspBusinessName": "psp business name int-test-4" - }, - { - "id": "int-test-cart-5", - "idPsp": "PPAYITR1XXX", - "idBrokerPsp": "88888888899", - "idChannel": "88888888899_01_ONUS", - "digitalStamp": false, - "digitalStampRestriction": false, - "name": "pacchetto 5", - "description": "pacchetto 5", - "paymentAmount": 100, - "minPaymentAmount": 899999999999990, - "maxPaymentAmount": 899999999999992, - "type": "GLOBAL", - "validityDateFrom": null, - "validityDateTo": null, - "touchpoint": "ANY", - "paymentType": "CP", - "abi": 14156, - "pspBusinessName": "psp business name int-test-5" - }, - { - "id": "int-test-cart-6", - "idPsp": "PPAYITR1XXX", - "idBrokerPsp": "88888888899", - "idChannel": "88888888899_01_ONUS", - "digitalStamp": false, - "digitalStampRestriction": false, - "name": "pacchetto 6", - "description": "pacchetto 6", - "paymentAmount": 150, - "minPaymentAmount": 899999999999988, - "maxPaymentAmount": 899999999999990, - "type": "GLOBAL", - "validityDateFrom": null, - "validityDateTo": null, - "touchpoint": "ANY", - "paymentType": "CP", - "abi": 14156, - "pspBusinessName": "psp business name int-test-6" - }, - { - "id": "int-test-cart-7", - "idPsp": "UNCRITMM", - "idChannel": "00348170101_01", - "idBrokerPsp": "00348170101", - "digitalStamp": false, - "digitalStampRestriction": false, - "name": "pacchetto 7", - "description": "pacchetto 7", - "paymentAmount": 100, - "minPaymentAmount": 899999999999980, - "maxPaymentAmount": 899999999999999, - "type": "GLOBAL", - "validityDateFrom": null, - "validityDateTo": null, - "touchpoint": "ANY", - "paymentType": null, - "abi": 10101, - "pspBusinessName": "psp business name int-test-7" - } - ], - "ciBundles": [ - { - "id": "int-test-1", - "ciFiscalCode": "77777777777", - "idBundle": "int-test-cart-1", - "attributes": [ - { - "id": "int-test-1", - "maxPaymentAmount": 20 - } - ] - }, - { - "id": "int-test-2", - "ciFiscalCode": "77777777777", - "idBundle": "int-test-cart-2", - "attributes": [ - { - "id": "int-test-2", - "maxPaymentAmount": 60 - } - ] - }, - { - "id": "int-test-3", - "ciFiscalCode": "77777777777", - "idBundle": "int-test-cart-4", - "attributes": [ - { - "id": "int-test-3", - "maxPaymentAmount": 50 - } - ] - }, - { - "id": "int-test-4", - "ciFiscalCode": "88888888888", - "idBundle": "int-test-cart-4", - "attributes": [ - { - "id": "int-test-4", - "maxPaymentAmount": 60 - } - ] - }, - { - "id": "int-test-5", - "ciFiscalCode": "77777777777", - "idBundle": "int-test-cart-5", - "attributes": [ - { - "id": "int-test-5", - "maxPaymentAmount": 60 - } - ] - }, - { - "id": "int-test-6", - "ciFiscalCode": "88888888888", - "idBundle": "int-test-cart-5", - "attributes": [ - { - "id": "int-test-6", - "maxPaymentAmount": 80 - } - ] - }, - { - "id": "int-test-7", - "ciFiscalCode": "77777777777", - "idBundle": "int-test-cart-6", - "attributes": [ - { - "id": "int-test-7", - "maxPaymentAmount": 80 - }, - { - "id": "int-test-8", - "maxPaymentAmount": 50 - } - ] - }, - { - "id": "int-test-8", - "ciFiscalCode": "88888888888", - "idBundle": "int-test-cart-6", - "attributes": [ - { - "id": "int-test-9", - "maxPaymentAmount": 20 - }, - { - "id": "int-test-10", - "maxPaymentAmount": 40 - } - ] - }, - { - "id": "int-test-9", - "ciFiscalCode": "77777777777", - "idBundle": "int-test-cart-7", - "attributes": [ - { - "id": "int-test-9", - "maxPaymentAmount": 20 - } - ] - } - ], - "touchpoints": [ - { - "id": "int-test-1", - "name": "CHECKOUT" - }, - { - "id": "int-test-2", - "name": "IO" - } - ], - "paymenttypes": [ - { - "id": "int-test-1", - "name": "CP" - }, - { - "id": "int-test-2", - "name": "PO" - } - ] -} diff --git a/integration-test/src/features/getFeesByPspMulti.feature b/integration-test/src/features/getFeesByPspMulti.feature index c33e1ed1..a2e9d0dd 100644 --- a/integration-test/src/features/getFeesByPspMulti.feature +++ b/integration-test/src/features/getFeesByPspMulti.feature @@ -1,7 +1,7 @@ Feature: GetFees - Get List of fees by CI, amount, method, touchpoint Background: - Given the configuration "dataCart.json" + Given the configuration "data.json" Scenario: Commission is higher than the sum of the fees (psp id specified) Given initial json @@ -28,7 +28,7 @@ Feature: GetFees - Get List of fees by CI, amount, method, touchpoint Then check statusCode is 200 And the body response for the bundleOptions.idsCiBundle field is: | idCiBundle | - | "int-test-1" | + | "int-test-cart-1" | And the sum of the fees is correct and the EC codes are: | feeCode | | "77777777777" | @@ -58,7 +58,7 @@ Feature: GetFees - Get List of fees by CI, amount, method, touchpoint Then check statusCode is 200 And the body response for the bundleOptions.idsCiBundle field is: | idCiBundle | - | "int-test-2" | + | "int-test-cart-2" | And the sum of the fees is correct and the EC codes are: | feeCode | | "77777777777" | @@ -164,7 +164,7 @@ Feature: GetFees - Get List of fees by CI, amount, method, touchpoint Then check statusCode is 200 And the body response for the bundleOptions.idsCiBundle field is: | idCiBundle | - | "int-test-6" | + | "int-test-cart-6" | And the sum of the fees is correct and the EC codes are: | feeCode | | "88888888888" | @@ -204,7 +204,7 @@ Feature: GetFees - Get List of fees by CI, amount, method, touchpoint Then check statusCode is 200 And the body response for the bundleOptions.idsCiBundle field is: | idCiBundle1 | idCiBundle2 | - | "int-test-5" | "int-test-6" | + | "int-test-cart-5" | "int-test-cart-6" | And the sum of the fees is correct and the EC codes are: | feeCode1 | feeCode2 | | "77777777777" | "88888888888" | @@ -244,10 +244,10 @@ Feature: GetFees - Get List of fees by CI, amount, method, touchpoint Then check statusCode is 200 And the body response for the bundleOptions.idsCiBundle field is: | idCiBundle1 | idCiBundle2 | - | "int-test-7" | "int-test-8" | - | "int-test-7" | "int-test-8" | - | "int-test-7" | "int-test-8" | - | "int-test-7" | "int-test-8" | + | "int-test-cart-7" | "int-test-cart-8" | + | "int-test-cart-7" | "int-test-cart-8" | + | "int-test-cart-7" | "int-test-cart-8" | + | "int-test-cart-7" | "int-test-cart-8" | And the sum of the fees is correct and the EC codes are: | feeCode1 | feeCode2 | | "77777777777" | "88888888888" | diff --git a/integration-test/src/features/getFeesMulti.feature b/integration-test/src/features/getFeesMulti.feature index 2dc9f9c8..b6336e8a 100644 --- a/integration-test/src/features/getFeesMulti.feature +++ b/integration-test/src/features/getFeesMulti.feature @@ -1,7 +1,7 @@ Feature: GetFees - Get List of fees by CI, amount, method, touchpoint Background: - Given the configuration "dataCart.json" + Given the configuration "data.json" Scenario: Commission is higher than the sum of the fees Given initial json @@ -33,8 +33,8 @@ Feature: GetFees - Get List of fees by CI, amount, method, touchpoint | false | And the body response for the bundleOptions.idsCiBundle field is: | idCiBundle | - | "int-test-1" | - | "int-test-9" | + | "int-test-cart-1" | + | "int-test-cart-9" | And the sum of the fees is correct and the EC codes are: | feeCode | | "77777777777" | @@ -70,8 +70,8 @@ Feature: GetFees - Get List of fees by CI, amount, method, touchpoint | false | And the body response for the bundleOptions.idsCiBundle field is: | idCiBundle | - | "int-test-2" | - | "int-test-9" | + | "int-test-cart-2" | + | "int-test-cart-9" | And the sum of the fees is correct and the EC codes are: | feeCode | | "77777777777" | @@ -193,7 +193,7 @@ Feature: GetFees - Get List of fees by CI, amount, method, touchpoint | false | And the body response for the bundleOptions.idsCiBundle field is: | idCiBundle | - | "int-test-6" | + | "int-test-cart-6" | And the sum of the fees is correct and the EC codes are: | feeCode | | "88888888888" | @@ -238,7 +238,7 @@ Feature: GetFees - Get List of fees by CI, amount, method, touchpoint | false | And the body response for the bundleOptions.idsCiBundle field is: | idCiBundle1 | idCiBundle2 | - | "int-test-5" | "int-test-6" | + | "int-test-cart-5" | "int-test-cart-6" | And the sum of the fees is correct and the EC codes are: | feeCode1 | feeCode2 | | "77777777777" | "88888888888" | @@ -286,10 +286,10 @@ Feature: GetFees - Get List of fees by CI, amount, method, touchpoint | false | And the body response for the bundleOptions.idsCiBundle field is: | idCiBundle1 | idCiBundle2 | - | "int-test-7" | "int-test-8" | - | "int-test-7" | "int-test-8" | - | "int-test-7" | "int-test-8" | - | "int-test-7" | "int-test-8" | + | "int-test-cart-7" | "int-test-cart-8" | + | "int-test-cart-7" | "int-test-cart-8" | + | "int-test-cart-7" | "int-test-cart-8" | + | "int-test-cart-7" | "int-test-cart-8" | And the sum of the fees is correct and the EC codes are: | feeCode1 | feeCode2 | | "77777777777" | "88888888888" |