From db6e32a6c3bee09160748979890d220c7d3773ad Mon Sep 17 00:00:00 2001 From: vgenev Date: Wed, 16 Jun 2021 20:40:06 +0300 Subject: [PATCH 1/7] added provisioning for default settlement model and second currency --- .../provisioning/MojaloopHub_Setup/hub.json | 120 ++++++++++++++++ .../MojaloopSims_Onboarding/payeefsp.json | 79 +++++++++++ .../MojaloopSims_Onboarding/payerfsp.json | 79 +++++++++++ .../MojaloopSims_Onboarding/testfsp1.json | 79 +++++++++++ .../MojaloopSims_Onboarding/testfsp2.json | 79 +++++++++++ .../testingtoolkitdfsp.json | 77 ++++++++++ .../MojaloopSims_Onboarding/ttkpayeefsp.json | 77 ++++++++++ ...ronments_hub-k8s-environment-2nd-curr.json | 131 ++++++++++++++++++ environments/hub.json | 2 +- 9 files changed, 722 insertions(+), 1 deletion(-) create mode 100644 environments/examples_environments_hub-k8s-environment-2nd-curr.json diff --git a/collections/hub/provisioning/MojaloopHub_Setup/hub.json b/collections/hub/provisioning/MojaloopHub_Setup/hub.json index b2d8cd79..6775a705 100644 --- a/collections/hub/provisioning/MojaloopHub_Setup/hub.json +++ b/collections/hub/provisioning/MojaloopHub_Setup/hub.json @@ -187,6 +187,84 @@ } ] } + }, + { + "id": 6, + "description": "Add Hub Account-HUB_MULTILATERAL_SETTLEMENT Second Currency", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/Hub/accounts", + "method": "post", + "params": { + "name": "Hub" + }, + "body": { + "type": "HUB_MULTILATERAL_SETTLEMENT", + "currency": "{$inputs.currency2}" + }, + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "hub_operator" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "status to be 201 if not exists or 400 if exists", + "exec": [ + "if (response.body.errorInformation) {", + " expect(response.status).to.equal(400)", + "} else {", + " expect(response.status).to.equal(201)", + "}" + ] + } + ] + } + }, + { + "id": 7, + "description": "Add Hub Account-HUB_RECONCILIATION Second Currency", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/Hub/accounts", + "method": "post", + "params": { + "name": "Hub" + }, + "body": { + "type": "HUB_RECONCILIATION", + "currency": "{$inputs.currency2}" + }, + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "hub_operator" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "status to be 201 if not exists or 400 if exists", + "exec": [ + "if (response.body.errorInformation) {", + " expect(response.status).to.equal(400)", + "} else {", + " expect(response.status).to.equal(201)", + "}" + ] + } + ] + } } ] }, @@ -236,6 +314,48 @@ } ] } + }, + { + "id": 3, + "description": "Create settlement model DEFAULT DEFERRED NET", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/settlementModels", + "path": "/settlementModels", + "method": "post", + "body": { + "name": "DEFAULTDEFERREDNET", + "settlementGranularity": "NET", + "settlementInterchange": "MULTILATERAL", + "settlementDelay": "DEFERRED", + "requireLiquidityCheck": true, + "ledgerAccountType": "POSITION", + "autoPositionReset": true, + "settlementAccountType": "SETTLEMENT" + }, + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "hub_operator" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "status to be 201 if not exists or 400 if exists", + "exec": [ + "if (response.body.errorInformation) {", + " expect(response.status).to.equal(400)", + "} else {", + " expect(response.status).to.equal(201)", + "}" + ] + } + ] + } } ], "name": "Settlement Models" diff --git a/collections/hub/provisioning/MojaloopSims_Onboarding/payeefsp.json b/collections/hub/provisioning/MojaloopSims_Onboarding/payeefsp.json index c03ff927..d332c59b 100644 --- a/collections/hub/provisioning/MojaloopSims_Onboarding/payeefsp.json +++ b/collections/hub/provisioning/MojaloopSims_Onboarding/payeefsp.json @@ -239,6 +239,85 @@ } }, "delay": "500" + }, + { + "id": 6, + "description": "Add payeefsp with different currency for default settlement case", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants", + "path": "/participants", + "method": "post", + "body": { + "name": "payeefsp", + "currency": "{$inputs.currency2}" + }, + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "status to be 201 if not exists or 400 if exists", + "exec": [ + "if (response.body.errorInformation) {", + " expect(response.status).to.equal(400)", + "} else {", + " expect(response.status).to.equal(201)", + "}" + ] + } + ] + } + }, + { + "id": 7, + "description": "Add initial position and limits with different currency - payeefsp", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/initialPositionAndLimits", + "path": "/participants/payeefsp/initialPositionAndLimits", + "method": "post", + "params": { + "name": "payeefsp" + }, + "body": { + "currency": "{$inputs.currency2}", + "limit": { + "type": "NET_DEBIT_CAP", + "value": 10000 + }, + "initialPosition": 0 + }, + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "status to be 201 if not exists or 500 if exists", + "exec": [ + "if (response.body.errorInformation) {", + " expect(response.status).to.equal(500)", + "} else {", + " expect(response.status).to.equal(201)", + "}" + ] + } + ] + } } ] }, diff --git a/collections/hub/provisioning/MojaloopSims_Onboarding/payerfsp.json b/collections/hub/provisioning/MojaloopSims_Onboarding/payerfsp.json index 5c1bf195..e5829090 100644 --- a/collections/hub/provisioning/MojaloopSims_Onboarding/payerfsp.json +++ b/collections/hub/provisioning/MojaloopSims_Onboarding/payerfsp.json @@ -239,6 +239,85 @@ } }, "delay": "500" + }, + { + "id": 6, + "description": "Add payeefsp with different currency for default settlement case", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants", + "path": "/participants", + "method": "post", + "body": { + "name": "payerfsp", + "currency": "{$inputs.currency2}" + }, + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "status to be 201 if not exists or 400 if exists", + "exec": [ + "if (response.body.errorInformation) {", + " expect(response.status).to.equal(400)", + "} else {", + " expect(response.status).to.equal(201)", + "}" + ] + } + ] + } + }, + { + "id": 7, + "description": "Add initial position and limits with different currency - payerfsp", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/initialPositionAndLimits", + "path": "/participants/payerfsp/initialPositionAndLimits", + "method": "post", + "params": { + "name": "payerfsp" + }, + "body": { + "currency": "{$inputs.currency2}", + "limit": { + "type": "NET_DEBIT_CAP", + "value": 10000 + }, + "initialPosition": 0 + }, + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "status to be 201 if not exists or 500 if exists", + "exec": [ + "if (response.body.errorInformation) {", + " expect(response.status).to.equal(500)", + "} else {", + " expect(response.status).to.equal(201)", + "}" + ] + } + ] + } } ] }, diff --git a/collections/hub/provisioning/MojaloopSims_Onboarding/testfsp1.json b/collections/hub/provisioning/MojaloopSims_Onboarding/testfsp1.json index 44bc6b27..4c6a5208 100644 --- a/collections/hub/provisioning/MojaloopSims_Onboarding/testfsp1.json +++ b/collections/hub/provisioning/MojaloopSims_Onboarding/testfsp1.json @@ -239,6 +239,85 @@ } }, "delay": "500" + }, + { + "id": 6, + "description": "Add testfsp1 with second currency", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants", + "path": "/participants", + "method": "post", + "body": { + "name": "testfsp1", + "currency": "{$inputs.currency2}" + }, + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "status to be 201 if not exists or 400 if exists", + "exec": [ + "if (response.body.errorInformation) {", + " expect(response.status).to.equal(400)", + "} else {", + " expect(response.status).to.equal(201)", + "}" + ] + } + ] + } + }, + { + "id": 7, + "description": "Add initial position and limits - testfsp1 with second currency", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/initialPositionAndLimits", + "path": "/participants/testfsp1/initialPositionAndLimits", + "method": "post", + "params": { + "name": "testfsp1" + }, + "body": { + "currency": "{$inputs.currency2}", + "limit": { + "type": "NET_DEBIT_CAP", + "value": 10000 + }, + "initialPosition": 0 + }, + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "status to be 201 if not exists or 500 if exists", + "exec": [ + "if (response.body.errorInformation) {", + " expect(response.status).to.equal(500)", + "} else {", + " expect(response.status).to.equal(201)", + "}" + ] + } + ] + } } ] }, diff --git a/collections/hub/provisioning/MojaloopSims_Onboarding/testfsp2.json b/collections/hub/provisioning/MojaloopSims_Onboarding/testfsp2.json index b200ef69..e88947a8 100644 --- a/collections/hub/provisioning/MojaloopSims_Onboarding/testfsp2.json +++ b/collections/hub/provisioning/MojaloopSims_Onboarding/testfsp2.json @@ -239,6 +239,85 @@ } }, "delay": "500" + }, + { + "id": 6, + "description": "Add testfsp2 with second currency", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants", + "path": "/participants", + "method": "post", + "body": { + "name": "testfsp2", + "currency": "{$inputs.currency2}" + }, + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "status to be 201 if not exists or 400 if exists", + "exec": [ + "if (response.body.errorInformation) {", + " expect(response.status).to.equal(400)", + "} else {", + " expect(response.status).to.equal(201)", + "}" + ] + } + ] + } + }, + { + "id": 7, + "description": "Add initial position and limits - testfsp2 with second currency", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/initialPositionAndLimits", + "path": "/participants/testfsp2/initialPositionAndLimits", + "method": "post", + "params": { + "name": "testfsp2" + }, + "body": { + "currency": "{$inputs.currency2}", + "limit": { + "type": "NET_DEBIT_CAP", + "value": 10000 + }, + "initialPosition": 0 + }, + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "status to be 201 if not exists or 500 if exists", + "exec": [ + "if (response.body.errorInformation) {", + " expect(response.status).to.equal(500)", + "} else {", + " expect(response.status).to.equal(201)", + "}" + ] + } + ] + } } ] }, diff --git a/collections/hub/provisioning/MojaloopSims_Onboarding/testingtoolkitdfsp.json b/collections/hub/provisioning/MojaloopSims_Onboarding/testingtoolkitdfsp.json index cbd8d77e..11404444 100644 --- a/collections/hub/provisioning/MojaloopSims_Onboarding/testingtoolkitdfsp.json +++ b/collections/hub/provisioning/MojaloopSims_Onboarding/testingtoolkitdfsp.json @@ -897,6 +897,83 @@ } ] } + }, + { + "id": 27, + "description": "Add participant with second currency", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants", + "path": "/participants", + "method": "post", + "body": { + "name": "testingtoolkitdfsp", + "currency": "{$inputs.currency2}" + }, + "headers": { + "Content-Type": "application/json" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "status to be 201 if not exists or 400 if exists", + "exec": [ + "if (response.body.errorInformation) {", + " expect(response.status).to.equal(400)", + "} else {", + " expect(response.status).to.equal(201)", + "}" + ] + } + ] + } + }, + { + "id": 28, + "description": "Add initial position and limits with second currency", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/initialPositionAndLimits", + "path": "/participants/testingtoolkitdfsp/initialPositionAndLimits", + "method": "post", + "params": { + "name": "testingtoolkitdfsp" + }, + "body": { + "currency": "{$inputs.currency2}", + "limit": { + "type": "NET_DEBIT_CAP", + "value": 1000000 + }, + "initialPosition": 0 + }, + "headers": { + "Content-Type": "application/json" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "status to be 201 if not exists or 500 if exists", + "exec": [ + "if (response.body.errorInformation) {", + " expect(response.status).to.equal(500)", + "} else {", + " expect(response.status).to.equal(201)", + "}" + ] + } + ] + } } ] } diff --git a/collections/hub/provisioning/MojaloopSims_Onboarding/ttkpayeefsp.json b/collections/hub/provisioning/MojaloopSims_Onboarding/ttkpayeefsp.json index cbbc5ddf..c0fe161d 100644 --- a/collections/hub/provisioning/MojaloopSims_Onboarding/ttkpayeefsp.json +++ b/collections/hub/provisioning/MojaloopSims_Onboarding/ttkpayeefsp.json @@ -897,6 +897,83 @@ } ] } + }, + { + "id": 27, + "description": "Add participant with second currency", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants", + "path": "/participants", + "method": "post", + "body": { + "name": "ttkpayeefsp", + "currency": "{$inputs.currency2}" + }, + "headers": { + "Content-Type": "application/json" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "status to be 201 if not exists or 400 if exists", + "exec": [ + "if (response.body.errorInformation) {", + " expect(response.status).to.equal(400)", + "} else {", + " expect(response.status).to.equal(201)", + "}" + ] + } + ] + } + }, + { + "id": 28, + "description": "Add initial position and limits with second currency", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/initialPositionAndLimits", + "path": "/participants/ttkpayeefsp/initialPositionAndLimits", + "method": "post", + "params": { + "name": "ttkpayeefsp" + }, + "body": { + "currency": "{$inputs.currency2}", + "limit": { + "type": "NET_DEBIT_CAP", + "value": 1000000 + }, + "initialPosition": 0 + }, + "headers": { + "Content-Type": "application/json" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "status to be 201 if not exists or 500 if exists", + "exec": [ + "if (response.body.errorInformation) {", + " expect(response.status).to.equal(500)", + "} else {", + " expect(response.status).to.equal(201)", + "}" + ] + } + ] + } } ] } diff --git a/environments/examples_environments_hub-k8s-environment-2nd-curr.json b/environments/examples_environments_hub-k8s-environment-2nd-curr.json new file mode 100644 index 00000000..4b61b13e --- /dev/null +++ b/environments/examples_environments_hub-k8s-environment-2nd-curr.json @@ -0,0 +1,131 @@ +{ + "inputValues": { + "BASE_CENTRAL_LEDGER_ADMIN": "", + "CALLBACK_ENDPOINT_BASE_URL": "http://dev1-ml-testing-toolkit-backend:5000", + "ENABLE_JWS_SIGNING": true, + "ENABLE_JWS_VALIDATION": false, + "ENABLE_PROTECTED_HEADERS_VALIDATION": true, + "ENABLE_WS_ASSERTIONS": true, + "HOST_ACCOUNT_LOOKUP_ADMIN": "http://dev1-account-lookup-service-admin", + "HOST_ACCOUNT_LOOKUP_SERVICE": "http://dev1-account-lookup-service", + "HOST_ACCOUNT_LOOKUP_SERVICE_ADMIN": "http://dev1-account-lookup-service-admin", + "HOST_BULK_ADAPTER": "http://dev1-bulk-api-adapter-service", + "HOST_CENTRAL_LEDGER": "http://dev1-centralledger-service", + "HOST_CENTRAL_SETTLEMENT": "http://dev1-centralsettlement-service/v2", + "HOST_LEGACY_SIMULATOR": "http://dev1-simulator", + "HOST_ML_API_ADAPTER": "http://dev1-ml-api-adapter-service", + "HOST_QUOTING_SERVICE": "http://dev1-quoting-service", + "HOST_SIMULATOR": "http://dev1-simulator", + "HOST_TRANSACTION_REQUESTS_SERVICE": "http://dev1-transaction-requests-service", + "HUB_OPERATOR_BEARER_TOKEN": "NOT_APPLICABLE", + "NORESPONSE_SIMPAYEE_NAME": "noresponsepayeefsp", + "ON_US_TRANSFERS_ENABLED": false, + "PAYEEFSP_BACKEND_TESTAPI_URL": "http://dev1-sim-payeefsp-backend:3003", + "PAYEEFSP_CALLBACK_URL": "http://dev1-sim-payeefsp-scheme-adapter:4000", + "PAYEEFSP_SDK_TESTAPI_URL": "http://dev1-sim-payeefsp-scheme-adapter:4002", + "PAYEEFSP_SDK_TESTAPI_WS_URL": "ws://dev1-sim-payeefsp-scheme-adapter:4002", + "PAYERFSP_BACKEND_TESTAPI_URL": "http://dev1-sim-payerfsp-backend:3003", + "PAYERFSP_CALLBACK_URL": "http://dev1-sim-payerfsp-scheme-adapter:4000", + "PAYERFSP_SDK_TESTAPI_URL": "http://dev1-sim-payerfsp-scheme-adapter:4002", + "PAYERFSP_SDK_TESTAPI_WS_URL": "ws://dev1-sim-payerfsp-scheme-adapter:4002", + "SIM1_JWS_KEY": "-----BEGIN PRIVATE KEY-----\n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\nDgoQeSng2kt5Z6mkoDIQTs7nEflb4w==\n-----END PRIVATE KEY-----\n", + "SIM1_MSISDN": "17039811903", + "SIM1_NAME": "testfsp1", + "SIM2_JWS_KEY": "-----BEGIN PRIVATE KEY-----\nMIIJQgIBADANBgkqhkiG9w0BAQEFAASCCSwwggkoAgEAAoICAQDO+faoQhcwWr3Z\nppD60DkXg5ganK1Le14Z/IBx+GGQqdYVUa6hIGR0HV3HchIkUf60+ei9WyYer8ze\n7bJklfo2TiMAdWXb9+eHJ0+Vuvsb/tH5yRjbxgTpZRgygJWiKDGXrYkGKAfSagJ+\nWDd2vL9cG9W5+OyXNiitK5pHa0dj3QwS+9C/yxzqgGLlkIplEcLqdYFknoVK+mas\nYBG65B0+5NHy4soEIdGr7Nd2xINqq+2/qyghwxcBQrxktbHC+/R+odkvTLrHWuBr\nx5NnL+LAbfmfDntsUfo2nZb667IdcRFoLWlsU9jK+RaaxNFcbe+j1PY+oJQdXF52\n9JNQR6efBOtuZXD9hjV/N1zmRFCY/o8nKc05Po2RZuLS8xKv90I4uZNF78X1ZiLz\n5veBjZF+Xa6kB5ABPENVA7xuCepfPoUUIQweatF4BwjnBYmGA6WVVckD/VO6AvpU\nvFuy+BQpEQFcfoX7OrqkY2MMITotMcflVjboGdwdtvJWEhBApGp70KrDXoYIh0q4\nopt/z1jv5MveyNfhq8qPca0fovcHST1tsAS0cSaro622fILTddaeCbLt8fBLH1Dz\nwzM4TDWb0i8EgXhGnRdqz9KNukPB6YuAEaaCKoRxsxzx41HYFLtES8XhNuV2Umxl\nNboBHjKy1wycZfRvrriph/dmwNSpjQIDAQABAoICAAcxIdxCYaZlPMwTkN2aPyWd\nRbuE/rOM/53VC4yKRi+d6ym1+ySvqLXtME1GHjHDZJ+awHbV9DrkPnDvnv+GQ5m/\n+NDjA21TjajBWa9Y/jFAl0C/91xpotGOWPsmQyzNiz2bQtPjL7RkyR3lSFYYpGiZ\nsgFCkEwHzn2H8pYxONuUOn9tXxlPADv4xpb2AQ0Wgyic+ShLJtQOY+Nw+iS9mPOO\nxWnUbhMbLrsz4V/H384k17/NfXlA22uIi13Pf3QIR7xfuNl/J81WD87G8k0HWbB4\nkdAwU2MV7SUZMD4bUwbZXzK4wz1Ho5SX96xcku7MhiNx+rV95G+pvkGRaY4EU2Nv\n6g8cN/TliZKcTV445wZg6SWcgOC1Q8TlosVpP9SsbeuG9NIC8DMfLdy6qJ0tASuP\nb4z1k0jiAyb5mA5EvVyK0WjZDBNM4KwW9CU9XC7NHw5zEHJbeKmLmWiz1pNxVPu3\ngaN0iC54LjTbtTCl+m63aedwldAcjjrBclKJYGlGpbHl8MJ+fUFtPoeX8IlXwxAu\n0p0RYRjMxsNlJkS2EU/5CDC6VnFgNPNYxUfEYH89qlbH+nBgU+gmMUkxApSkvNYG\nIW4QPcbyjzVY4WiMG5JFYJ8nR6NypUSnyCNXBxNHfRyT9Ay7qNdCU7XmuXZVK6+Z\nli9YtfoJbnbUAHcxRAEJAoIBAQDtCMjG7qAfP2zAxtpZQFyte2SXfPcoVei4P+SW\ntHVTDE7IGl/RYlFAOj8oyulvOsaH+RtsiLzaKEY3jjeN8FJl3d1F1fwQN+JuGxIr\nr7P/fEmE69MHYlSou8z81DuS3ICavu8nC5q2nLJhXV9W1QY5gLMERUac1M2jiEJf\naE0nWI59CagjtF8Xaq1uL6cv0Tyr7ORd5gt6LYL0zVChIrQaVx+LQhcy49Z6AQDw\nb4pVdSY7jrn0Q4SjvgMPTtHxvY1jN5hAvyOZGi1SUzpow7RNnYzGANd9aQNaKjJN\nqU7cBrJuLPyINMzUrdLC35yRebl/b975N5wBECA3htqbkljpAoIBAQDfiX+Bx4Qa\nJ/8V4eWNyUwlg1Sq7xQe4EPiMELeEb0LD5zlUgGo4/UoWxmT84/CHlWDzScgYgUW\nat/y0fZuFCe/9IKLoR2Nqwppb1Ay+kMvbfJKdDQIhH2iFVobgracnm3duhIKX4mX\ndf21dhROnZ6ZGqsHPjE6NwbRG6sg26U9gHu+LqVVUjgmRoeKZ7YT62tmpbbibLc1\nkazqZ9HkZtrjHNqpKts5VZJya/szEXIVfte+tzQoXHwNTQfFXtT9z+iNjIVxY6as\nZj9c+vahGw+N1VPmd79FzOcMgBHwY0f8GN2gfBDPc30Ykrtugya74QxPWILBUpf+\n4QZEzLT7nWUFAoIBABeQPv1frXVNxc7oNb6Xol7wnFBe8OcGm0rttxiwOdWWrKJB\n1PKotnEPGUZB3bDcA+5yeiJw+W0qgch2D9nBYT+VLbEKk7M9CvptIIJNRjSIs3pO\nQz1Bri7T9I3Rv1ZbK0G252lXQvsSWr1JHfgw1xySSbmL9XgTw5mVKxv272yQ5iFR\n+3AJN0bJqRICFLmxMDnbI9ydyNhNe+5AFtrd60+PB6i9WjcJ5UFdpi1AuVzDd5iG\nGMBKkf4BHqa/7Cj+8fZCCZWuKqjGrGi5s13EzsDEf8ETRljGProQ5c1InnlLBSPk\nvvn/Xblqyj/rINJpamJbyau2toB4jOtYMZUzmDkCggEAfmjeH0D5lmUJ3pEJZF3y\nXsBe7+8VXMSL/uw11CkJ06h3nEL8x0pqB/FEjKNOp4LJ7yfjuW9U2zGDBWjwx51E\nQUv/SwDImqWf1LHrE3js53RwcOQ3zJ1IApG6jBYmOHlrPdkMfKs8PtetqqFkqHSA\nDKrFDup/oiEeDMBtzL4JOrdewtTUEGTXdeWqnn05vRgDe1+5BWBfVr7Tnxco3dXA\ncHCPwtyGbmzSzTv9KQrzje5WCPbHWw+54zetblLLdeDN7MYLbGzjA1kq+eS99as8\n54M81/bdxpYyDqKaAmvSeGCDbE7cnsP7eRr5PWyTSenhMTmnb7XKWIteJSfyLNv8\nFQKCAQEAh9FvoIxoz4KvmVp+qyoXIXbq4egx4RdvNVBTWDnoQnVsnaetbzSkYPJX\nObR7waDJd/eu8b+VnwhTiIIwzMA3ZYmV/ZNUh5YKtYXzNqphdyPpJHxN+lwSBeV0\nmbyQ+W4UzhG2t9vaFbV0UElsNFclKNzWzrTKRKAQjteFMItEKewN1Mjsb8Ckb1UV\nnQRBmAAt3prGgv27+vjGVjH39CymNhrBt8DSk/DWqmPeEYewwkiMkOUADHrPbIPi\nGWJYfY1jvUJsp75usbzG7VZ8SxDD8APOhJHIDVm4HiTsS0YcOY53i/7WirChSNne\nTv4G862WYeqD1fdyZaKQ3b9fAQEq1g==\n-----END PRIVATE KEY-----\n", + "SIM2_MSISDN": "17039811904", + "SIM2_NAME": "testfsp2", + "SIMPAYEE_CURRENCY": "USD", + "SIMPAYEE_JWS_PRIVATE_KEY": "-----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDMu126miewCUCT\n7f49B0SyCPFGzmqGSs9rTPbk1se+BBhqfhsfkZj6cRRfrlg3rme6we0Ib2AF5TQL\nnoSBlDAimQcNOHXrqpAY/B0l/mgyUwmfv0NJ3UjZuCFuw3HRrU/oSUfXoDITC+Bi\n120w4FY2B/vPn+1iC/tsaCayneoaV/Sedq7H9+smEnQfGl3p5QJp/B2Ws3Bz1HqI\nIoxLEaO9VMeDHQPvNJn/7g9erqA5vIhmgLS46worOVjdRLH2SECH73qp8Wg0rJ8Y\neW2kQ8kuY4uHcG3MO6drYrC011U0ZyM90KV7dv2Y0h2FHlpn9s/pmb630m5ELpnB\nT/pYTLcXAgMBAAECggEADqk6Qz3SgBeMMYEWYZ4ZdsW6Ktpm+Xqg/kDy4JywOB9z\nSikBXeeKH3Z6ltwq2BicDV020Wb8Zt+s3vTOmLhDzC544/hPmtKfjWfR2eHX6gaq\nm+8ml+20pQFmb4Kn2MlC/Xzwm/SOXBvPyUmTua95rQExsK12DT0+F4YhLfhYsTh2\nHfkEzdFW4rrd+9ddKG1ZANS4ZaiMyzhtvUWeEBypBtVf+kBk+51t9pLCdjuynb8I\nWylSDhikT3/YQ/3g/Sz3SMp1u4x0GQe9FWYrnPzzp5LnM5fm49v8JWVHUvd0TOi0\ndQV+LYlgSD38YPpi4iKQSh0Zf0EBfbA83GsX2ArJ7QKBgQDmvcA6PqPo0OV/7RKY\nJuziA3TpucL8iVM1i7/Lv6+VkX88uDvEjwLoNAiYcgIm/CMK7WAwA+Dzn4r38EHB\nBKF4KRhP0qQS0KLXsd0tdsmAB0In7+cbKL4ttqNUP98xZAkTLJq9PXqTKN0qtyw4\nSfIsVMjDGoeSdWHObZYbGKICfQKBgQDjJLwolDrVX29V4zVmxQYH5iN+5kwKXHXj\nsuHBrW02Oj/GQFh3Xj6JQi3mzTWYhHwhA4pdaQtNYqTaz9Ic/O1VNPic2ovtg+cd\n7sh86qdQ4QZYhN3RT4oX///u6+UK90llh9hEBo3GuZ4X47tuByNtD4SFAlULrkSm\nfW4XaC3gIwKBgGil6HfCDx65F00UnVlKVicPQEf8ivVz5rwjPIJQ1nZ0PYuxVtIH\ntl7PspJJKra5pb7/957vM2fqlOFsIrZCvmS75p3VP7qUyzYeIdzLwgmBwTxRrrP/\nn3kmGx9LtJM29nKuySNIrb3uS5hi6PhCeUYn0cHC13fSKuCvjOOPIXMVAoGBAJg+\nCPdR0tUs8Byq+yH0sIQe1m+5wAG50zJYtUPxD6AnDpO8kQ8A1f19o/JsXJ3rPp+K\nFfVh8LdfhIs8e+H+DLztkizftqXtoLzJTQuc46QsDurJszsVisNnTI1BAvWEpWct\n0+BUXDZ0NuhgNUIb+rygh/v2gjYgCddlfqKlqwntAoGBAM5Kpp5R0G0ioAuqGqfZ\nsHEdLqJMSepgc6c7RC+3G/svtS2IqCfyNfVMM3qV5MY3J7KnAVjGOw2oJbXcPLXa\nuutsVVmPx2d/x2LZdc8dYYcdOQZvrUhmALhAPXM4SRujakxh+Uxi1VOiW+fZL8aW\nuu1pxuWD0gTJxFkp6u4YIAhw\n-----END PRIVATE KEY-----\n", + "SIMPAYEE_JWS_PUB_KEY": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzLtduponsAlAk+3+PQdE\nsgjxRs5qhkrPa0z25NbHvgQYan4bH5GY+nEUX65YN65nusHtCG9gBeU0C56EgZQw\nIpkHDTh166qQGPwdJf5oMlMJn79DSd1I2bghbsNx0a1P6ElH16AyEwvgYtdtMOBW\nNgf7z5/tYgv7bGgmsp3qGlf0nnaux/frJhJ0Hxpd6eUCafwdlrNwc9R6iCKMSxGj\nvVTHgx0D7zSZ/+4PXq6gObyIZoC0uOsKKzlY3USx9khAh+96qfFoNKyfGHltpEPJ\nLmOLh3BtzDuna2KwtNdVNGcjPdCle3b9mNIdhR5aZ/bP6Zm+t9JuRC6ZwU/6WEy3\nFwIDAQAB\n-----END PUBLIC KEY-----\n", + "SIMPAYEE_MSISDN": "17039811902", + "SIMPAYEE_NAME": "payeefsp", + "SIMPAYER_CURRENCY": "USD", + "SIMPAYER_JWS_PRIVATE_KEY": "-----BEGIN PRIVATE KEY-----\nMIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCg9eU66hg4ZAE6\njM4U8ylXQwUz9cdmzS3JyW+1bbgv77peMKSU/wFsi4QRwmbrYze9baFnGCKnS75E\nvCchib5vJxp3MDWzi/TGxmzgWdJRzkyCiI5C6dCgVL71MjsFgN3TN63wEf5sEU2I\neoJ8yXJM0pUG9f9NO7p/IGliDmt6C7EA7D9kQWigufmX0ZTVNKI07fKwC/AEKLp7\nkx99pvsCq8m184EEL15Q/NhA7R/5zKoHvmJa6Jd7tM0i0xn8IKOkNVFu3YIafAEC\nQWQwRbanFEeRc3tH3bEoYM8c74r+W+YxCG7nUf16XCk132XVffbHVl+wFgo18YB/\nsAJmcbePAgMBAAECggEAGQGKnsf+gkg7DqMQYx3Rxt5BISzmURjAK9CxG6ETk9Lt\nA7QP5ZvmVzwnhPDMN3Z/Et1EzXTo8U+pnBkVBTdWkAMlr+2b8ixklzr9cC9UJuRj\na4YWf9u+TyJLVmF63OSD0cwdKCZLffOENZc+zW8oZDn08BNomdGVLCnXZWXzGY8X\nKaJTJr29jEgkKOqFXdAHrsmj7TBtqSLZKx2IHdCmi05+5JCxVLPgnDiCicZ9zEii\nyWw57Q1migFIcw6ZQP4RyjgH1o70B+zo3OL7IQEirE17GUgK16XD8xi8hWCYTj5n\nxOz9yfVfPuYom/9Xbm5kYJZKE2HOZ3Lg8pUnWncuNQKBgQDbaOoACQPhVxQK1qYR\nRbW0I5Rn0EDxzsFPEpu3eXHoIYGXi8u/ew9AzFmGu+tKYJV5V4BCXo5x2ddE+B8B\ndXhyHLGfeV8tWKYKBpatolVxxKDL/9fnxoGIAO9cc91ieOm5JxmKscCVP1UnOXHZ\nuomSfAbGQwYDtMd2bJKkE1z0qwKBgQC7zacuv1PMaDFksHuNNRG+aZ74pJ77msht\nvJoKyaQcktD0xmIXhFfJvK4cclzG7s5jxCsu2ejimgmfVzgXlLEMrJFvSdFkD2SS\ngGqoxq5c9g8ssvt7xwr7aJ+VYYWTWRzJrOUny+99UbwHedu0EHL1BYILwy67Lium\nsgUeeCEgrQKBgGv+7f7qcRB/jgvvr3oc990dDjUzGmRrQlcrb54Vlu2NYH45fyZW\n6iEY9JAO+zd25tv9J9KDPFXpxb3a61gKfCie2wcF9MUbN08EAzKgDrKa+BKxcZJR\n8PwCic7V8QhBP7m09yt/Zq2PqNhPvCxRVtnVVnhMES/N0cgGlP9R0JVVAoGAHU2/\nkmnEN5bibiWjgasQM7fjWETHkdbbA1R0bM59zv+Rnz/9OlIqKI5KVKH7nAbTKXoI\niuzxi7ohWj2PwQ4wehvLLaRFCenk9X8YJXGq71Jtl7ntx6iNLCFtFS/8WbuD5GwX\n7ZfCrLk+L6RyBayzY0wSuKch+Y8AvKf2aISyFpkCgYEAjSfEjz9Cn+27HdiMoBwa\n+fyyoosci/6OBxj/WTKvV6KUYLBfFoAYpb9rqrbvnfyyc0UiAYQeMJAOWQ1kkzY4\nzXs63iPQi2UeGPJZ7RsT+31DSaG9YiQdrInsUrlm8hi1C7Pg/NNt6Y1G0WhWYrvF\niNK0yCENMhSoOTtbT9tmGi0=\n-----END PRIVATE KEY-----\n", + "SIMPAYER_MSISDN": "17039811901", + "SIMPAYER_NAME": "payerfsp", + "SIMPLE_ROUTING_MODE_ENABLED": true, + "TESTFSP1_BACKEND_TESTAPI_URL": "http://dev1-sim-testfsp1-backend:3003", + "TESTFSP1_CALLBACK_URL": "http://dev1-sim-testfsp1-scheme-adapter:4000", + "TESTFSP1_JWS_PUB_KEY": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2R3IuEDpqDtsS96emI0v\ndCJpeb/lnCxR2Nw5x6Z3GjC9PRFCJ2gsS2Zq70NaUQ5yWrrrZ9DZ8PjgCXqftUKG\n42uFsibLFpN09IjQuZCDuAkCdEjMgm+xies47ajRzl6evOc0ClkQBZVGybl9RAr6\nNRTFOYkYjJ0xS0MNkfRkDiOEu5BA/XKb5oLbyVMjGyvLgyS1g41x4fA+Ccb5PENa\nh9dqkFJ3j218Rs+bGytrVqrrCCjV1FiI+Y9YjKuTRRo7U/jcGHLfEc7YRcP2U9os\nxQxFvhHxR7W0e74fAU8B8YIJzwjaQvrEh9SJRc2IZsh6EdBAXXmbk4sHKyhoX0by\nUQIDAQAB\n-----END PUBLIC KEY-----\n", + "TESTFSP1_SDK_TESTAPI_URL": "http://dev1-sim-testfsp1-scheme-adapter:4002", + "TESTFSP1_SDK_TESTAPI_WS_URL": "ws://dev1-sim-testfsp1-scheme-adapter:4002", + "TESTFSP2_BACKEND_TESTAPI_URL": "http://dev1-sim-testfsp2-backend:3003", + "TESTFSP2_CALLBACK_URL": "http://dev1-sim-testfsp2-scheme-adapter:4000", + "TESTFSP2_JWS_PUB_KEY": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAv7k0Mqy0jSXFpHD9/a+Y\nl5djXq6HdyC+BsSA/sRKczEBKQyW8mEJVILAKkOibWzK7e+SJjQPbFjgqiUZvRI5\n+ggHkSJXEV28Bi2sF58A15sQjwaSkE2vBwLAL5GftSmao0QSozSfQ+RFw2N+loRG\nYedXZpRMsYFr1uA1qavcBjoj7JqPpID7UaTgXwwHWbV+j2uhQfotqRvOQ5KTmx5H\nJa+VjPu+xAC7mmcL+dxmeBpbJJD5Li8B8ggJXGJUk+En6XSIgZkQ6vKvC9HyasE6\nWZLXU+JJoCp2wkCPNTRxzPE2PGnlI0a4ZP2/y/2yacc4HQGBhEMc+SVT/VSZaMS+\nAQIDAQAB\n-----END PUBLIC KEY-----", + "TESTFSP2_SDK_TESTAPI_URL": "http://dev1-sim-testfsp2-scheme-adapter:4002", + "TESTFSP2_SDK_TESTAPI_WS_URL": "ws://dev1-sim-testfsp2-scheme-adapter:4002", + "TEST_NOTIFICATIONS": true, + "TTKFSP_JWS_KEY": "-----BEGIN PRIVATE KEY-----\n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\nDktFAP1w3ruycnE/t+/H8rDVJGPTHc8=\n-----END PRIVATE KEY-----\n", + "WS_ASSERTION_TIMEOUT": 5000, + "accept": "application/vnd.interoperability.parties+json;version=1.0", + "acceptParticipants": "application/vnd.interoperability.participants+json;version=1.0", + "acceptQuotes": "application/vnd.interoperability.quotes+json;version=1.0", + "acceptTransfers": "application/vnd.interoperability.transfers+json;version=1.0", + "accountId": "6", + "amount": "100", + "batchToIdValue1": "27713803066", + "batchToIdValue2": "27713803067", + "condition": "n2cwS3w4ekGlvNYoXg2uBAqssu3FCoXjADE2mziU5jU", + "contentTransfers": "application/vnd.interoperability.transfers+json;version=1.0", + "contentType": "application/vnd.interoperability.parties+json;version=1.0", + "contentTypeParticipants": "application/vnd.interoperability.participants+json;version=1.0", + "contentTypeQuotes": "application/vnd.interoperability.quotes+json;version=1.0", + "currency": "USD", + "currency2": "BGN", + "expectedAuthorizationsVersion": "1.0", + "expectedParticipantsVersion": "1.0", + "expectedPartiesVersion": "1.0", + "expectedQuotesVersion": "1.0", + "expectedTransactionRequestsVersion": "1.0", + "expectedTransfersVersion": "1.0", + "fromDOB": "1984-01-01", + "fromFirstName": "Firstname-Test", + "fromFspId": "testingtoolkitdfsp", + "fromIdType": "MSISDN", + "fromIdValue": "44123456789", + "fromLastName": "Lastname-Test", + "fromSubIdValue": "30", + "fspiopSignature": "{\"signature\":\"iU4GBXSfY8twZMj1zXX1CTe3LDO8Zvgui53icrriBxCUF_wltQmnjgWLWI4ZUEueVeOeTbDPBZazpBWYvBYpl5WJSUoXi14nVlangcsmu2vYkQUPmHtjOW-yb2ng6_aPfwd7oHLWrWzcsjTF-S4dW7GZRPHEbY_qCOhEwmmMOnE1FWF1OLvP0dM0r4y7FlnrZNhmuVIFhk_pMbEC44rtQmMFv4pm4EVGqmIm3eyXz0GkX8q_O1kGBoyIeV_P6RRcZ0nL6YUVMhPFSLJo6CIhL2zPm54Qdl2nVzDFWn_shVyV0Cl5vpcMJxJ--O_Zcbmpv6lxqDdygTC782Ob3CNMvg\\\",\\\"protectedHeader\\\":\\\"eyJhbGciOiJSUzI1NiIsIkZTUElPUC1VUkkiOiIvdHJhbnNmZXJzIiwiRlNQSU9QLUhUVFAtTWV0aG9kIjoiUE9TVCIsIkZTUElPUC1Tb3VyY2UiOiJPTUwiLCJGU1BJT1AtRGVzdGluYXRpb24iOiJNVE5Nb2JpbGVNb25leSIsIkRhdGUiOiIifQ\"}", + "fundsInPrepareAmount": "", + "fundsInPrepareTransferId": "", + "homeTransactionId": "123ABC", + "hubEmail": "some.email@gmail.com", + "hub_operator": "NOT_APPLICABLE", + "ilpPacket": "AYIDBQAAAAAAACcQJGcucGF5ZWVmc3AubXNpc2RuLnt7cmVjZWl2ZXJtc2lzZG59fYIC1GV5SjBjbUZ1YzJGamRHbHZia2xrSWpvaVptVXhNREU0Wm1NdE1EaGxZeTAwWWpJM0xUbGpZalF0TnpjMk9URTFNR00zT1dKaklpd2ljWFZ2ZEdWSlpDSTZJbVpsTVRBeE9HWmpMVEE0WldNdE5HSXlOeTA1WTJJMExUYzNOamt4TlRCak56bGlZeUlzSW5CaGVXVmxJanA3SW5CaGNuUjVTV1JKYm1adklqcDdJbkJoY25SNVNXUlVlWEJsSWpvaVRWTkpVMFJPSWl3aWNHRnlkSGxKWkdWdWRHbG1hV1Z5SWpvaWUzdHlaV05sYVhabGNrMVRTVk5FVG4xOUlpd2labk53U1dRaU9pSndZWGxsWldaemNDSjlmU3dpY0dGNVpYSWlPbnNpY0dGeWRIbEpaRWx1Wm04aU9uc2ljR0Z5ZEhsSlpGUjVjR1VpT2lKTlUwbFRSRTRpTENKd1lYSjBlVWxrWlc1MGFXWnBaWElpT2lJeU56Y3hNemd3TXprd05TSXNJbVp6Y0Vsa0lqb2ljR0Y1WlhKbWMzQWlmU3dpY0dWeWMyOXVZV3hKYm1adklqcDdJbU52YlhCc1pYaE9ZVzFsSWpwN0ltWnBjbk4wVG1GdFpTSTZJazFoZEhNaUxDSnNZWE4wVG1GdFpTSTZJa2hoWjIxaGJpSjlMQ0prWVhSbFQyWkNhWEowYUNJNklqRTVPRE10TVRBdE1qVWlmWDBzSW1GdGIzVnVkQ0k2ZXlKaGJXOTFiblFpT2lJeE1EQWlMQ0pqZFhKeVpXNWplU0k2SWxWVFJDSjlMQ0owY21GdWMyRmpkR2x2YmxSNWNHVWlPbnNpYzJObGJtRnlhVzhpT2lKVVVrRk9VMFpGVWlJc0ltbHVhWFJwWVhSdmNpSTZJbEJCV1VWU0lpd2lhVzVwZEdsaGRHOXlWSGx3WlNJNklrTlBUbE5WVFVWU0luMTkA", + "invalidFulfillment": "_3cco-YN5OGpRKVWV3n6x6uNpBTH9tYUdOYmHA-----", + "invalidToIdType": "ACCOUNT_ID", + "invalidToIdValue": "27713803099", + "mobileSimPayeeFsp": "greenbankfsp", + "mobileSimPayerFsp": "pinkbankfsp", + "note": "test", + "payeeIdType": "MSISDN", + "payeeIdentifier": "17039811902", + "payeefsp": "payeefsp", + "payeefspEmail": "some.email@gmail.com", + "payerIdType": "MSISDN", + "payerIdentifier": "17039811901", + "payerfsp": "testingtoolkitdfsp", + "payerfspEmail": "some.email@gmail.com", + "payerfspSettlementAccountBalanceAfterFundsIn": "", + "payerfspSettlementAccountBalanceBeforeFundsIn": "", + "payerfspSettlementAccountId": "", + "receiverMSISDN": "27713803912", + "testfsp1Email": "some.email@gmail.com", + "testfsp1IdType": "MSISDN", + "testfsp1Identifier": "17039811903", + "testfsp1MSISDN": "17039811903", + "testfsp2Email": "some.email@gmail.com", + "testfsp2IdType": "MSISDN", + "testfsp2Identifier": "17039811904", + "testfsp2MSISDN": "17039811904", + "toFspId": "payeefsp", + "toIdType": "MSISDN", + "toIdValue": "27713803912", + "toIdValueDelete": "27713803913", + "toSubIdValue": "30", + "validCondition": "GRzLaTP7DJ9t4P-a_BA0WA9wzzlsugf00-Tn6kESAfM", + "validCondition2": "kPLCKM62VY2jbekuw3apCTBg5zk_mVs9DD8-XpljQms", + "validFulfillment": "UNlJ98hZTY_dsw0cAqw4i_UN3v4utt7CZFB4yfLbVFA", + "validIlpPacket2": "AYIC9AAAAAAAABdwHWcucGF5ZWVmc3AubXNpc2RuLjIyNTU2OTk5MTI1ggLKZXlKMGNtRnVjMkZqZEdsdmJrbGtJam9pWmpRMFltUmtOV010WXpreE1DMDBZVGt3TFRoa05qa3RaR0ppWVRaaVl6aGxZVFpqSWl3aWNYVnZkR1ZKWkNJNklqVTBaRFZtTURsaUxXRTBOMlF0TkRCa05pMWhZVEEzTFdFNVkyWXpZbUl5TkRsaFpDSXNJbkJoZVdWbElqcDdJbkJoY25SNVNXUkpibVp2SWpwN0luQmhjblI1U1dSVWVYQmxJam9pVFZOSlUwUk9JaXdpY0dGeWRIbEpaR1Z1ZEdsbWFXVnlJam9pTWpJMU5UWTVPVGt4TWpVaUxDSm1jM0JKWkNJNkluQmhlV1ZsWm5Od0luMTlMQ0p3WVhsbGNpSTZleUp3WVhKMGVVbGtTVzVtYnlJNmV5SndZWEowZVVsa1ZIbHdaU0k2SWsxVFNWTkVUaUlzSW5CaGNuUjVTV1JsYm5ScFptbGxjaUk2SWpJeU5UQTNNREE0TVRneElpd2labk53U1dRaU9pSndZWGxsY21aemNDSjlMQ0p3WlhKemIyNWhiRWx1Wm04aU9uc2lZMjl0Y0d4bGVFNWhiV1VpT25zaVptbHljM1JPWVcxbElqb2lUV0YwY3lJc0lteGhjM1JPWVcxbElqb2lTR0ZuYldGdUluMHNJbVJoZEdWUFprSnBjblJvSWpvaU1UazRNeTB4TUMweU5TSjlmU3dpWVcxdmRXNTBJanA3SW1GdGIzVnVkQ0k2SWpZd0lpd2lZM1Z5Y21WdVkza2lPaUpWVTBRaWZTd2lkSEpoYm5OaFkzUnBiMjVVZVhCbElqcDdJbk5qWlc1aGNtbHZJam9pVkZKQlRsTkdSVklpTENKcGJtbDBhV0YwYjNJaU9pSlFRVmxGVWlJc0ltbHVhWFJwWVhSdmNsUjVjR1VpT2lKRFQwNVRWVTFGVWlKOWZRAA" + } +} \ No newline at end of file diff --git a/environments/hub.json b/environments/hub.json index 37071c07..27e11f13 100644 --- a/environments/hub.json +++ b/environments/hub.json @@ -58,7 +58,7 @@ "contentTypeParticipants": "application/vnd.interoperability.participants+json;version=1.0", "contentTypeQuotes": "application/vnd.interoperability.quotes+json;version=1.0", "currency": "USD", - "currency2": "USD", + "currency2": "BGN", "fromDOB": "1984-01-01", "fromFirstName": "Firstname-Test", "fromFspId": "testingtoolkitdfsp", From 560ee44f5a5a3a17d292461713dcb89d32599d98 Mon Sep 17 00:00:00 2001 From: vgenev Date: Fri, 25 Jun 2021 14:26:49 +0300 Subject: [PATCH 2/7] added default deferred settlement model test cases and provisioning --- .vscode/notes.md | 0 ...ent-management-primary-currency-test.json} | 196 +- ...ement-management-second-currency-test.json | 5392 +++++++++++++ .../mixed_settlement_model.json | 7061 +++++++++++++++++ 4 files changed, 12551 insertions(+), 98 deletions(-) create mode 100644 .vscode/notes.md rename collections/hub/golden_path/settlement_management/{Settlement-management-test.json => Settlement-management-primary-currency-test.json} (97%) create mode 100644 collections/hub/golden_path/settlement_management/Settlement-management-second-currency-test.json create mode 100644 collections/hub/golden_path/settlement_management/mixed_settlement_model.json diff --git a/.vscode/notes.md b/.vscode/notes.md new file mode 100644 index 00000000..e69de29b diff --git a/collections/hub/golden_path/settlement_management/Settlement-management-test.json b/collections/hub/golden_path/settlement_management/Settlement-management-primary-currency-test.json similarity index 97% rename from collections/hub/golden_path/settlement_management/Settlement-management-test.json rename to collections/hub/golden_path/settlement_management/Settlement-management-primary-currency-test.json index 3f223c92..d5ec15f5 100644 --- a/collections/hub/golden_path/settlement_management/Settlement-management-test.json +++ b/collections/hub/golden_path/settlement_management/Settlement-management-primary-currency-test.json @@ -21,7 +21,7 @@ }, "url": "{$inputs.HOST_CENTRAL_LEDGER}", "headers": { - "FSPIOP-Source": "{$inputs.fromFspId}", + "FSPIOP-Source": "{$inputs.fromFspId}", "Authorization": "{$inputs.TTK_BEARER_TOKEN}" }, "tests": { @@ -50,7 +50,7 @@ "var jsonData = response.body;\r", "console.log(jsonData);\r", " for(var i in jsonData) {\r", - " if((jsonData[i].ledgerAccountType === 'POSITION') ) {\r", + " if((jsonData[i].ledgerAccountType === 'POSITION') && (jsonData[i].currency === environment.currency) ) {\r", " \r", "environment.participant1accountid=jsonData[i].id;\r", "\r", @@ -78,7 +78,7 @@ }, "url": "{$inputs.HOST_CENTRAL_LEDGER}", "headers": { - "FSPIOP-Source": "{$inputs.fromFspId}", + "FSPIOP-Source": "{$inputs.fromFspId}", "Content-Type": "application/json", "Authorization": "{$inputs.TTK_BEARER_TOKEN}" }, @@ -113,7 +113,7 @@ }, "url": "{$inputs.HOST_CENTRAL_LEDGER}", "headers": { - "FSPIOP-Source": "{$inputs.fromFspId}", + "FSPIOP-Source": "{$inputs.fromFspId}", "Authorization": "{$inputs.TTK_BEARER_TOKEN}" }, "tests": { @@ -142,7 +142,7 @@ "var jsonData = response.body;\r", "console.log(jsonData);\r", " for(var i in jsonData) {\r", - " if((jsonData[i].ledgerAccountType === 'POSITION') ) {\r", + " if((jsonData[i].ledgerAccountType === 'POSITION') && (jsonData[i].currency === environment.currency) ) {\r", " \r", "environment.participant2accountid=jsonData[i].id;\r", "\r", @@ -171,7 +171,7 @@ "url": "{$inputs.HOST_CENTRAL_LEDGER}", "headers": { "FSPIOP-Source": "{$inputs.fromFspId}", - "Authorization": "{$inputs.TTK_BEARER_TOKEN}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}", "Content-Type": "application/json" }, "tests": { @@ -206,7 +206,7 @@ "url": "{$inputs.HOST_CENTRAL_LEDGER}", "headers": { "FSPIOP-Source": "{$inputs.fromFspId}", - "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" }, "tests": { "assertions": [ @@ -234,7 +234,7 @@ "var jsonData = response.body;\r", "console.log(jsonData);\r", " for(var i in jsonData) {\r", - " if((jsonData[i].ledgerAccountType === 'POSITION') ) {\r", + " if((jsonData[i].ledgerAccountType === 'POSITION') && (jsonData[i].currency === environment.currency) ) {\r", " \r", "environment.participant3accountid=jsonData[i].id;\r", "\r", @@ -264,7 +264,7 @@ "headers": { "FSPIOP-Source": "{$inputs.fromFspId}", "Content-Type": "application/json", - "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" }, "tests": { "assertions": [ @@ -298,7 +298,7 @@ "url": "{$inputs.HOST_CENTRAL_LEDGER}", "headers": { "FSPIOP-Source": "{$inputs.fromFspId}", - "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" }, "tests": { "assertions": [ @@ -326,7 +326,7 @@ "var jsonData = response.body;\r", "console.log(jsonData);\r", " for(var i in jsonData) {\r", - " if((jsonData[i].ledgerAccountType === 'POSITION') ) {\r", + " if((jsonData[i].ledgerAccountType === 'POSITION') && (jsonData[i].currency === environment.currency)) {\r", " \r", "environment.participant4accountid=jsonData[i].id;\r", "\r", @@ -356,7 +356,7 @@ "headers": { "FSPIOP-Source": "{$inputs.fromFspId}", "Content-Type": "application/json", - "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" }, "tests": { "assertions": [ @@ -397,7 +397,7 @@ "headers": { "Content-Type": "application/json", "FSPIOP-Source": "{$inputs.fromFspId}", - "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" }, "tests": { "assertions": [ @@ -454,7 +454,7 @@ "headers": { "Content-Type": "application/json", "FSPIOP-Source": "{$inputs.fromFspId}", - "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" }, "tests": { "assertions": [ @@ -527,7 +527,7 @@ "headers": { "Content-Type": "application/json", "FSPIOP-Source": "{$inputs.fromFspId}", - "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" }, "tests": { "assertions": [ @@ -634,7 +634,7 @@ "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", "headers": { "FSPIOP-Source": "{$inputs.fromFspId}", - "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" }, "tests": { "assertions": [ @@ -665,7 +665,7 @@ "if(environment.winstate===\"PENDING_SETTLEMENT\"){", "", "res.participants.map(function (participant) {", - " participant.accounts.filter(account => account.netSettlementAmount.currency === environment.SIMPAYER_CURRENCY).forEach(curAccount => {", + " participant.accounts.filter(account => account.netSettlementAmount.currency === environment.currency).forEach(curAccount => {", "//for(const curAccount of account) { ", "", " dfspsacc[i] = {", @@ -701,7 +701,7 @@ " console.log(\"Window is empty\")", "}", "/*res.participants.map(participant => {", - " participant.accounts.filter(account => account.netSettlementAmount.currency === pm.environment.get('SIMPAYER_CURRENCY'))", + " participant.accounts.filter(account => account.netSettlementAmount.currency === pm.environment.get('currency'))", " .forEach(curAccount => {*/", " " ] @@ -730,7 +730,7 @@ "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", "headers": { "FSPIOP-Source": "{$inputs.fromFspId}", - "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" }, "tests": { "assertions": [ @@ -761,7 +761,7 @@ "", "", "res.participants.map(function (participant) {", - " participant.accounts.filter(account => account.netSettlementAmount.currency === environment.SIMPAYER_CURRENCY).forEach(curAccount => {", + " participant.accounts.filter(account => account.netSettlementAmount.currency === environment.currency).forEach(curAccount => {", "//for(const curAccount of account) { ", "", " dfspsacc[i] = {", @@ -797,7 +797,7 @@ " console.log(\"Window is empty\")", "}", "/*res.participants.map(participant => {", - " participant.accounts.filter(account => account.netSettlementAmount.currency === pm.environment.get('SIMPAYER_CURRENCY'))", + " participant.accounts.filter(account => account.netSettlementAmount.currency === pm.environment.get('currency'))", " .forEach(curAccount => {*/", " " ] @@ -821,7 +821,7 @@ "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", "headers": { "FSPIOP-Source": "{$inputs.fromFspId}", - "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" }, "tests": { "assertions": [ @@ -852,7 +852,7 @@ "", "", "res.participants.map(function (participant) {", - " participant.accounts.filter(account => account.netSettlementAmount.currency === environment.SIMPAYER_CURRENCY).forEach(curAccount => {", + " participant.accounts.filter(account => account.netSettlementAmount.currency === environment.currency).forEach(curAccount => {", "//for(const curAccount of account) { ", "", " dfspsacc[i] = {", @@ -888,7 +888,7 @@ " console.log(\"Window is empty\")", "}", "/*res.participants.map(participant => {", - " participant.accounts.filter(account => account.netSettlementAmount.currency === pm.environment.get('SIMPAYER_CURRENCY'))", + " participant.accounts.filter(account => account.netSettlementAmount.currency === pm.environment.get('currency'))", " .forEach(curAccount => {*/", " " ] @@ -912,7 +912,7 @@ "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", "headers": { "FSPIOP-Source": "{$inputs.fromFspId}", - "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" }, "tests": { "assertions": [ @@ -943,7 +943,7 @@ "", "", "res.participants.map(function (participant) {", - " participant.accounts.filter(account => account.netSettlementAmount.currency === environment.SIMPAYER_CURRENCY).forEach(curAccount => {", + " participant.accounts.filter(account => account.netSettlementAmount.currency === environment.currency).forEach(curAccount => {", "//for(const curAccount of account) { ", "", " dfspsacc[i] = {", @@ -1018,7 +1018,7 @@ }, "headers": { "FSPIOP-Source": "{$inputs.fromFspId}", - "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" }, "scriptingEngine": "javascript", "scripts": { @@ -1081,7 +1081,7 @@ }, "headers": { "FSPIOP-Source": "{$inputs.fromFspId}", - "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" }, "scriptingEngine": "javascript", "scripts": { @@ -1095,7 +1095,7 @@ "var res = response.body;", "", "", - " res.filter(account => account.currency === environment.currency2).forEach(curAccount => {", + " res.filter(account => account.currency === environment.currency).forEach(curAccount => {", " ", " if(curAccount.ledgerAccountType === \"SETTLEMENT\") {", " environment.testfsp2SettleAccountBalanceBeforeTransfer= curAccount.value", @@ -1144,7 +1144,7 @@ }, "headers": { "FSPIOP-Source": "{$inputs.fromFspId}", - "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" }, "scriptingEngine": "javascript", "scripts": { @@ -1158,7 +1158,7 @@ "var res = response.body;", "", "", - " res.filter(account => account.currency === environment.SIMPAYER_CURRENCY).forEach(curAccount => {", + " res.filter(account => account.currency === environment.currency).forEach(curAccount => {", " ", " if(curAccount.ledgerAccountType === \"SETTLEMENT\") {", " environment.payerfspSettleAccountBalanceBeforeTransfer= curAccount.value", @@ -1207,7 +1207,7 @@ }, "headers": { "FSPIOP-Source": "{$inputs.fromFspId}", - "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" }, "scriptingEngine": "javascript", "scripts": { @@ -1221,7 +1221,7 @@ "var res = response.body;", "", "", - " res.filter(account => account.currency === environment.SIMPAYER_CURRENCY).forEach(curAccount => {", + " res.filter(account => account.currency === environment.currency).forEach(curAccount => {", " ", " if(curAccount.ledgerAccountType === \"SETTLEMENT\") {", " environment.payeefspSettleAccountBalanceBeforeTransfer= curAccount.value", @@ -1259,7 +1259,7 @@ "url": "{$inputs.HOST_CENTRAL_LEDGER}", "headers": { "FSPIOP-Source": "{$inputs.fromFspId}", - "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" }, "tests": { "assertions": [ @@ -1278,7 +1278,7 @@ "exec": [ "var jsonData = response.body;\r", "jsonData\r", - " .filter(account => account.currency === environment.SIMPAYER_CURRENCY)\r", + " .filter(account => account.currency === environment.currency)\r", " .forEach(curAccount => {\r", " if(curAccount.ledgerAccountType === \"HUB_RECONCILIATION\") {\r", " environment.hubReconciliationAccountBalanceBeforeTransfer=curAccount.value;\r", @@ -1317,7 +1317,7 @@ "Content-Type": "application/vnd.interoperability.quotes+json;version=1.0", "Date": "{$function.generic.curDate}", "FSPIOP-Source": "{$inputs.SIM1_NAME}", - "Authorization": "{$inputs.TESTFSP1_BEARER_TOKEN}", + "Authorization": "{$inputs.TESTFSP1_BEARER_TOKEN}", "FSPIOP-Destination": "{$inputs.SIM2_NAME}" }, "body": { @@ -1347,7 +1347,7 @@ "amountType": "RECEIVE", "amount": { "amount": "60", - "currency": "{$inputs.currency2}" + "currency": "{$inputs.currency}" }, "transactionType": { "scenario": "TRANSFER", @@ -1484,7 +1484,7 @@ "Content-Type": "application/vnd.interoperability.transfers+json;version=1.0", "Date": "{$function.generic.curDate}", "FSPIOP-Source": "{$inputs.SIM1_NAME}", - "Authorization": "{$inputs.TESTFSP1_BEARER_TOKEN}" + "Authorization": "{$inputs.TESTFSP1_BEARER_TOKEN}" }, "body": { "transferId": "{$prev.3.request.body.transactionId}", @@ -1615,7 +1615,7 @@ "Date": "{$function.generic.curDate}", "FSPIOP-Source": "{$inputs.SIM1_NAME}", "FSPIOP-Destination": "{$inputs.SIMPAYEE_NAME}", - "Authorization": "{$inputs.TESTFSP1_BEARER_TOKEN}" + "Authorization": "{$inputs.TESTFSP1_BEARER_TOKEN}" }, "body": { "quoteId": "{$function.generic.generateUUID}", @@ -1644,7 +1644,7 @@ "amountType": "RECEIVE", "amount": { "amount": "55", - "currency": "{$inputs.currency2}" + "currency": "{$inputs.currency}" }, "transactionType": { "scenario": "TRANSFER", @@ -1781,7 +1781,7 @@ "Content-Type": "application/vnd.interoperability.transfers+json;version=1.0", "Date": "{$function.generic.curDate}", "FSPIOP-Source": "{$inputs.SIM1_NAME}", - "Authorization": "{$inputs.TESTFSP1_BEARER_TOKEN}" + "Authorization": "{$inputs.TESTFSP1_BEARER_TOKEN}" }, "body": { "transferId": "{$prev.3.request.body.transactionId}", @@ -1908,7 +1908,7 @@ "Date": "{$function.generic.curDate}", "FSPIOP-Source": "{$inputs.SIMPAYER_NAME}", "FSPIOP-Destination": "{$inputs.SIM1_NAME}", - "Authorization": "{$inputs.PAYER_BEARER_TOKEN}" + "Authorization": "{$inputs.PAYER_BEARER_TOKEN}" }, "body": { "quoteId": "{$function.generic.generateUUID}", @@ -1937,7 +1937,7 @@ "amountType": "RECEIVE", "amount": { "amount": "35", - "currency": "{$inputs.currency2}" + "currency": "{$inputs.currency}" }, "transactionType": { "scenario": "TRANSFER", @@ -2074,7 +2074,7 @@ "Content-Type": "application/vnd.interoperability.transfers+json;version=1.0", "Date": "{$function.generic.curDate}", "FSPIOP-Source": "{$inputs.SIMPAYER_NAME}", - "Authorization": "{$inputs.PAYER_BEARER_TOKEN}" + "Authorization": "{$inputs.PAYER_BEARER_TOKEN}" }, "body": { "transferId": "{$prev.3.request.body.transactionId}", @@ -2201,7 +2201,7 @@ "Date": "{$function.generic.curDate}", "FSPIOP-Source": "{$inputs.SIM2_NAME}", "FSPIOP-Destination": "{$inputs.SIMPAYER_NAME}", - "Authorization": "{$inputs.TESTFSP2_BEARER_TOKEN}" + "Authorization": "{$inputs.TESTFSP2_BEARER_TOKEN}" }, "body": { "quoteId": "{$function.generic.generateUUID}", @@ -2230,7 +2230,7 @@ "amountType": "RECEIVE", "amount": { "amount": "20", - "currency": "{$inputs.currency2}" + "currency": "{$inputs.currency}" }, "transactionType": { "scenario": "TRANSFER", @@ -2368,7 +2368,7 @@ "Content-Type": "application/vnd.interoperability.transfers+json;version=1.0", "Date": "{$function.generic.curDate}", "FSPIOP-Source": "{$inputs.SIM2_NAME}", - "Authorization": "{$inputs.TESTFSP2_BEARER_TOKEN}" + "Authorization": "{$inputs.TESTFSP2_BEARER_TOKEN}" }, "body": { "transferId": "{$prev.3.request.body.transactionId}", @@ -2493,7 +2493,7 @@ "Date": "{$function.generic.curDate}", "FSPIOP-Source": "{$inputs.SIMPAYEE_NAME}", "FSPIOP-Destination": "{$inputs.SIM2_NAME}", - "Authorization": "{$inputs.PAYEE_BEARER_TOKEN}" + "Authorization": "{$inputs.PAYEE_BEARER_TOKEN}" }, "body": { "quoteId": "{$function.generic.generateUUID}", @@ -2522,7 +2522,7 @@ "amountType": "RECEIVE", "amount": { "amount": "35", - "currency": "{$inputs.currency2}" + "currency": "{$inputs.currency}" }, "transactionType": { "scenario": "TRANSFER", @@ -2659,7 +2659,7 @@ "Content-Type": "application/vnd.interoperability.transfers+json;version=1.0", "Date": "{$function.generic.curDate}", "FSPIOP-Source": "{$inputs.SIMPAYEE_NAME}", - "Authorization": "{$inputs.PAYEE_BEARER_TOKEN}" + "Authorization": "{$inputs.PAYEE_BEARER_TOKEN}" }, "body": { "transferId": "{$prev.3.request.body.transactionId}", @@ -2786,7 +2786,7 @@ "Date": "{$function.generic.curDate}", "FSPIOP-Source": "{$inputs.SIMPAYEE_NAME}", "FSPIOP-Destination": "{$inputs.SIMPAYER_NAME}", - "Authorization": "{$inputs.PAYEE_BEARER_TOKEN}" + "Authorization": "{$inputs.PAYEE_BEARER_TOKEN}" }, "body": { "quoteId": "{$function.generic.generateUUID}", @@ -2815,7 +2815,7 @@ "amountType": "RECEIVE", "amount": { "amount": "25", - "currency": "{$inputs.currency2}" + "currency": "{$inputs.currency}" }, "transactionType": { "scenario": "TRANSFER", @@ -2952,7 +2952,7 @@ "Content-Type": "application/vnd.interoperability.transfers+json;version=1.0", "Date": "{$function.generic.curDate}", "FSPIOP-Source": "{$inputs.SIMPAYEE_NAME}", - "Authorization": "{$inputs.PAYEE_BEARER_TOKEN}" + "Authorization": "{$inputs.PAYEE_BEARER_TOKEN}" }, "body": { "transferId": "{$prev.3.request.body.transactionId}", @@ -3080,7 +3080,7 @@ "headers": { "Content-Type": "application/json", "FSPIOP-Source": "{$inputs.fromFspId}", - "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" }, "tests": { "assertions": [ @@ -3137,7 +3137,7 @@ "headers": { "Content-Type": "application/json", "FSPIOP-Source": "{$inputs.fromFspId}", - "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" }, "tests": { "assertions": [ @@ -3210,7 +3210,7 @@ "headers": { "Content-Type": "application/json", "FSPIOP-Source": "{$inputs.fromFspId}", - "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" }, "tests": { "assertions": [ @@ -3306,7 +3306,7 @@ "url": "{$inputs.HOST_CENTRAL_LEDGER}", "headers": { "FSPIOP-Source": "{$inputs.fromFspId}", - "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" }, "tests": { "assertions": [ @@ -3357,7 +3357,7 @@ "url": "{$inputs.HOST_CENTRAL_LEDGER}", "headers": { "FSPIOP-Source": "{$inputs.fromFspId}", - "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" }, "tests": { "assertions": [ @@ -3408,7 +3408,7 @@ "url": "{$inputs.HOST_CENTRAL_LEDGER}", "headers": { "FSPIOP-Source": "{$inputs.fromFspId}", - "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" }, "tests": { "assertions": [ @@ -3459,7 +3459,7 @@ "url": "{$inputs.HOST_CENTRAL_LEDGER}", "headers": { "FSPIOP-Source": "{$inputs.fromFspId}", - "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" }, "tests": { "assertions": [ @@ -3516,7 +3516,7 @@ "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", "headers": { "FSPIOP-Source": "{$inputs.fromFspId}", - "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" }, "tests": { "assertions": [ @@ -3549,7 +3549,7 @@ "if(environment.winstate===\"PENDING_SETTLEMENT\"){", "", "res.participants.map(function (participant) {", - " participant.accounts.filter(account => account.netSettlementAmount.currency === environment.SIMPAYER_CURRENCY).forEach(curAccount => {", + " participant.accounts.filter(account => account.netSettlementAmount.currency === environment.currency).forEach(curAccount => {", "//for(const curAccount of account) { ", "", " dfspsacc[i] = {", @@ -3585,7 +3585,7 @@ " console.log(\"Window is empty\")", "}", "/*res.participants.map(participant => {", - " participant.accounts.filter(account => account.netSettlementAmount.currency === pm.environment.get('SIMPAYER_CURRENCY'))", + " participant.accounts.filter(account => account.netSettlementAmount.currency === pm.environment.get('currency'))", " .forEach(curAccount => {*/", " " ] @@ -3614,7 +3614,7 @@ "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", "headers": { "FSPIOP-Source": "{$inputs.fromFspId}", - "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" }, "scriptingEngine": "javascript", "tests": { @@ -3658,7 +3658,7 @@ "\r", "try{\r", "res.participants.map(function (participant) {\r", - " participant.accounts.filter(account => account.netSettlementAmount.currency === environment.SIMPAYER_CURRENCY).every(curAccount => {\r", + " participant.accounts.filter(account => account.netSettlementAmount.currency === environment.currency).every(curAccount => {\r", " if(isok === true){ \r", " if(curAccount.state === \"PS_TRANSFERS_RECORDED\"){\r", " isok= true;\r", @@ -3706,7 +3706,7 @@ "url": "{$inputs.HOST_CENTRAL_LEDGER}", "headers": { "FSPIOP-Source": "{$inputs.fromFspId}", - "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" }, "tests": { "assertions": [ @@ -3771,7 +3771,7 @@ "url": "{$inputs.HOST_CENTRAL_LEDGER}", "headers": { "FSPIOP-Source": "{$inputs.fromFspId}", - "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" }, "tests": { "assertions": [ @@ -3836,7 +3836,7 @@ "url": "{$inputs.HOST_CENTRAL_LEDGER}", "headers": { "FSPIOP-Source": "{$inputs.fromFspId}", - "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" }, "tests": { "assertions": [ @@ -3901,7 +3901,7 @@ "url": "{$inputs.HOST_CENTRAL_LEDGER}", "headers": { "FSPIOP-Source": "{$inputs.fromFspId}", - "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" }, "tests": { "assertions": [ @@ -3972,7 +3972,7 @@ "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", "headers": { "FSPIOP-Source": "{$inputs.fromFspId}", - "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" }, "tests": { "assertions": [ @@ -4005,7 +4005,7 @@ "if(environment.winstate===\"PENDING_SETTLEMENT\"){", "", "res.participants.map(function (participant) {", - " participant.accounts.filter(account => account.netSettlementAmount.currency === environment.SIMPAYER_CURRENCY).forEach(curAccount => {", + " participant.accounts.filter(account => account.netSettlementAmount.currency === environment.currency).forEach(curAccount => {", "//for(const curAccount of account) { ", "", " dfspsacc[i] = {", @@ -4041,7 +4041,7 @@ " console.log(\"Window is empty\")", "}", "/*res.participants.map(participant => {", - " participant.accounts.filter(account => account.netSettlementAmount.currency === pm.environment.get('SIMPAYER_CURRENCY'))", + " participant.accounts.filter(account => account.netSettlementAmount.currency === pm.environment.get('currency'))", " .forEach(curAccount => {*/", " " ] @@ -4070,7 +4070,7 @@ "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", "headers": { "FSPIOP-Source": "{$inputs.fromFspId}", - "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" }, "scriptingEngine": "javascript", "tests": { @@ -4114,7 +4114,7 @@ "\r", "try{\r", "res.participants.map(function (participant) {\r", - " participant.accounts.filter(account => account.netSettlementAmount.currency === environment.SIMPAYER_CURRENCY).every(curAccount => {\r", + " participant.accounts.filter(account => account.netSettlementAmount.currency === environment.currency).every(curAccount => {\r", " if(isok === true){ \r", " if(curAccount.state === \"PS_TRANSFERS_RESERVED\"){\r", " isok= true;\r", @@ -4162,7 +4162,7 @@ "url": "{$inputs.HOST_CENTRAL_LEDGER}", "headers": { "FSPIOP-Source": "{$inputs.fromFspId}", - "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" }, "tests": { "assertions": [ @@ -4227,7 +4227,7 @@ "url": "{$inputs.HOST_CENTRAL_LEDGER}", "headers": { "FSPIOP-Source": "{$inputs.fromFspId}", - "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" }, "tests": { "assertions": [ @@ -4292,7 +4292,7 @@ "url": "{$inputs.HOST_CENTRAL_LEDGER}", "headers": { "FSPIOP-Source": "{$inputs.fromFspId}", - "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" }, "tests": { "assertions": [ @@ -4357,7 +4357,7 @@ "url": "{$inputs.HOST_CENTRAL_LEDGER}", "headers": { "FSPIOP-Source": "{$inputs.fromFspId}", - "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" }, "tests": { "assertions": [ @@ -4428,7 +4428,7 @@ "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", "headers": { "FSPIOP-Source": "{$inputs.fromFspId}", - "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" }, "tests": { "assertions": [ @@ -4461,7 +4461,7 @@ "if(environment.winstate===\"PENDING_SETTLEMENT\"){", "", "res.participants.map(function (participant) {", - " participant.accounts.filter(account => account.netSettlementAmount.currency === environment.SIMPAYER_CURRENCY).forEach(curAccount => {", + " participant.accounts.filter(account => account.netSettlementAmount.currency === environment.currency).forEach(curAccount => {", "//for(const curAccount of account) { ", "", " dfspsacc[i] = {", @@ -4497,7 +4497,7 @@ " console.log(\"Window is empty\")", "}", "/*res.participants.map(participant => {", - " participant.accounts.filter(account => account.netSettlementAmount.currency === pm.environment.get('SIMPAYER_CURRENCY'))", + " participant.accounts.filter(account => account.netSettlementAmount.currency === pm.environment.get('currency'))", " .forEach(curAccount => {*/", " " ] @@ -4526,7 +4526,7 @@ "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", "headers": { "FSPIOP-Source": "{$inputs.fromFspId}", - "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" }, "scriptingEngine": "javascript", "tests": { @@ -4570,7 +4570,7 @@ "\r", "try{\r", "res.participants.map(function (participant) {\r", - " participant.accounts.filter(account => account.netSettlementAmount.currency === environment.SIMPAYER_CURRENCY).every(curAccount => {\r", + " participant.accounts.filter(account => account.netSettlementAmount.currency === environment.currency).every(curAccount => {\r", " if(isok === true){ \r", " if(curAccount.state === \"PS_TRANSFERS_COMMITTED\"){\r", " isok= true;\r", @@ -4618,7 +4618,7 @@ "url": "{$inputs.HOST_CENTRAL_LEDGER}", "headers": { "FSPIOP-Source": "{$inputs.fromFspId}", - "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" }, "tests": { "assertions": [ @@ -4683,7 +4683,7 @@ "url": "{$inputs.HOST_CENTRAL_LEDGER}", "headers": { "FSPIOP-Source": "{$inputs.fromFspId}", - "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" }, "tests": { "assertions": [ @@ -4748,7 +4748,7 @@ "url": "{$inputs.HOST_CENTRAL_LEDGER}", "headers": { "FSPIOP-Source": "{$inputs.fromFspId}", - "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" }, "tests": { "assertions": [ @@ -4813,7 +4813,7 @@ "url": "{$inputs.HOST_CENTRAL_LEDGER}", "headers": { "FSPIOP-Source": "{$inputs.fromFspId}", - "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" }, "tests": { "assertions": [ @@ -4878,7 +4878,7 @@ "url": "{$inputs.HOST_CENTRAL_LEDGER}", "headers": { "FSPIOP-Source": "{$inputs.fromFspId}", - "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" }, "tests": { "assertions": [ @@ -4913,7 +4913,7 @@ "var hubReconciliationAccountBalanceAfterCommit;\r", "var hubMultilateralAccountBalanceAfterCommit;\r", "jsonData\r", - " .filter(account => account.currency === environment.SIMPAYER_CURRENCY)\r", + " .filter(account => account.currency === environment.currency)\r", " .forEach(curAccount => {\r", " if(curAccount.ledgerAccountType === \"HUB_RECONCILIATION\") {\r", " hubReconciliationAccountBalanceAfterCommit = curAccount.value;\r", @@ -4953,7 +4953,7 @@ "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", "headers": { "FSPIOP-Source": "{$inputs.fromFspId}", - "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" }, "tests": { "assertions": [ @@ -4986,7 +4986,7 @@ "if(environment.winstate===\"PENDING_SETTLEMENT\"){", "", "res.participants.map(function (participant) {", - " participant.accounts.filter(account => account.netSettlementAmount.currency === environment.SIMPAYER_CURRENCY).forEach(curAccount => {", + " participant.accounts.filter(account => account.netSettlementAmount.currency === environment.currency).forEach(curAccount => {", "//for(const curAccount of account) { ", "", " dfspsacc[i] = {", @@ -5022,7 +5022,7 @@ " console.log(\"Window is empty\")", "}", "/*res.participants.map(participant => {", - " participant.accounts.filter(account => account.netSettlementAmount.currency === pm.environment.get('SIMPAYER_CURRENCY'))", + " participant.accounts.filter(account => account.netSettlementAmount.currency === pm.environment.get('currency'))", " .forEach(curAccount => {*/", " " ] @@ -5051,7 +5051,7 @@ "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", "headers": { "FSPIOP-Source": "{$inputs.fromFspId}", - "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" }, "scriptingEngine": "javascript", "tests": { @@ -5095,7 +5095,7 @@ "\r", "try{\r", "res.participants.map(function (participant) {\r", - " participant.accounts.filter(account => account.netSettlementAmount.currency === environment.SIMPAYER_CURRENCY).every(curAccount => {\r", + " participant.accounts.filter(account => account.netSettlementAmount.currency === environment.currency).every(curAccount => {\r", " if(isok === true){ \r", " if(curAccount.state === \"SETTLED\"){\r", " isok= true;\r", @@ -5143,7 +5143,7 @@ "url": "{$inputs.HOST_CENTRAL_LEDGER}", "headers": { "FSPIOP-Source": "{$inputs.fromFspId}", - "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" }, "tests": { "assertions": [ @@ -5208,7 +5208,7 @@ "url": "{$inputs.HOST_CENTRAL_LEDGER}", "headers": { "FSPIOP-Source": "{$inputs.fromFspId}", - "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" }, "tests": { "assertions": [ @@ -5273,7 +5273,7 @@ "url": "{$inputs.HOST_CENTRAL_LEDGER}", "headers": { "FSPIOP-Source": "{$inputs.fromFspId}", - "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" }, "tests": { "assertions": [ @@ -5338,7 +5338,7 @@ "url": "{$inputs.HOST_CENTRAL_LEDGER}", "headers": { "FSPIOP-Source": "{$inputs.fromFspId}", - "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" }, "tests": { "assertions": [ diff --git a/collections/hub/golden_path/settlement_management/Settlement-management-second-currency-test.json b/collections/hub/golden_path/settlement_management/Settlement-management-second-currency-test.json new file mode 100644 index 00000000..739393b1 --- /dev/null +++ b/collections/hub/golden_path/settlement_management/Settlement-management-second-currency-test.json @@ -0,0 +1,5392 @@ +{ + "name": "multi", + "test_cases": [ + { + "id": 1, + "name": "Settlement_management", + "requests": [ + { + "id": 3, + "description": "Get payerfsp account id", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.SIMPAYER_NAME}/accounts", + "method": "get", + "params": { + "name": "{$inputs.SIMPAYER_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "Account id not null", + "exec": [ + "expect(environment.participant1accountid).to.not.be.null;" + ] + } + ] + }, + "scriptingEngine": "javascript", + "scripts": { + "postRequest": { + "exec": [ + "\r", + "var jsonData = response.body;\r", + "console.log(jsonData);\r", + " for(var i in jsonData) {\r", + " if((jsonData[i].ledgerAccountType === 'POSITION') && (jsonData[i].currency === environment.currency2) ) {\r", + " \r", + "environment.participant1accountid=jsonData[i].id;\r", + "\r", + " }\r", + " }\r", + "console.log(environment.participant1accountid);" + ] + } + } + }, + { + "id": 4, + "description": "Active account for payerfsp", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts/{id}", + "path": "/participants/{$inputs.SIMPAYER_NAME}/accounts/{$environment.participant1accountid}", + "method": "put", + "params": { + "name": "{$inputs.SIMPAYER_NAME}", + "id": "{$environment.participant1accountid}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Content-Type": "application/json", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + } + ] + }, + "body": { + "isActive": true + } + }, + { + "id": 5, + "description": "Get payeefsp account id", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/payeefsp/accounts", + "method": "get", + "params": { + "name": "payeefsp" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "Account id not null", + "exec": [ + "expect(environment.participant2accountid).to.not.be.null;" + ] + } + ] + }, + "scriptingEngine": "javascript", + "scripts": { + "postRequest": { + "exec": [ + "\r", + "var jsonData = response.body;\r", + "console.log(jsonData);\r", + " for(var i in jsonData) {\r", + " if((jsonData[i].ledgerAccountType === 'POSITION') && (jsonData[i].currency === environment.currency2) ) {\r", + " \r", + "environment.participant2accountid=jsonData[i].id;\r", + "\r", + " }\r", + " }\r", + "console.log(environment.participant2accountid);" + ] + } + } + }, + { + "id": 6, + "description": "Active account for payeefsp", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts/{id}", + "path": "/participants/payeefsp/accounts/{$environment.participant2accountid}", + "method": "put", + "params": { + "name": "payeefsp", + "id": "{$environment.participant2accountid}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}", + "Content-Type": "application/json" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + } + ] + }, + "body": { + "isActive": true + } + }, + { + "id": 7, + "description": "Get testfsp1 account id ", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/testfsp1/accounts", + "method": "get", + "params": { + "name": "testfsp1" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "Account id not null", + "exec": [ + "expect(environment.participant3accountid).to.not.be.null;" + ] + } + ] + }, + "scriptingEngine": "javascript", + "scripts": { + "postRequest": { + "exec": [ + "\r", + "var jsonData = response.body;\r", + "console.log(jsonData);\r", + " for(var i in jsonData) {\r", + " if((jsonData[i].ledgerAccountType === 'POSITION') && (jsonData[i].currency === environment.currency2) ) {\r", + " \r", + "environment.participant3accountid=jsonData[i].id;\r", + "\r", + " }\r", + " }\r", + "console.log(environment.participant3accountid);" + ] + } + } + }, + { + "id": 8, + "description": "Active account for testfsp1", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts/{id}", + "path": "/participants/testfsp1/accounts/{$environment.participant3accountid}", + "method": "put", + "params": { + "name": "testfsp1", + "id": "{$environment.participant3accountid}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Content-Type": "application/json", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + } + ] + }, + "body": { + "isActive": true + } + }, + { + "id": 9, + "description": "Get testfsp2 account id ", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/testfsp2/accounts", + "method": "get", + "params": { + "name": "testfsp2" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "Account id not null", + "exec": [ + "expect(environment.participant3accountid).to.not.be.null;" + ] + } + ] + }, + "scriptingEngine": "javascript", + "scripts": { + "postRequest": { + "exec": [ + "\r", + "var jsonData = response.body;\r", + "console.log(jsonData);\r", + " for(var i in jsonData) {\r", + " if((jsonData[i].ledgerAccountType === 'POSITION') && (jsonData[i].currency === environment.currency2)) {\r", + " \r", + "environment.participant4accountid=jsonData[i].id;\r", + "\r", + " }\r", + " }\r", + "console.log(environment.participant4accountid);" + ] + } + } + }, + { + "id": 10, + "description": "Active account for testfsp1 Copy", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts/{id}", + "path": "/participants/testfsp2/accounts/{$environment.participant4accountid}", + "method": "put", + "params": { + "name": "testfsp2", + "id": "{$environment.participant4accountid}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Content-Type": "application/json", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + } + ] + }, + "body": { + "isActive": true + } + } + ] + }, + { + "id": 2, + "name": "Create Settlement on the current open window", + "requests": [ + { + "id": 1, + "description": "Get Existing Open Window", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "settlements" + }, + "operationPath": "/settlementWindows", + "path": "/settlementWindows", + "method": "get", + "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", + "queryParams": { + "state": "OPEN" + }, + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "State should be OPEN", + "exec": [ + "expect(environment.openWindowstate).to.equal(\"OPEN\")" + ] + } + ] + }, + "scriptingEngine": "javascript", + "scripts": { + "postRequest": { + "exec": [ + "var jsonData = response.body;", + "//console.log(jsonData.state);", + "", + "environment.openWindowID=jsonData[0].settlementWindowId;", + "environment.openWindowstate=jsonData[0].state;", + "", + "console.log(environment.openWindowID);" + ] + } + } + }, + { + "id": 2, + "description": "Close existent window", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "settlements" + }, + "operationPath": "/settlementWindows/{id}", + "path": "/settlementWindows/{$environment.openWindowID}", + "method": "post", + "params": { + "id": "{$environment.openWindowID}" + }, + "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", + "body": { + "state": "CLOSED", + "reason": "string" + }, + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 200 or 400", + "exec": [ + "if(response.status === 400){", + " expect(response.status).to.equal(400)", + "}", + "else{", + " expect(response.status).to.equal(200)", + "}", + "", + "" + ] + }, + { + "id": 2, + "description": "New window State should be OPEN", + "exec": [ + "", + " if (response.status === 400) {", + " ", + "expect(response.body.errorInformation.errorCode).to.eql('3100');", + "expect(response.body.errorInformation.errorDescription).to.eql('Generic validation error - Window ' + environment.openWindowID + ' is empty');", + "}else{", + " ", + " ", + " expect(environment.openWindowstate).to.equal(\"OPEN\");", + "}", + "", + "", + "" + ] + } + ] + }, + "scriptingEngine": "javascript", + "scripts": { + "postRequest": { + "exec": [ + "var jsonData = response.body;", + "var rcode = Number(response.status);", + "//console.log(rcode);", + "", + "//if (rcode == 200){", + "environment.closedWindowID= Number(environment.openWindowID);", + "environment.openWindowstate=jsonData.state;", + "", + "console.log(environment.openWindowstate);", + "console.log(environment.closedWindowID);", + "//}" + ] + } + } + }, + { + "id": 3, + "description": "Create Settlement for Closed Window", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "settlements" + }, + "operationPath": "/settlements", + "path": "/settlements", + "method": "post", + "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 200", + "exec": [ + "if(environment.WINDOWISEMPTY === false){", + "expect(response.status).to.equal(200)", + "}" + ] + }, + { + "id": 2, + "description": "Settlement State should be PENDING_SETTLEMENT", + "exec": [ + "if(environment.WINDOWISEMPTY === false){", + "expect(environment.winstate).to.equal(\"PENDING_SETTLEMENT\")", + "}" + ] + }, + { + "id": 3, + "description": "Number of associated windows should be 1", + "exec": [ + "if(environment.WINDOWISEMPTY === false){", + "expect(response.body.settlementWindows.length).to.equal(1)", + "}" + ] + }, + { + "id": 4, + "description": "Associated Settlement Window ID is the correct one", + "exec": [ + "if(environment.WINDOWISEMPTY === false){", + "expect(response.body.settlementWindows[0].id).to.equal(environment.closedWindowID)", + "}" + ] + }, + { + "id": 5, + "description": "Associated Settlement Window state should be PENDING_SETTLEMENT", + "exec": [ + "if(environment.WINDOWISEMPTY === false){", + "expect(response.body.settlementWindows[0].state).to.equal(\"PENDING_SETTLEMENT\")", + "}" + ] + } + ] + }, + "scriptingEngine": "javascript", + "body": { + "settlementModel": "DEFAULTDEFERREDNET", + "reason": "TESTING", + "settlementWindows": [ + { + "id": "{$requestVariables.closedWindowID}" + } + ] + }, + "scripts": { + "postRequest": { + "exec": [ + "var jsonData = response.body;", + "environment.settlementId = jsonData.id;", + "environment.winstate = jsonData.state;", + "", + "if (response.body.errorInformation.errorCode === \"3100\"){", + " ", + " environment.WINDOWISEMPTY = true;", + " console.log(\"Window is empty\");", + "}else{", + " environment.WINDOWISEMPTY = false;", + "}" + ] + }, + "preRequest": { + "exec": [ + "//environment.closedWindowID = 6;", + "requestVariables.closedWindowID = Number(environment.closedWindowID);", + "", + "/*requestVariables.closedWindowID = Number(environment.closedWindowID);", + "*/", + "", + "" + ] + } + } + }, + { + "id": 4, + "description": "Prepare Settlement", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "settlements" + }, + "operationPath": "/settlements/{id}", + "path": "/settlements/{$environment.settlementId}", + "method": "get", + "params": { + "id": "{$environment.settlementId}" + }, + "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code status is 200", + "exec": [ + "if(environment.WINDOWISEMPTY === false){", + "expect(response.status).to.equal(200)", + "}" + ] + } + ] + }, + "scriptingEngine": "javascript", + "delay": "2500", + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "console.log(environment.settlementId);", + "//environment.settlementId = 6;", + "var i=0;", + "var dfspsacc = [];", + "var callbackpayer;", + "", + "environment.winstate = res.state;", + "if(environment.winstate===\"PENDING_SETTLEMENT\"){", + "", + "res.participants.map(function (participant) {", + " participant.accounts.filter(account => account.netSettlementAmount.currency === environment.currency2).forEach(curAccount => {", + "//for(const curAccount of account) { ", + "", + " dfspsacc[i] = {", + " dfspid: participant.id,", + " dfspaccid: curAccount.id ", + " }", + " i++;", + "//}", + "})", + " })", + " ", + "", + "const config = { headers: {'Content-Type': 'application/json','FSPIOP-Source': 'testingtoolkitdfsp'} };", + "for(let dfspsaccx of dfspsacc){", + " console.log(dfspsaccx.dfspid,dfspsaccx.dfspaccid)", + "callbackpayer = await axios.put(environment.HOST_CENTRAL_SETTLEMENT + '/settlements/'+environment.settlementId, {", + " \"participants\": [", + " {", + " \"id\": dfspsaccx.dfspid,", + " \"accounts\": [", + " {", + " \"id\": dfspsaccx.dfspaccid,", + " \"reason\": \"Transfers recorded for payer\",", + " \"state\": \"PS_TRANSFERS_RECORDED\"", + " }", + " ]", + " }", + " ]", + " },config) ", + "console.log(callbackpayer.data); ", + "}", + "}else{", + " console.log(\"Window is empty\")", + "}", + "/*res.participants.map(participant => {", + " participant.accounts.filter(account => account.netSettlementAmount.currency === pm.environment.get('currency2'))", + " .forEach(curAccount => {*/", + " " + ] + }, + "preRequest": { + "exec": [ + "" + ] + } + } + }, + { + "id": 5, + "description": "Reserve Settlement", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "settlements" + }, + "operationPath": "/settlements/{id}", + "path": "/settlements/{$environment.settlementId}", + "method": "get", + "params": { + "id": "{$environment.settlementId}" + }, + "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code status is 200", + "exec": [ + "if(environment.WINDOWISEMPTY === false){", + "expect(response.status).to.equal(200)", + "}" + ] + } + ] + }, + "scriptingEngine": "javascript", + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "//environment.settlementId = 1;", + "var i=0;", + "var dfspsacc = [];", + "var callbackpayer;", + "", + "environment.winstate = res.state;", + "", + "if(environment.winstate===\"PS_TRANSFERS_RECORDED\"){", + "", + "", + "res.participants.map(function (participant) {", + " participant.accounts.filter(account => account.netSettlementAmount.currency === environment.currency2).forEach(curAccount => {", + "//for(const curAccount of account) { ", + "", + " dfspsacc[i] = {", + " dfspid: participant.id,", + " dfspaccid: curAccount.id ", + " }", + " i++;", + "//}", + "})", + " })", + " ", + "", + "const config = { headers: {'Content-Type': 'application/json','FSPIOP-Source': 'testingtoolkitdfsp'} };", + "for(let dfspsaccx of dfspsacc){", + " //console.log(dfspsaccx.dfspid,dfspsaccx.dfspaccid)", + "callbackpayer = await axios.put(environment.HOST_CENTRAL_SETTLEMENT + '/settlements/'+environment.settlementId, {", + " \"participants\": [", + " {", + " \"id\": dfspsaccx.dfspid,", + " \"accounts\": [", + " {", + " \"id\": dfspsaccx.dfspaccid,", + " \"reason\": \"Transfers reserved\",", + " \"state\": \"PS_TRANSFERS_RESERVED\"", + " }", + " ]", + " }", + " ]", + " },config) ", + "console.log(callbackpayer.data); ", + "}", + "}else{", + " console.log(\"Window is empty\")", + "}", + "/*res.participants.map(participant => {", + " participant.accounts.filter(account => account.netSettlementAmount.currency === pm.environment.get('currency2'))", + " .forEach(curAccount => {*/", + " " + ] + } + } + }, + { + "id": 6, + "description": "Commit Settlement", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "settlements" + }, + "operationPath": "/settlements/{id}", + "path": "/settlements/{$environment.settlementId}", + "method": "get", + "params": { + "id": "{$environment.settlementId}" + }, + "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code status is 200", + "exec": [ + "if(environment.WINDOWISEMPTY === false){", + "expect(response.status).to.equal(200)", + "}" + ] + } + ] + }, + "scriptingEngine": "javascript", + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "//environment.settlementId = 1;", + "var i=0;", + "var dfspsacc = [];", + "var callbackpayer;", + "", + "environment.winstate = res.state;", + "", + "if(environment.winstate===\"PS_TRANSFERS_RESERVED\"){", + "", + "", + "res.participants.map(function (participant) {", + " participant.accounts.filter(account => account.netSettlementAmount.currency === environment.currency2).forEach(curAccount => {", + "//for(const curAccount of account) { ", + "", + " dfspsacc[i] = {", + " dfspid: participant.id,", + " dfspaccid: curAccount.id ", + " }", + " i++;", + "//}", + "})", + " })", + " ", + "", + "const config = { headers: {'Content-Type': 'application/json','FSPIOP-Source': 'testingtoolkitdfsp'} };", + "for(let dfspsaccx of dfspsacc){", + " //console.log(dfspsaccx.dfspid,dfspsaccx.dfspaccid)", + "callbackpayer = await axios.put(environment.HOST_CENTRAL_SETTLEMENT + '/settlements/'+environment.settlementId, {", + " \"participants\": [", + " {", + " \"id\": dfspsaccx.dfspid,", + " \"accounts\": [", + " {", + " \"id\": dfspsaccx.dfspaccid,", + " \"reason\": \"Transfers committed\",", + " \"state\": \"PS_TRANSFERS_COMMITTED\"", + " }", + " ]", + " }", + " ]", + " },config) ", + "console.log(callbackpayer.data); ", + "}", + "}else{", + " console.log(\"Window is empty\")", + "}", + "/*res.participants.map(participant => {", + " participant.accounts.filter(account => account.netSettlementAmount.currency === pm.environment.get('currency2'))", + " .forEach(curAccount => {*/", + " " + ] + } + } + }, + { + "id": 7, + "description": "Settle Settlement", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "settlements" + }, + "operationPath": "/settlements/{id}", + "path": "/settlements/{$environment.settlementId}", + "method": "get", + "params": { + "id": "{$environment.settlementId}" + }, + "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code status is 200", + "exec": [ + "if(environment.WINDOWISEMPTY === false){", + "expect(response.status).to.equal(200)", + "}" + ] + } + ] + }, + "scriptingEngine": "javascript", + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "//environment.settlementId = 1;", + "var i=0;", + "var dfspsacc = [];", + "var callbackpayer;", + "", + "environment.winstate = res.state;", + "", + "if(environment.winstate===\"PS_TRANSFERS_COMMITTED\"){", + "", + "", + "res.participants.map(function (participant) {", + " participant.accounts.filter(account => account.netSettlementAmount.currency === environment.currency2).forEach(curAccount => {", + "//for(const curAccount of account) { ", + "", + " dfspsacc[i] = {", + " dfspid: participant.id,", + " dfspaccid: curAccount.id ", + " }", + " i++;", + "//}", + "})", + " })", + " ", + "", + "const config = { headers: {'Content-Type': 'application/json','FSPIOP-Source': 'testingtoolkitdfsp'} };", + "for(let dfspsaccx of dfspsacc){", + " //console.log(dfspsaccx.dfspid,dfspsaccx.dfspaccid)", + "callbackpayer = await axios.put(environment.HOST_CENTRAL_SETTLEMENT + '/settlements/'+environment.settlementId, {", + " \"participants\": [", + " {", + " \"id\": dfspsaccx.dfspid,", + " \"accounts\": [", + " {", + " \"id\": dfspsaccx.dfspaccid,", + " \"reason\": \"Transfers settled for payer\",", + " \"state\": \"SETTLED\"", + " }", + " ]", + " }", + " ]", + " },config) ", + "console.log(callbackpayer.data); ", + "}", + "}else{", + " console.log(\"Window is empty\")", + "}", + "", + " " + ] + } + } + } + ] + }, + { + "id": 3, + "name": "Store settlement and position balances before", + "requests": [ + { + "id": 1, + "description": "get balances for testfsp1", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.SIM1_NAME}/accounts", + "method": "get", + "params": { + "name": "{$inputs.SIM1_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + } + ] + }, + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "scriptingEngine": "javascript", + "scripts": { + "preRequest": { + "exec": [ + "" + ] + }, + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "", + " res.filter(account => account.currency === environment.currency2).forEach(curAccount => {", + " ", + " if(curAccount.ledgerAccountType === \"SETTLEMENT\") {", + " environment.testfsp1SettleAccountBalanceBeforeTransfer= curAccount.value", + " }", + " ", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.testfsp1PositionAccountBalanceBeforeTransfer= curAccount.value", + " } ", + "", + "", + "})", + "//})", + "", + " ", + "console.log(environment.testfsp1SettleAccountBalanceBeforeTransfer);", + "console.log(environment.testfsp1PositionAccountBalanceBeforeTransfer);" + ] + } + } + }, + { + "id": 2, + "description": "get balances for testfsp2", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.SIM2_NAME}/accounts", + "method": "get", + "params": { + "name": "{$inputs.SIM2_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + } + ] + }, + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "scriptingEngine": "javascript", + "scripts": { + "preRequest": { + "exec": [ + "" + ] + }, + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "", + " res.filter(account => account.currency === environment.currency2).forEach(curAccount => {", + " ", + " if(curAccount.ledgerAccountType === \"SETTLEMENT\") {", + " environment.testfsp2SettleAccountBalanceBeforeTransfer= curAccount.value", + " }", + " ", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.testfsp2PositionAccountBalanceBeforeTransfer= curAccount.value", + " } ", + "", + "", + "})", + "//})", + "", + " ", + "console.log(environment.testfsp2SettleAccountBalanceBeforeTransfer);", + "console.log(environment.testfsp2PositionAccountBalanceBeforeTransfer);" + ] + } + } + }, + { + "id": 3, + "description": "get balances for payerfsp", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.SIMPAYER_NAME}/accounts", + "method": "get", + "params": { + "name": "{$inputs.SIMPAYER_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + } + ] + }, + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "scriptingEngine": "javascript", + "scripts": { + "preRequest": { + "exec": [ + "" + ] + }, + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "", + " res.filter(account => account.currency === environment.currency2).forEach(curAccount => {", + " ", + " if(curAccount.ledgerAccountType === \"SETTLEMENT\") {", + " environment.payerfspSettleAccountBalanceBeforeTransfer= curAccount.value", + " }", + " ", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.payerfspPositionAccountBalanceBeforeTransfer= curAccount.value", + " } ", + "", + "", + "})", + "//})", + "", + " ", + "console.log(environment.payerfspSettleAccountBalanceBeforeTransfer);", + "console.log(environment.payerfspPositionAccountBalanceBeforeTransfer);" + ] + } + } + }, + { + "id": 4, + "description": "get balances for payeefsp", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.payeefsp}/accounts", + "method": "get", + "params": { + "name": "{$inputs.payeefsp}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + } + ] + }, + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "scriptingEngine": "javascript", + "scripts": { + "preRequest": { + "exec": [ + "" + ] + }, + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "", + " res.filter(account => account.currency === environment.currency2).forEach(curAccount => {", + " ", + " if(curAccount.ledgerAccountType === \"SETTLEMENT\") {", + " environment.payeefspSettleAccountBalanceBeforeTransfer= curAccount.value", + " }", + " ", + " if(curAccount.ledgerAccountType === \"POSITION\") {", + " environment.payeefspPositionAccountBalanceBeforeTransfer= curAccount.value", + " } ", + "", + "", + "})", + "//})", + "", + " ", + "console.log(environment.payeefspSettleAccountBalanceBeforeTransfer);", + "console.log(environment.payeefspPositionAccountBalanceBeforeTransfer);" + ] + } + } + }, + { + "id": 5, + "description": "Get Hub balances", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/Hub/accounts", + "method": "get", + "params": { + "name": "Hub" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + } + ] + }, + "scriptingEngine": "javascript", + "scripts": { + "postRequest": { + "exec": [ + "var jsonData = response.body;\r", + "jsonData\r", + " .filter(account => account.currency === environment.currency2)\r", + " .forEach(curAccount => {\r", + " if(curAccount.ledgerAccountType === \"HUB_RECONCILIATION\") {\r", + " environment.hubReconciliationAccountBalanceBeforeTransfer=curAccount.value;\r", + " }\r", + " if(curAccount.ledgerAccountType === \"HUB_MULTILATERAL_SETTLEMENT\") {\r", + " environment.hubMultilateralAccountBalanceBeforeTransfer=curAccount.value;\r", + " }\r", + " })\r", + "\r", + "\r", + "console.log(environment.hubReconciliationAccountBalanceBeforeTransfer);\r", + "console.log(environment.hubMultilateralAccountBalanceBeforeTransfer);" + ] + } + } + } + ] + }, + { + "id": 4, + "name": "SIM1 to SIM2", + "requests": [ + { + "id": 3, + "description": "Send quote", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "operationPath": "/quotes", + "method": "post", + "headers": { + "Accept": "application/vnd.interoperability.quotes+json;version=1.0", + "Content-Type": "application/vnd.interoperability.quotes+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.SIM1_NAME}", + "Authorization": "{$inputs.TESTFSP1_BEARER_TOKEN}", + "FSPIOP-Destination": "{$inputs.SIM2_NAME}" + }, + "body": { + "quoteId": "{$function.generic.generateUUID}", + "transactionId": "{$function.generic.generateUUID}", + "payer": { + "partyIdInfo": { + "partyIdType": "{$inputs.fromIdType}", + "partyIdentifier": "{$inputs.testfsp1Identifier}", + "fspId": "{$inputs.SIM1_NAME}" + }, + "personalInfo": { + "complexName": { + "firstName": "{$inputs.fromFirstName}", + "lastName": "{$inputs.fromLastName}" + }, + "dateOfBirth": "{$inputs.fromDOB}" + } + }, + "payee": { + "partyIdInfo": { + "partyIdType": "{$inputs.fromIdType}", + "partyIdentifier": "{$inputs.testfsp2Identifier}", + "fspId": "{$inputs.SIM2_NAME}" + } + }, + "amountType": "RECEIVE", + "amount": { + "amount": "60", + "currency": "{$inputs.currency2}" + }, + "transactionType": { + "scenario": "TRANSFER", + "initiator": "PAYER", + "initiatorType": "CONSUMER" + }, + "note": "{$inputs.note}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(environment.testfsp1callbacks.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(environment.testfsp1callbacks.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback body should contain transferAmount", + "exec": [ + "expect(environment.testfsp1callbacks.data).to.have.property('transferAmount')" + ] + }, + { + "id": 6, + "description": "Callback transferAmount (amount & currency)to match the request", + "exec": [ + "expect(environment.testfsp1callbacks.data.transferAmount.amount).to.equal('{$request.body.amount.amount}')", + "expect(environment.testfsp1callbacks.data.transferAmount.currency).to.equal('{$request.body.amount.currency}')" + ] + }, + { + "id": 7, + "description": "Callback content-type to be quotes", + "exec": [ + "expect(environment.testfsp1callbacks.headers['content-type']).to.equal('application/vnd.interoperability.quotes+json;version={$inputs.expectedQuotesVersion}')" + ] + }, + { + "id": 8, + "description": "Request amountType to be RECEIVE", + "exec": [ + "expect('{$request.body.amountType}').to.equal('RECEIVE')" + ] + }, + { + "id": 9, + "description": "Request transactionType scenario to be TRANSFER", + "exec": [ + "expect('{$request.body.transactionType.scenario}').to.equal('TRANSFER')" + ] + }, + { + "id": 10, + "description": "Request transactionType initiator to be PAYER", + "exec": [ + "expect('{$request.body.transactionType.initiator}').to.equal('PAYER')" + ] + }, + { + "id": 11, + "description": "Request transactionType initiatorType to be CONSUMER", + "exec": [ + "expect('{$request.body.transactionType.initiatorType}').to.equal('CONSUMER')" + ] + } + ] + }, + "params": { + "Type": "MSISDN", + "ID": "{$inputs.toIdValue}" + }, + "path": "/quotes", + "url": "{$inputs.HOST_QUOTING_SERVICE}", + "scriptingEngine": "javascript", + "ignoreCallbacks": true, + "scripts": { + "preRequest": { + "exec": [ + "if (environment.ENABLE_WS_ASSERTIONS===true) {", + " await websocket.connect(environment.TESTFSP1_SDK_TESTAPI_WS_URL + '/callbacks/{$request.body.quoteId}', 'testfsp1callbacksq')", + "}" + ] + }, + "postRequest": { + "exec": [ + "if (environment.ENABLE_WS_ASSERTIONS===true) {", + " environment.testfsp1callbacks = await websocket.getMessage('testfsp1callbacksq', environment.WS_ASSERTION_TIMEOUT)", + "}", + "", + "/*console.log(environment.testfsp1callbacks);", + "", + "environment.transactionid = '{$request.body.transactionId}'", + "console.log(environment.transactionid);*/" + ] + } + } + }, + { + "id": 2, + "description": "Send transfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "operationPath": "/transfers", + "method": "post", + "headers": { + "Accept": "application/vnd.interoperability.transfers+json;version=1.0", + "Content-Type": "application/vnd.interoperability.transfers+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.SIM1_NAME}", + "Authorization": "{$inputs.TESTFSP1_BEARER_TOKEN}" + }, + "body": { + "transferId": "{$prev.3.request.body.transactionId}", + "payerFsp": "{$inputs.SIM1_NAME}", + "payeeFsp": "{$inputs.SIM2_NAME}", + "amount": { + "amount": "60", + "currency": "{$inputs.currency2}" + }, + "expiration": "{$environment.testfsp1callbacks.data.expiration}", + "ilpPacket": "{$environment.testfsp1callbacks.data.ilpPacket}", + "condition": "{$environment.testfsp1callbacks.data.condition}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(environment.testfsp1callbackst.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(environment.testfsp1callbackst.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback transferState to be COMMITTED", + "exec": [ + "expect(environment.testfsp1callbackst.data.transferState).to.equal('COMMITTED')" + ] + }, + { + "id": 6, + "description": "Callback content-type to be transfers", + "exec": [ + "expect(environment.testfsp1callbackst.headers['content-type']).to.equal('application/vnd.interoperability.transfers+json;version={$inputs.expectedTransfersVersion}')" + ] + }, + { + "id": 7, + "description": "Request transferId same as quote request transferId", + "exec": [ + "expect('{$request.body.transferId}').to.equal('{$prev.3.request.body.transactionId}')" + ] + }, + { + "id": 8, + "description": "Request transferAmount (amount & currency) to match quote request", + "exec": [ + "expect('{$prev.3.request.body.amount.amount}').to.equal('{$request.body.amount.amount}')", + "expect('{$prev.3.request.body.amount.currency}').to.equal('{$request.body.amount.currency}')" + ] + }, + { + "id": 9, + "description": "Request FSP source the same as quote callback FSP destination", + "exec": [ + "expect('{$request.headers['FSPIOP-Source']}').to.equal(environment.testfsp1callbackst.headers['fspiop-destination'])", + "", + "" + ] + } + ] + }, + "url": "{$inputs.HOST_ML_API_ADAPTER}", + "scriptingEngine": "javascript", + "ignoreCallbacks": true, + "scripts": { + "preRequest": { + "exec": [ + "if (environment.ENABLE_WS_ASSERTIONS===true) {", + " await websocket.connect(environment.TESTFSP1_SDK_TESTAPI_WS_URL + '/callbacks/{$request.body.transferId}', 'testfsp1callbackst')", + "}", + "", + "" + ] + }, + "postRequest": { + "exec": [ + "if (environment.ENABLE_WS_ASSERTIONS===true) {", + " environment.testfsp1callbackst = await websocket.getMessage('testfsp1callbackst', environment.WS_ASSERTION_TIMEOUT)", + "}", + "", + "console.log(environment.testfsp1callbackst);" + ] + } + } + } + ] + }, + { + "id": 5, + "name": "SIM1 to PAYEEFSP", + "requests": [ + { + "id": 3, + "description": "Send quote", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "operationPath": "/quotes", + "method": "post", + "headers": { + "Accept": "application/vnd.interoperability.quotes+json;version=1.0", + "Content-Type": "application/vnd.interoperability.quotes+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.SIM1_NAME}", + "FSPIOP-Destination": "{$inputs.SIMPAYEE_NAME}", + "Authorization": "{$inputs.TESTFSP1_BEARER_TOKEN}" + }, + "body": { + "quoteId": "{$function.generic.generateUUID}", + "transactionId": "{$function.generic.generateUUID}", + "payer": { + "partyIdInfo": { + "partyIdType": "{$inputs.fromIdType}", + "partyIdentifier": "{$inputs.testfsp1Identifier}", + "fspId": "{$inputs.SIM1_NAME}" + }, + "personalInfo": { + "complexName": { + "firstName": "{$inputs.fromFirstName}", + "lastName": "{$inputs.fromLastName}" + }, + "dateOfBirth": "{$inputs.fromDOB}" + } + }, + "payee": { + "partyIdInfo": { + "partyIdType": "{$inputs.fromIdType}", + "partyIdentifier": "{$inputs.payeefspIdentifier}", + "fspId": "{$inputs.SIMPAYEE_NAME}" + } + }, + "amountType": "RECEIVE", + "amount": { + "amount": "55", + "currency": "{$inputs.currency2}" + }, + "transactionType": { + "scenario": "TRANSFER", + "initiator": "PAYER", + "initiatorType": "CONSUMER" + }, + "note": "{$inputs.note}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(environment.testfsp1callbacks.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(environment.testfsp1callbacks.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback body should contain transferAmount", + "exec": [ + "expect(environment.testfsp1callbacks.data).to.have.property('transferAmount')" + ] + }, + { + "id": 6, + "description": "Callback transferAmount (amount & currency)to match the request", + "exec": [ + "expect(environment.testfsp1callbacks.data.transferAmount.amount).to.equal('{$request.body.amount.amount}')", + "expect(environment.testfsp1callbacks.data.transferAmount.currency).to.equal('{$request.body.amount.currency}')" + ] + }, + { + "id": 7, + "description": "Callback content-type to be quotes", + "exec": [ + "expect(environment.testfsp1callbacks.headers['content-type']).to.equal('application/vnd.interoperability.quotes+json;version={$inputs.expectedQuotesVersion}')" + ] + }, + { + "id": 8, + "description": "Request amountType to be RECEIVE", + "exec": [ + "expect('{$request.body.amountType}').to.equal('RECEIVE')" + ] + }, + { + "id": 9, + "description": "Request transactionType scenario to be TRANSFER", + "exec": [ + "expect('{$request.body.transactionType.scenario}').to.equal('TRANSFER')" + ] + }, + { + "id": 10, + "description": "Request transactionType initiator to be PAYER", + "exec": [ + "expect('{$request.body.transactionType.initiator}').to.equal('PAYER')" + ] + }, + { + "id": 11, + "description": "Request transactionType initiatorType to be CONSUMER", + "exec": [ + "expect('{$request.body.transactionType.initiatorType}').to.equal('CONSUMER')" + ] + } + ] + }, + "params": { + "Type": "MSISDN", + "ID": "{$inputs.toIdValue}" + }, + "path": "/quotes", + "url": "{$inputs.HOST_QUOTING_SERVICE}", + "scriptingEngine": "javascript", + "ignoreCallbacks": true, + "scripts": { + "preRequest": { + "exec": [ + "if (environment.ENABLE_WS_ASSERTIONS===true) {", + " await websocket.connect(environment.TESTFSP1_SDK_TESTAPI_WS_URL + '/callbacks/{$request.body.quoteId}', 'testfsp1callbacksq')", + "}" + ] + }, + "postRequest": { + "exec": [ + "if (environment.ENABLE_WS_ASSERTIONS===true) {", + " environment.testfsp1callbacks = await websocket.getMessage('testfsp1callbacksq', environment.WS_ASSERTION_TIMEOUT)", + "}", + "", + "console.log(environment.testfsp1callbacks);", + "/*", + "environment.transactionid = '{$request.body.transactionId}'", + "console.log(environment.transactionid);*/" + ] + } + } + }, + { + "id": 2, + "description": "Send transfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "operationPath": "/transfers", + "method": "post", + "headers": { + "Accept": "application/vnd.interoperability.transfers+json;version=1.0", + "Content-Type": "application/vnd.interoperability.transfers+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.SIM1_NAME}", + "Authorization": "{$inputs.TESTFSP1_BEARER_TOKEN}" + }, + "body": { + "transferId": "{$prev.3.request.body.transactionId}", + "payerFsp": "{$inputs.SIM1_NAME}", + "payeeFsp": "{$inputs.SIMPAYEE_NAME}", + "amount": { + "amount": "55", + "currency": "{$inputs.currency2}" + }, + "expiration": "{$environment.testfsp1callbacks.data.expiration}", + "ilpPacket": "{$environment.testfsp1callbacks.data.ilpPacket}", + "condition": "{$environment.testfsp1callbacks.data.condition}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(environment.testfsp1callbackst.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(environment.testfsp1callbackst.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback transferState to be COMMITTED", + "exec": [ + "expect(environment.testfsp1callbackst.data.transferState).to.equal('COMMITTED')" + ] + }, + { + "id": 6, + "description": "Callback content-type to be transfers", + "exec": [ + "expect(environment.testfsp1callbackst.headers['content-type']).to.equal('application/vnd.interoperability.transfers+json;version={$inputs.expectedTransfersVersion}')" + ] + }, + { + "id": 7, + "description": "Request transferId same as quote request transferId", + "exec": [ + "expect('{$request.body.transferId}').to.equal('{$prev.3.request.body.transactionId}')" + ] + }, + { + "id": 8, + "description": "Request transferAmount (amount & currency) to match quote request", + "exec": [ + "expect('{$prev.3.request.body.amount.amount}').to.equal('{$request.body.amount.amount}')", + "expect('{$prev.3.request.body.amount.currency}').to.equal('{$request.body.amount.currency}')" + ] + }, + { + "id": 9, + "description": "Request FSP source the same as quote callback FSP destination", + "exec": [ + "expect('{$request.headers['FSPIOP-Source']}').to.equal(environment.testfsp1callbackst.headers['fspiop-destination'])" + ] + } + ] + }, + "url": "{$inputs.HOST_ML_API_ADAPTER}", + "scriptingEngine": "javascript", + "ignoreCallbacks": true, + "scripts": { + "preRequest": { + "exec": [ + "if (environment.ENABLE_WS_ASSERTIONS===true) {", + " await websocket.connect(environment.TESTFSP1_SDK_TESTAPI_WS_URL + '/callbacks/{$request.body.transferId}', 'testfsp1callbackst')", + "}" + ] + }, + "postRequest": { + "exec": [ + "if (environment.ENABLE_WS_ASSERTIONS===true) {", + " environment.testfsp1callbackst = await websocket.getMessage('testfsp1callbackst', environment.WS_ASSERTION_TIMEOUT)", + "}", + "", + "console.log(environment.testfsp1callbackst);" + ] + } + } + } + ] + }, + { + "id": 6, + "name": "PAYERFSP to SIM1", + "requests": [ + { + "id": 3, + "description": "Send quote", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "operationPath": "/quotes", + "method": "post", + "headers": { + "Accept": "application/vnd.interoperability.quotes+json;version=1.0", + "Content-Type": "application/vnd.interoperability.quotes+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.SIMPAYER_NAME}", + "FSPIOP-Destination": "{$inputs.SIM1_NAME}", + "Authorization": "{$inputs.PAYER_BEARER_TOKEN}" + }, + "body": { + "quoteId": "{$function.generic.generateUUID}", + "transactionId": "{$function.generic.generateUUID}", + "payer": { + "partyIdInfo": { + "partyIdType": "{$inputs.fromIdType}", + "partyIdentifier": "{$inputs.payerIdentifier}", + "fspId": "{$inputs.SIMPAYER_NAME}" + }, + "personalInfo": { + "complexName": { + "firstName": "{$inputs.fromFirstName}", + "lastName": "{$inputs.fromLastName}" + }, + "dateOfBirth": "{$inputs.fromDOB}" + } + }, + "payee": { + "partyIdInfo": { + "partyIdType": "{$inputs.fromIdType}", + "partyIdentifier": "{$inputs.testfsp1MSISDN}", + "fspId": "{$inputs.SIM1_NAME}" + } + }, + "amountType": "RECEIVE", + "amount": { + "amount": "35", + "currency": "{$inputs.currency2}" + }, + "transactionType": { + "scenario": "TRANSFER", + "initiator": "PAYER", + "initiatorType": "CONSUMER" + }, + "note": "{$inputs.note}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(environment.payerfspcallbacksq.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(environment.payerfspcallbacksq.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback body should contain transferAmount", + "exec": [ + "expect(environment.payerfspcallbacksq.data).to.have.property('transferAmount')" + ] + }, + { + "id": 6, + "description": "Callback transferAmount (amount & currency)to match the request", + "exec": [ + "expect(environment.payerfspcallbacksq.data.transferAmount.amount).to.equal('{$request.body.amount.amount}')", + "expect(environment.payerfspcallbacksq.data.transferAmount.currency).to.equal('{$request.body.amount.currency}')" + ] + }, + { + "id": 7, + "description": "Callback content-type to be quotes", + "exec": [ + "expect(environment.payerfspcallbacksq.headers['content-type']).to.equal('application/vnd.interoperability.quotes+json;version={$inputs.expectedQuotesVersion}')" + ] + }, + { + "id": 8, + "description": "Request amountType to be RECEIVE", + "exec": [ + "expect('{$request.body.amountType}').to.equal('RECEIVE')" + ] + }, + { + "id": 9, + "description": "Request transactionType scenario to be TRANSFER", + "exec": [ + "expect('{$request.body.transactionType.scenario}').to.equal('TRANSFER')" + ] + }, + { + "id": 10, + "description": "Request transactionType initiator to be PAYER", + "exec": [ + "expect('{$request.body.transactionType.initiator}').to.equal('PAYER')" + ] + }, + { + "id": 11, + "description": "Request transactionType initiatorType to be CONSUMER", + "exec": [ + "expect('{$request.body.transactionType.initiatorType}').to.equal('CONSUMER')" + ] + } + ] + }, + "params": { + "Type": "MSISDN", + "ID": "{$inputs.toIdValue}" + }, + "path": "/quotes", + "url": "{$inputs.HOST_QUOTING_SERVICE}", + "scriptingEngine": "javascript", + "ignoreCallbacks": true, + "scripts": { + "preRequest": { + "exec": [ + "if (environment.ENABLE_WS_ASSERTIONS===true) {", + " await websocket.connect(environment.PAYERFSP_SDK_TESTAPI_WS_URL + '/callbacks/{$request.body.quoteId}', 'payerfspcallbacksq')", + "}" + ] + }, + "postRequest": { + "exec": [ + "if (environment.ENABLE_WS_ASSERTIONS===true) {", + " environment.payerfspcallbacksq = await websocket.getMessage('payerfspcallbacksq', environment.WS_ASSERTION_TIMEOUT)", + "}", + "", + "console.log(environment.payerfspcallbacksq);", + "", + "/*environment.transactionid = '{$request.body.transactionId}'", + "console.log(environment.transactionid);*/" + ] + } + } + }, + { + "id": 2, + "description": "Send transfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "operationPath": "/transfers", + "method": "post", + "headers": { + "Accept": "application/vnd.interoperability.transfers+json;version=1.0", + "Content-Type": "application/vnd.interoperability.transfers+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.SIMPAYER_NAME}", + "Authorization": "{$inputs.PAYER_BEARER_TOKEN}" + }, + "body": { + "transferId": "{$prev.3.request.body.transactionId}", + "payerFsp": "{$inputs.SIMPAYER_NAME}", + "payeeFsp": "{$inputs.SIM1_NAME}", + "amount": { + "amount": "35", + "currency": "{$inputs.currency2}" + }, + "expiration": "{$environment.payerfspcallbacksq.data.expiration}", + "ilpPacket": "{$environment.payerfspcallbacksq.data.ilpPacket}", + "condition": "{$environment.payerfspcallbacksq.data.condition}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(environment.payerfspcallbackst.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(environment.payerfspcallbackst.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback transferState to be COMMITTED", + "exec": [ + "expect(environment.payerfspcallbackst.data.transferState).to.equal('COMMITTED')" + ] + }, + { + "id": 6, + "description": "Callback content-type to be transfers", + "exec": [ + "expect(environment.payerfspcallbackst.headers['content-type']).to.equal('application/vnd.interoperability.transfers+json;version={$inputs.expectedTransfersVersion}')" + ] + }, + { + "id": 7, + "description": "Request transferId same as quote request transferId", + "exec": [ + "expect('{$request.body.transferId}').to.equal('{$prev.3.request.body.transactionId}')" + ] + }, + { + "id": 8, + "description": "Request transferAmount (amount & currency) to match quote request", + "exec": [ + "expect('{$prev.3.request.body.amount.amount}').to.equal('{$request.body.amount.amount}')", + "expect('{$prev.3.request.body.amount.currency}').to.equal('{$request.body.amount.currency}')" + ] + }, + { + "id": 9, + "description": "Request FSP source the same as quote callback FSP destination", + "exec": [ + "expect('{$request.headers['FSPIOP-Source']}').to.equal(environment.payerfspcallbackst.headers['fspiop-destination'])" + ] + } + ] + }, + "url": "{$inputs.HOST_ML_API_ADAPTER}", + "scriptingEngine": "javascript", + "ignoreCallbacks": true, + "scripts": { + "preRequest": { + "exec": [ + "if (environment.ENABLE_WS_ASSERTIONS===true) {", + " await websocket.connect(environment.PAYERFSP_SDK_TESTAPI_WS_URL + '/callbacks/{$request.body.transferId}', 'payerfspcallbackst')", + "}" + ] + }, + "postRequest": { + "exec": [ + "if (environment.ENABLE_WS_ASSERTIONS===true) {", + " environment.payerfspcallbackst = await websocket.getMessage('payerfspcallbackst', environment.WS_ASSERTION_TIMEOUT)", + "}", + "", + "console.log(environment.payerfspcallbackst);" + ] + } + } + } + ] + }, + { + "id": 7, + "name": "SIM2 to PAYERFSP", + "requests": [ + { + "id": 3, + "description": "Send quote", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "operationPath": "/quotes", + "method": "post", + "headers": { + "Accept": "application/vnd.interoperability.quotes+json;version=1.0", + "Content-Type": "application/vnd.interoperability.quotes+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.SIM2_NAME}", + "FSPIOP-Destination": "{$inputs.SIMPAYER_NAME}", + "Authorization": "{$inputs.TESTFSP2_BEARER_TOKEN}" + }, + "body": { + "quoteId": "{$function.generic.generateUUID}", + "transactionId": "{$function.generic.generateUUID}", + "payer": { + "partyIdInfo": { + "partyIdType": "{$inputs.fromIdType}", + "partyIdentifier": "{$inputs.testfsp2Identifier}", + "fspId": "{$inputs.SIM2_NAME}" + }, + "personalInfo": { + "complexName": { + "firstName": "{$inputs.fromFirstName}", + "lastName": "{$inputs.fromLastName}" + }, + "dateOfBirth": "{$inputs.fromDOB}" + } + }, + "payee": { + "partyIdInfo": { + "partyIdType": "{$inputs.fromIdType}", + "partyIdentifier": "{$inputs.payerIdentifier}", + "fspId": "{$inputs.SIMPAYER_NAME}" + } + }, + "amountType": "RECEIVE", + "amount": { + "amount": "20", + "currency": "{$inputs.currency2}" + }, + "transactionType": { + "scenario": "TRANSFER", + "initiator": "PAYER", + "initiatorType": "CONSUMER" + }, + "note": "{$inputs.note}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(environment.testfsp2callbacks.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(environment.testfsp2callbacks.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback body should contain transferAmount", + "exec": [ + "expect(environment.testfsp2callbacks.data).to.have.property('transferAmount')" + ] + }, + { + "id": 6, + "description": "Callback transferAmount (amount & currency)to match the request", + "exec": [ + "expect(environment.testfsp2callbacks.data.transferAmount.amount).to.equal('{$request.body.amount.amount}')", + "expect(environment.testfsp2callbacks.data.transferAmount.currency).to.equal('{$request.body.amount.currency}')" + ] + }, + { + "id": 7, + "description": "Callback content-type to be quotes", + "exec": [ + "expect(environment.testfsp2callbacks.headers['content-type']).to.equal('application/vnd.interoperability.quotes+json;version={$inputs.expectedQuotesVersion}')" + ] + }, + { + "id": 8, + "description": "Request amountType to be RECEIVE", + "exec": [ + "expect('{$request.body.amountType}').to.equal('RECEIVE')" + ] + }, + { + "id": 9, + "description": "Request transactionType scenario to be TRANSFER", + "exec": [ + "expect('{$request.body.transactionType.scenario}').to.equal('TRANSFER')" + ] + }, + { + "id": 10, + "description": "Request transactionType initiator to be PAYER", + "exec": [ + "expect('{$request.body.transactionType.initiator}').to.equal('PAYER')" + ] + }, + { + "id": 11, + "description": "Request transactionType initiatorType to be CONSUMER", + "exec": [ + "expect('{$request.body.transactionType.initiatorType}').to.equal('CONSUMER')" + ] + } + ] + }, + "params": { + "Type": "MSISDN", + "ID": "{$inputs.toIdValue}" + }, + "path": "/quotes", + "url": "{$inputs.HOST_QUOTING_SERVICE}", + "scriptingEngine": "javascript", + "ignoreCallbacks": true, + "scripts": { + "preRequest": { + "exec": [ + "console.log(environment.TESTFSP2_SDK_TESTAPI_WS_URL + '/callbacks/{$request.body.quoteId}');", + "", + "if (environment.ENABLE_WS_ASSERTIONS===true) {", + " await websocket.connect(environment.TESTFSP2_SDK_TESTAPI_WS_URL + '/callbacks/{$request.body.quoteId}', 'testfsp2callbacksq')", + "}" + ] + }, + "postRequest": { + "exec": [ + "if (environment.ENABLE_WS_ASSERTIONS===true) {", + " environment.testfsp2callbacks = await websocket.getMessage('testfsp2callbacksq', environment.WS_ASSERTION_TIMEOUT)", + "}", + "", + "console.log(environment.testfsp2callbacks);", + "", + "" + ] + } + } + }, + { + "id": 2, + "description": "Send transfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "operationPath": "/transfers", + "method": "post", + "headers": { + "Accept": "application/vnd.interoperability.transfers+json;version=1.0", + "Content-Type": "application/vnd.interoperability.transfers+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.SIM2_NAME}", + "Authorization": "{$inputs.TESTFSP2_BEARER_TOKEN}" + }, + "body": { + "transferId": "{$prev.3.request.body.transactionId}", + "payerFsp": "{$inputs.SIM2_NAME}", + "payeeFsp": "{$inputs.SIMPAYER_NAME}", + "amount": { + "amount": "20", + "currency": "{$inputs.currency2}" + }, + "expiration": "{$environment.testfsp2callbacks.data.expiration}", + "ilpPacket": "{$environment.testfsp2callbacks.data.ilpPacket}", + "condition": "{$environment.testfsp2callbacks.data.condition}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(environment.testfsp2callbackst.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(environment.testfsp2callbackst.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback transferState to be COMMITTED", + "exec": [ + "expect(environment.testfsp2callbackst.data.transferState).to.equal('COMMITTED')" + ] + }, + { + "id": 6, + "description": "Callback content-type to be transfers", + "exec": [ + "expect(environment.testfsp2callbackst.headers['content-type']).to.equal('application/vnd.interoperability.transfers+json;version={$inputs.expectedTransfersVersion}')" + ] + }, + { + "id": 7, + "description": "Request transferId same as quote request transferId", + "exec": [ + "expect('{$request.body.transferId}').to.equal('{$prev.3.request.body.transactionId}')" + ] + }, + { + "id": 8, + "description": "Request transferAmount (amount & currency) to match quote request", + "exec": [ + "expect('{$prev.3.request.body.amount.amount}').to.equal('{$request.body.amount.amount}')", + "expect('{$prev.3.request.body.amount.currency}').to.equal('{$request.body.amount.currency}')" + ] + }, + { + "id": 9, + "description": "Request FSP source the same as quote callback FSP destination", + "exec": [ + "expect('{$request.headers['FSPIOP-Source']}').to.equal(environment.testfsp2callbackst.headers['fspiop-destination'])" + ] + } + ] + }, + "url": "{$inputs.HOST_ML_API_ADAPTER}", + "scriptingEngine": "javascript", + "ignoreCallbacks": true, + "scripts": { + "preRequest": { + "exec": [ + "if (environment.ENABLE_WS_ASSERTIONS===true) {", + " await websocket.connect(environment.TESTFSP2_SDK_TESTAPI_WS_URL + '/callbacks/{$request.body.transferId}', 'testfsp2callbackst')", + "}" + ] + }, + "postRequest": { + "exec": [ + "if (environment.ENABLE_WS_ASSERTIONS===true) {", + " environment.testfsp2callbackst = await websocket.getMessage('testfsp2callbackst', environment.WS_ASSERTION_TIMEOUT)", + "}" + ] + } + } + } + ] + }, + { + "id": 8, + "name": "PAYEEFSP to SIM2", + "requests": [ + { + "id": 3, + "description": "Send quote", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "operationPath": "/quotes", + "method": "post", + "headers": { + "Accept": "application/vnd.interoperability.quotes+json;version=1.0", + "Content-Type": "application/vnd.interoperability.quotes+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.SIMPAYEE_NAME}", + "FSPIOP-Destination": "{$inputs.SIM2_NAME}", + "Authorization": "{$inputs.PAYEE_BEARER_TOKEN}" + }, + "body": { + "quoteId": "{$function.generic.generateUUID}", + "transactionId": "{$function.generic.generateUUID}", + "payer": { + "partyIdInfo": { + "partyIdType": "{$inputs.fromIdType}", + "partyIdentifier": "{$inputs.payeeIdentifier}", + "fspId": "{$inputs.SIMPAYEE_NAME}" + }, + "personalInfo": { + "complexName": { + "firstName": "{$inputs.fromFirstName}", + "lastName": "{$inputs.fromLastName}" + }, + "dateOfBirth": "{$inputs.fromDOB}" + } + }, + "payee": { + "partyIdInfo": { + "partyIdType": "{$inputs.fromIdType}", + "partyIdentifier": "{$inputs.payeefspIdentifier}", + "fspId": "{$inputs.SIM2_NAME}" + } + }, + "amountType": "RECEIVE", + "amount": { + "amount": "35", + "currency": "{$inputs.currency2}" + }, + "transactionType": { + "scenario": "TRANSFER", + "initiator": "PAYER", + "initiatorType": "CONSUMER" + }, + "note": "{$inputs.note}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(environment.payeefspcallbacks.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(environment.payeefspcallbacks.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback body should contain transferAmount", + "exec": [ + "expect(environment.payeefspcallbacks.data).to.have.property('transferAmount')" + ] + }, + { + "id": 6, + "description": "Callback transferAmount (amount & currency)to match the request", + "exec": [ + "expect(environment.payeefspcallbacks.data.transferAmount.amount).to.equal('{$request.body.amount.amount}')", + "expect(environment.payeefspcallbacks.data.transferAmount.currency).to.equal('{$request.body.amount.currency}')" + ] + }, + { + "id": 7, + "description": "Callback content-type to be quotes", + "exec": [ + "expect(environment.payeefspcallbacks.headers['content-type']).to.equal('application/vnd.interoperability.quotes+json;version={$inputs.expectedQuotesVersion}')" + ] + }, + { + "id": 8, + "description": "Request amountType to be RECEIVE", + "exec": [ + "expect('{$request.body.amountType}').to.equal('RECEIVE')" + ] + }, + { + "id": 9, + "description": "Request transactionType scenario to be TRANSFER", + "exec": [ + "expect('{$request.body.transactionType.scenario}').to.equal('TRANSFER')" + ] + }, + { + "id": 10, + "description": "Request transactionType initiator to be PAYER", + "exec": [ + "expect('{$request.body.transactionType.initiator}').to.equal('PAYER')" + ] + }, + { + "id": 11, + "description": "Request transactionType initiatorType to be CONSUMER", + "exec": [ + "expect('{$request.body.transactionType.initiatorType}').to.equal('CONSUMER')" + ] + } + ] + }, + "params": { + "Type": "MSISDN", + "ID": "{$inputs.toIdValue}" + }, + "path": "/quotes", + "url": "{$inputs.HOST_QUOTING_SERVICE}", + "scriptingEngine": "javascript", + "ignoreCallbacks": true, + "scripts": { + "preRequest": { + "exec": [ + "if (environment.ENABLE_WS_ASSERTIONS===true) {", + " await websocket.connect(environment.PAYEEFSP_SDK_TESTAPI_WS_URL + '/callbacks/{$request.body.quoteId}', 'payeefspcallbacksq')", + "}" + ] + }, + "postRequest": { + "exec": [ + "if (environment.ENABLE_WS_ASSERTIONS===true) {", + " environment.payeefspcallbacks = await websocket.getMessage('payeefspcallbacksq', environment.WS_ASSERTION_TIMEOUT)", + "}", + "", + "console.log(environment.payeefspcallbacks);", + "/*", + "environment.transactionid = '{$request.body.transactionId}'", + "console.log(environment.transactionid);*/" + ] + } + } + }, + { + "id": 2, + "description": "Send transfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "operationPath": "/transfers", + "method": "post", + "headers": { + "Accept": "application/vnd.interoperability.transfers+json;version=1.0", + "Content-Type": "application/vnd.interoperability.transfers+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.SIMPAYEE_NAME}", + "Authorization": "{$inputs.PAYEE_BEARER_TOKEN}" + }, + "body": { + "transferId": "{$prev.3.request.body.transactionId}", + "payerFsp": "{$inputs.SIMPAYEE_NAME}", + "payeeFsp": "{$inputs.SIM2_NAME}", + "amount": { + "amount": "35", + "currency": "{$inputs.currency2}" + }, + "expiration": "{$environment.payeefspcallbacks.data.expiration}", + "ilpPacket": "{$environment.payeefspcallbacks.data.ilpPacket}", + "condition": "{$environment.payeefspcallbacks.data.condition}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(environment.payeefspcallbackst.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(environment.payeefspcallbackst.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback transferState to be COMMITTED", + "exec": [ + "expect(environment.payeefspcallbackst.data.transferState).to.equal('COMMITTED')" + ] + }, + { + "id": 6, + "description": "Callback content-type to be transfers", + "exec": [ + "expect(environment.payeefspcallbackst.headers['content-type']).to.equal('application/vnd.interoperability.transfers+json;version={$inputs.expectedTransfersVersion}')" + ] + }, + { + "id": 7, + "description": "Request transferId same as quote request transferId", + "exec": [ + "expect('{$request.body.transferId}').to.equal('{$prev.3.request.body.transactionId}')" + ] + }, + { + "id": 8, + "description": "Request transferAmount (amount & currency) to match quote request", + "exec": [ + "expect('{$prev.3.request.body.amount.amount}').to.equal('{$request.body.amount.amount}')", + "expect('{$prev.3.request.body.amount.currency}').to.equal('{$request.body.amount.currency}')" + ] + }, + { + "id": 9, + "description": "Request FSP source the same as quote callback FSP destination", + "exec": [ + "expect('{$request.headers['FSPIOP-Source']}').to.equal(environment.payeefspcallbackst.headers['fspiop-destination'])" + ] + } + ] + }, + "url": "{$inputs.HOST_ML_API_ADAPTER}", + "scriptingEngine": "javascript", + "ignoreCallbacks": true, + "scripts": { + "preRequest": { + "exec": [ + "if (environment.ENABLE_WS_ASSERTIONS===true) {", + " await websocket.connect(environment.PAYEEFSP_SDK_TESTAPI_WS_URL + '/callbacks/{$request.body.transferId}', 'payeefspcallbackst')", + "}" + ] + }, + "postRequest": { + "exec": [ + "if (environment.ENABLE_WS_ASSERTIONS===true) {", + " environment.payeefspcallbackst = await websocket.getMessage('payeefspcallbackst', environment.WS_ASSERTION_TIMEOUT)", + "}", + "", + "console.log(environment.payeefspcallbackst);" + ] + } + } + } + ] + }, + { + "id": 9, + "name": "PAYEEFSP to PAYERFSP", + "requests": [ + { + "id": 3, + "description": "Send quote", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "operationPath": "/quotes", + "method": "post", + "headers": { + "Accept": "application/vnd.interoperability.quotes+json;version=1.0", + "Content-Type": "application/vnd.interoperability.quotes+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.SIMPAYEE_NAME}", + "FSPIOP-Destination": "{$inputs.SIMPAYER_NAME}", + "Authorization": "{$inputs.PAYEE_BEARER_TOKEN}" + }, + "body": { + "quoteId": "{$function.generic.generateUUID}", + "transactionId": "{$function.generic.generateUUID}", + "payer": { + "partyIdInfo": { + "partyIdType": "{$inputs.fromIdType}", + "partyIdentifier": "{$inputs.payeeIdentifier}", + "fspId": "{$inputs.SIMPAYEE_NAME}" + }, + "personalInfo": { + "complexName": { + "firstName": "{$inputs.fromFirstName}", + "lastName": "{$inputs.fromLastName}" + }, + "dateOfBirth": "{$inputs.fromDOB}" + } + }, + "payee": { + "partyIdInfo": { + "partyIdType": "{$inputs.fromIdType}", + "partyIdentifier": "{$inputs.payerIdentifier}", + "fspId": "{$inputs.SIMPAYER_NAME}" + } + }, + "amountType": "RECEIVE", + "amount": { + "amount": "25", + "currency": "{$inputs.currency2}" + }, + "transactionType": { + "scenario": "TRANSFER", + "initiator": "PAYER", + "initiatorType": "CONSUMER" + }, + "note": "{$inputs.note}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(environment.payeefspcallbacks.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(environment.payeefspcallbacks.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback body should contain transferAmount", + "exec": [ + "expect(environment.payeefspcallbacks.data).to.have.property('transferAmount')" + ] + }, + { + "id": 6, + "description": "Callback transferAmount (amount & currency)to match the request", + "exec": [ + "expect(environment.payeefspcallbacks.data.transferAmount.amount).to.equal('{$request.body.amount.amount}')", + "expect(environment.payeefspcallbacks.data.transferAmount.currency).to.equal('{$request.body.amount.currency}')" + ] + }, + { + "id": 7, + "description": "Callback content-type to be quotes", + "exec": [ + "expect(environment.payeefspcallbacks.headers['content-type']).to.equal('application/vnd.interoperability.quotes+json;version={$inputs.expectedQuotesVersion}')" + ] + }, + { + "id": 8, + "description": "Request amountType to be RECEIVE", + "exec": [ + "expect('{$request.body.amountType}').to.equal('RECEIVE')" + ] + }, + { + "id": 9, + "description": "Request transactionType scenario to be TRANSFER", + "exec": [ + "expect('{$request.body.transactionType.scenario}').to.equal('TRANSFER')" + ] + }, + { + "id": 10, + "description": "Request transactionType initiator to be PAYER", + "exec": [ + "expect('{$request.body.transactionType.initiator}').to.equal('PAYER')" + ] + }, + { + "id": 11, + "description": "Request transactionType initiatorType to be CONSUMER", + "exec": [ + "expect('{$request.body.transactionType.initiatorType}').to.equal('CONSUMER')" + ] + } + ] + }, + "params": { + "Type": "MSISDN", + "ID": "{$inputs.toIdValue}" + }, + "path": "/quotes", + "url": "{$inputs.HOST_QUOTING_SERVICE}", + "scriptingEngine": "javascript", + "ignoreCallbacks": true, + "scripts": { + "preRequest": { + "exec": [ + "if (environment.ENABLE_WS_ASSERTIONS===true) {", + " await websocket.connect(environment.PAYEEFSP_SDK_TESTAPI_WS_URL + '/callbacks/{$request.body.quoteId}', 'payeefspcallbacksq')", + "}" + ] + }, + "postRequest": { + "exec": [ + "if (environment.ENABLE_WS_ASSERTIONS===true) {", + " environment.payeefspcallbacks = await websocket.getMessage('payeefspcallbacksq', environment.WS_ASSERTION_TIMEOUT)", + "}", + "", + "console.log(environment.payeefspcallbacks);", + "", + "/*environment.transactionid = '{$request.body.transactionId}'", + "console.log(environment.transactionid);*/" + ] + } + } + }, + { + "id": 2, + "description": "Send transfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "operationPath": "/transfers", + "method": "post", + "headers": { + "Accept": "application/vnd.interoperability.transfers+json;version=1.0", + "Content-Type": "application/vnd.interoperability.transfers+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.SIMPAYEE_NAME}", + "Authorization": "{$inputs.PAYEE_BEARER_TOKEN}" + }, + "body": { + "transferId": "{$prev.3.request.body.transactionId}", + "payerFsp": "{$inputs.SIMPAYEE_NAME}", + "payeeFsp": "{$inputs.SIMPAYER_NAME}", + "amount": { + "amount": "25", + "currency": "{$inputs.currency2}" + }, + "expiration": "{$environment.payeefspcallbacks.data.expiration}", + "ilpPacket": "{$environment.payeefspcallbacks.data.ilpPacket}", + "condition": "{$environment.payeefspcallbacks.data.condition}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(environment.payeefspcallbackst.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(environment.payeefspcallbackst.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback transferState to be COMMITTED", + "exec": [ + "expect(environment.payeefspcallbackst.data.transferState).to.equal('COMMITTED')" + ] + }, + { + "id": 6, + "description": "Callback content-type to be transfers", + "exec": [ + "expect(environment.payeefspcallbackst.headers['content-type']).to.equal('application/vnd.interoperability.transfers+json;version={$inputs.expectedTransfersVersion}')" + ] + }, + { + "id": 7, + "description": "Request transferId same as quote request transferId", + "exec": [ + "expect('{$request.body.transferId}').to.equal('{$prev.3.request.body.transactionId}')" + ] + }, + { + "id": 8, + "description": "Request transferAmount (amount & currency) to match quote request", + "exec": [ + "expect('{$prev.3.request.body.amount.amount}').to.equal('{$request.body.amount.amount}')", + "expect('{$prev.3.request.body.amount.currency}').to.equal('{$request.body.amount.currency}')" + ] + }, + { + "id": 9, + "description": "Request FSP source the same as quote callback FSP destination", + "exec": [ + "expect('{$request.headers['FSPIOP-Source']}').to.equal(environment.payeefspcallbackst.headers['fspiop-destination'])" + ] + } + ] + }, + "url": "{$inputs.HOST_ML_API_ADAPTER}", + "scriptingEngine": "javascript", + "ignoreCallbacks": true, + "scripts": { + "preRequest": { + "exec": [ + "if (environment.ENABLE_WS_ASSERTIONS===true) {", + " await websocket.connect(environment.PAYEEFSP_SDK_TESTAPI_WS_URL + '/callbacks/{$request.body.transferId}', 'payeefspcallbackst')", + "}" + ] + }, + "postRequest": { + "exec": [ + "if (environment.ENABLE_WS_ASSERTIONS===true) {", + " environment.payeefspcallbackst = await websocket.getMessage('payeefspcallbackst', environment.WS_ASSERTION_TIMEOUT)", + "}", + "", + "console.log(environment.payeefspcallbackst);" + ] + } + } + } + ] + }, + { + "id": 10, + "name": "Create Settlement on the current open window", + "requests": [ + { + "id": 1, + "description": "Get Existing Open Window", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "settlements" + }, + "operationPath": "/settlementWindows", + "path": "/settlementWindows", + "method": "get", + "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", + "queryParams": { + "state": "OPEN" + }, + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "State should be OPEN", + "exec": [ + "expect(environment.openWindowstate).to.equal(\"OPEN\")" + ] + } + ] + }, + "scriptingEngine": "javascript", + "scripts": { + "postRequest": { + "exec": [ + "var jsonData = response.body;", + "//console.log(jsonData.state);", + "", + "environment.openWindowID=jsonData[0].settlementWindowId;", + "environment.openWindowstate=jsonData[0].state;", + "", + "console.log(environment.openWindowID);" + ] + } + } + }, + { + "id": 2, + "description": "Close existent window", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "settlements" + }, + "operationPath": "/settlementWindows/{id}", + "path": "/settlementWindows/{$environment.openWindowID}", + "method": "post", + "params": { + "id": "{$environment.openWindowID}" + }, + "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", + "body": { + "state": "CLOSED", + "reason": "string" + }, + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 200 or 400", + "exec": [ + "if(response.status === 400){", + " expect(response.status).to.equal(400)", + "}", + "else{", + " expect(response.status).to.equal(200)", + "}", + "", + "" + ] + }, + { + "id": 2, + "description": "New window State should be OPEN", + "exec": [ + "", + " if (response.status === 400) {", + " ", + "expect(response.body.errorInformation.errorCode).to.eql('3100');", + "expect(response.body.errorInformation.errorDescription).to.eql('Generic validation error - Window ' + environment.openWindowID + ' is empty');", + "}else{", + " ", + " ", + " expect(environment.openWindowstate).to.equal(\"OPEN\");", + "}", + "", + "", + "" + ] + } + ] + }, + "scriptingEngine": "javascript", + "scripts": { + "postRequest": { + "exec": [ + "var jsonData = response.body;", + "var rcode = Number(response.status);", + "//console.log(rcode);", + "", + "//if (rcode == 200){", + "environment.closedWindowID= Number(environment.openWindowID);", + "environment.openWindowstate=jsonData.state;", + "", + "console.log(environment.openWindowstate);", + "console.log(environment.closedWindowID);", + "//}" + ] + } + } + }, + { + "id": 3, + "description": "Create Settlement for Closed Window", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "settlements" + }, + "operationPath": "/settlements", + "path": "/settlements", + "method": "post", + "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "Settlement State should be PENDING_SETTLEMENT", + "exec": [ + "expect(environment.winstate).to.equal(\"PENDING_SETTLEMENT\")" + ] + }, + { + "id": 3, + "description": "Number of associated windows should be 1", + "exec": [ + "expect(response.body.settlementWindows.length).to.equal(1)" + ] + }, + { + "id": 4, + "description": "Associated Settlement Window ID is the correct one", + "exec": [ + "expect(response.body.settlementWindows[0].id).to.equal(environment.closedWindowID)" + ] + }, + { + "id": 5, + "description": "Associated Settlement Window state should be PENDING_SETTLEMENT", + "exec": [ + "expect(response.body.settlementWindows[0].state).to.equal(\"PENDING_SETTLEMENT\")" + ] + } + ] + }, + "scriptingEngine": "javascript", + "body": { + "settlementModel": "DEFAULTDEFERREDNET", + "reason": "TESTING", + "settlementWindows": [ + { + "id": "{$environment.closedWindowID}" + } + ] + }, + "delay": "3000", + "scripts": { + "postRequest": { + "exec": [ + "var jsonData = response.body;", + "environment.settlementId = jsonData.id;", + "environment.winstate = jsonData.state;", + "", + "" + ] + }, + "preRequest": { + "exec": [ + "//environment.closedWindowID = 6;", + "environment.closedWindowID = Number(environment.closedWindowID);", + "", + "/*requestVariables.closedWindowID = Number(environment.closedWindowID);", + "*/" + ] + } + } + } + ] + }, + { + "id": 11, + "name": "Store Settlement&Position Account Balances After Transfers", + "requests": [ + { + "id": 1, + "description": "Get balances for testfsp1", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.SIM1_NAME}/accounts", + "method": "get", + "params": { + "name": "{$inputs.SIM1_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + } + ] + }, + "scriptingEngine": "javascript", + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.currency2).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"SETTLEMENT\")", + " {", + "environment.testfsp1SettleAccountBalanceAfterTransfer= curAccount.value ", + "}", + " if(curAccount.ledgerAccountType === \"POSITION\") ", + " {", + "environment.testfsp1PositionAccountBalanceAfterTransfer= curAccount.value;", + "}", + "", + "})" + ] + } + } + }, + { + "id": 2, + "description": "Get balances for testfsp2", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.SIM2_NAME}/accounts", + "method": "get", + "params": { + "name": "{$inputs.SIM2_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + } + ] + }, + "scriptingEngine": "javascript", + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.currency2).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"SETTLEMENT\")", + " {", + "environment.testfsp2SettleAccountBalanceAfterTransfer= curAccount.value ", + "}", + " if(curAccount.ledgerAccountType === \"POSITION\") ", + " {", + "environment.testfsp2PositionAccountBalanceAfterTransfer= curAccount.value;", + "}", + "", + "})" + ] + } + } + }, + { + "id": 3, + "description": "Get balances for ttkdfsp", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.SIMPAYER_NAME}/accounts", + "method": "get", + "params": { + "name": "{$inputs.SIMPAYER_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + } + ] + }, + "scriptingEngine": "javascript", + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.currency2).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"SETTLEMENT\")", + " {", + "environment.payerfspSettleAccountBalanceAfterTransfer= curAccount.value ", + "}", + " if(curAccount.ledgerAccountType === \"POSITION\") ", + " {", + "environment.payerfspPositionAccountBalanceAfterTransfer= curAccount.value;", + "}", + "", + "})" + ] + } + } + }, + { + "id": 4, + "description": "Get balances for payeefsp", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.payeefsp}/accounts", + "method": "get", + "params": { + "name": "{$inputs.payeefsp}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + } + ] + }, + "scriptingEngine": "javascript", + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.currency2).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"SETTLEMENT\")", + " {", + "environment.payeefspSettleAccountBalanceAfterTransfer= curAccount.value ", + "}", + " if(curAccount.ledgerAccountType === \"POSITION\") ", + " {", + "environment.payeefspPositionAccountBalanceAfterTransfer= curAccount.value;", + "}", + "", + "})" + ] + } + } + } + ] + }, + { + "id": 12, + "name": "Prepare-settlement", + "requests": [ + { + "id": 4, + "description": "Prepare Settlement", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "settlements" + }, + "operationPath": "/settlements/{id}", + "path": "/settlements/{$environment.settlementId}", + "method": "get", + "params": { + "id": "{$environment.settlementId}" + }, + "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code status is 200", + "exec": [ + "//if(environment.WINDOWISEMPTY === false){", + "expect(response.status).to.equal(200)", + "//}" + ] + } + ] + }, + "scriptingEngine": "javascript", + "delay": "2500", + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "console.log(environment.settlementId);", + "//environment.settlementId = 6;", + "var i=0;", + "var dfspsacc = [];", + "var callbackpayer;", + "", + "environment.winstate = res.settlementWindows[0].state;", + "", + "console.log(environment.winstate);", + "if(environment.winstate===\"PENDING_SETTLEMENT\"){", + "", + "res.participants.map(function (participant) {", + " participant.accounts.filter(account => account.netSettlementAmount.currency === environment.currency2).forEach(curAccount => {", + "//for(const curAccount of account) { ", + "", + " dfspsacc[i] = {", + " dfspid: participant.id,", + " dfspaccid: curAccount.id ", + " }", + " i++;", + "//}", + "})", + " })", + " ", + "", + "const config = { headers: {'Content-Type': 'application/json','FSPIOP-Source': 'testingtoolkitdfsp'} };", + "for(let dfspsaccx of dfspsacc){", + " console.log(dfspsaccx.dfspid,dfspsaccx.dfspaccid)", + "callbackpayer = await axios.put(environment.HOST_CENTRAL_SETTLEMENT + '/settlements/'+environment.settlementId, {", + " \"participants\": [", + " {", + " \"id\": dfspsaccx.dfspid,", + " \"accounts\": [", + " {", + " \"id\": dfspsaccx.dfspaccid,", + " \"reason\": \"Transfers recorded for payer\",", + " \"state\": \"PS_TRANSFERS_RECORDED\"", + " }", + " ]", + " }", + " ]", + " },config) ", + "console.log(callbackpayer.data); ", + "}", + "}else{", + " console.log(\"Window is empty\")", + "}", + "/*res.participants.map(participant => {", + " participant.accounts.filter(account => account.netSettlementAmount.currency === pm.environment.get('currency2'))", + " .forEach(curAccount => {*/", + " " + ] + }, + "preRequest": { + "exec": [ + "" + ] + } + } + }, + { + "id": 5, + "description": "check state for participants after prepare", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "settlements" + }, + "operationPath": "/settlements/{id}", + "path": "/settlements/{$environment.settlementId}", + "method": "get", + "params": { + "id": "{$environment.settlementId}" + }, + "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "scriptingEngine": "javascript", + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code status is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "Check status PS_TRANSFERS_RECORDED", + "exec": [ + "expect(response.body.state).to.eql(\"PS_TRANSFERS_RECORDED\");" + ] + }, + { + "id": 3, + "description": "Check status for window is PENDING SETTLEMENT", + "exec": [ + " expect(response.body.settlementWindows[0].state).to.eql(\"PENDING_SETTLEMENT\");" + ] + }, + { + "id": 4, + "description": "Account state is PS_TRANSFERS_RECORDED for all accounts", + "exec": [ + "expect(environment.controlvar).to.equal(true)" + ] + } + ] + }, + "scripts": { + "postRequest": { + "exec": [ + "//Boolean isok = false;\r", + "var res = response.body;\r", + "var isok = true;\r", + "\r", + "try{\r", + "res.participants.map(function (participant) {\r", + " participant.accounts.filter(account => account.netSettlementAmount.currency === environment.currency2).every(curAccount => {\r", + " if(isok === true){ \r", + " if(curAccount.state === \"PS_TRANSFERS_RECORDED\"){\r", + " isok= true;\r", + " \r", + " \r", + " \r", + " }else{\r", + " isok= false;\r", + " // console.log(isok);\r", + " \r", + " }\r", + " } \r", + " })\r", + "})\r", + "\r", + "}catch(exception){\r", + " console.log(exception);\r", + "}\r", + "\r", + "environment.controlvar = isok;" + ] + } + } + } + ] + }, + { + "id": 13, + "name": "Store Settlement&Position Account Balances After Prepare", + "requests": [ + { + "id": 1, + "description": "Get balances for testfsp1", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.SIM1_NAME}/accounts", + "method": "get", + "params": { + "name": "{$inputs.SIM1_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "testfsp1 settlement account balance before and after prepare should be the same", + "exec": [ + "expect(environment.testfsp1SettleAccountBalanceAfterPrepare).to.equal(environment.testfsp1SettleAccountBalanceAfterTransfer);" + ] + }, + { + "id": 3, + "description": "testfsp1 position account balance before and after prepare should be the same.", + "exec": [ + "expect(environment.testfsp1PositionAccountBalanceAfterPrepare).to.equal(environment.testfsp1PositionAccountBalanceAfterTransfer);" + ] + } + ] + }, + "scriptingEngine": "javascript", + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.currency2).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"SETTLEMENT\")", + " {", + "environment.testfsp1SettleAccountBalanceAfterPrepare= curAccount.value ", + "}", + " if(curAccount.ledgerAccountType === \"POSITION\") ", + " {", + "environment.testfsp1PositionAccountBalanceAfterPrepare= curAccount.value;", + "}", + "", + "})" + ] + } + } + }, + { + "id": 2, + "description": "Get balances for testfsp2", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.SIM2_NAME}/accounts", + "method": "get", + "params": { + "name": "{$inputs.SIM2_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "testfsp2 settlement account balance before and after prepare should be the same", + "exec": [ + "expect(environment.testfsp2SettleAccountBalanceAfterPrepare).to.equal(environment.testfsp2SettleAccountBalanceAfterTransfer);" + ] + }, + { + "id": 3, + "description": "testfsp2 position account balance before and after prepare should be the same.", + "exec": [ + "expect(environment.testfsp2PositionAccountBalanceAfterPrepare).to.equal(environment.testfsp2PositionAccountBalanceAfterTransfer);" + ] + } + ] + }, + "scriptingEngine": "javascript", + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.currency2).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"SETTLEMENT\")", + " {", + "environment.testfsp2SettleAccountBalanceAfterPrepare= curAccount.value ", + "}", + " if(curAccount.ledgerAccountType === \"POSITION\") ", + " {", + "environment.testfsp2PositionAccountBalanceAfterPrepare= curAccount.value;", + "}", + "", + "})" + ] + } + } + }, + { + "id": 3, + "description": "Get balances for payerfsp", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.SIMPAYER_NAME}/accounts", + "method": "get", + "params": { + "name": "{$inputs.SIMPAYER_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "payerfsp settlement account balance before and after prepare should be the same", + "exec": [ + "expect(environment.payerfspSettleAccountBalanceAfterPrepare).to.equal(environment.payerfspSettleAccountBalanceAfterTransfer);" + ] + }, + { + "id": 3, + "description": "payerfsp position account balance before and after prepare should be the same.", + "exec": [ + "expect(environment.payerfspPositionAccountBalanceAfterPrepare).to.equal(environment.payerfspPositionAccountBalanceAfterTransfer);" + ] + } + ] + }, + "scriptingEngine": "javascript", + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.currency2).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"SETTLEMENT\")", + " {", + "environment.payerfspSettleAccountBalanceAfterPrepare= curAccount.value ", + "}", + " if(curAccount.ledgerAccountType === \"POSITION\") ", + " {", + "environment.payerfspPositionAccountBalanceAfterPrepare= curAccount.value;", + "}", + "", + "})" + ] + } + } + }, + { + "id": 4, + "description": "Get balances for payeefsp", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.payeefsp}/accounts", + "method": "get", + "params": { + "name": "{$inputs.payeefsp}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "payeefsp settlement account balance before and after prepare should be the same", + "exec": [ + "expect(environment.payeefspSettleAccountBalanceAfterPrepare).to.equal(environment.payeefspSettleAccountBalanceAfterTransfer);" + ] + }, + { + "id": 3, + "description": "payeefsp position account balance before and after prepare should be the same.", + "exec": [ + "expect(environment.payeefspPositionAccountBalanceAfterPrepare).to.equal(environment.payeefspPositionAccountBalanceAfterTransfer);" + ] + } + ] + }, + "scriptingEngine": "javascript", + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.currency2).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"SETTLEMENT\")", + " {", + "environment.payeefspSettleAccountBalanceAfterPrepare= curAccount.value ", + "}", + " if(curAccount.ledgerAccountType === \"POSITION\") ", + " {", + "environment.payeefspPositionAccountBalanceAfterPrepare= curAccount.value;", + "}", + "", + "})" + ] + } + } + } + ] + }, + { + "id": 14, + "name": "reserve-settlement", + "requests": [ + { + "id": 4, + "description": "reserve Settlement", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "settlements" + }, + "operationPath": "/settlements/{id}", + "path": "/settlements/{$environment.settlementId}", + "method": "get", + "params": { + "id": "{$environment.settlementId}" + }, + "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code status is 200", + "exec": [ + "//if(environment.WINDOWISEMPTY === false){", + "expect(response.status).to.equal(200)", + "//}" + ] + } + ] + }, + "scriptingEngine": "javascript", + "delay": "2500", + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "console.log(environment.settlementId);", + "//environment.settlementId = 6;", + "var i=0;", + "var dfspsacc = [];", + "var callbackpayer;", + "", + "environment.winstate = res.settlementWindows[0].state;", + "", + "console.log(environment.winstate);", + "if(environment.winstate===\"PENDING_SETTLEMENT\"){", + "", + "res.participants.map(function (participant) {", + " participant.accounts.filter(account => account.netSettlementAmount.currency === environment.currency2).forEach(curAccount => {", + "//for(const curAccount of account) { ", + "", + " dfspsacc[i] = {", + " dfspid: participant.id,", + " dfspaccid: curAccount.id ", + " }", + " i++;", + "//}", + "})", + " })", + " ", + "", + "const config = { headers: {'Content-Type': 'application/json','FSPIOP-Source': 'testingtoolkitdfsp'} };", + "for(let dfspsaccx of dfspsacc){", + " console.log(dfspsaccx.dfspid,dfspsaccx.dfspaccid)", + "callbackpayer = await axios.put(environment.HOST_CENTRAL_SETTLEMENT + '/settlements/'+environment.settlementId, {", + " \"participants\": [", + " {", + " \"id\": dfspsaccx.dfspid,", + " \"accounts\": [", + " {", + " \"id\": dfspsaccx.dfspaccid,", + " \"reason\": \"Transfers reserved\",", + " \"state\": \"PS_TRANSFERS_RESERVED\"", + " }", + " ]", + " }", + " ]", + " },config) ", + "console.log(callbackpayer.data); ", + "}", + "}else{", + " console.log(\"Window is empty\")", + "}", + "/*res.participants.map(participant => {", + " participant.accounts.filter(account => account.netSettlementAmount.currency === pm.environment.get('currency2'))", + " .forEach(curAccount => {*/", + " " + ] + }, + "preRequest": { + "exec": [ + "" + ] + } + } + }, + { + "id": 5, + "description": "check state for participants after prepare", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "settlements" + }, + "operationPath": "/settlements/{id}", + "path": "/settlements/{$environment.settlementId}", + "method": "get", + "params": { + "id": "{$environment.settlementId}" + }, + "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "scriptingEngine": "javascript", + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code status is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "Check status PS_TRANSFERS_RESERVED", + "exec": [ + "expect(response.body.state).to.eql(\"PS_TRANSFERS_RESERVED\");" + ] + }, + { + "id": 3, + "description": "Check status for window is PENDING SETTLEMENT", + "exec": [ + " expect(response.body.settlementWindows[0].state).to.eql(\"PENDING_SETTLEMENT\");" + ] + }, + { + "id": 4, + "description": "Account state is PS_TRANSFERS_RESERVEDfor all accounts", + "exec": [ + "expect(environment.controlvar).to.equal(true)" + ] + } + ] + }, + "scripts": { + "postRequest": { + "exec": [ + "//Boolean isok = false;\r", + "var res = response.body;\r", + "var isok = true;\r", + "\r", + "try{\r", + "res.participants.map(function (participant) {\r", + " participant.accounts.filter(account => account.netSettlementAmount.currency === environment.currency2).every(curAccount => {\r", + " if(isok === true){ \r", + " if(curAccount.state === \"PS_TRANSFERS_RESERVED\"){\r", + " isok= true;\r", + " \r", + " \r", + " \r", + " }else{\r", + " isok= false;\r", + " // console.log(isok);\r", + " \r", + " }\r", + " } \r", + " })\r", + "})\r", + "\r", + "}catch(exception){\r", + " console.log(exception);\r", + "}\r", + "\r", + "environment.controlvar = isok;" + ] + } + } + } + ] + }, + { + "id": 15, + "name": "Store Settlement&Position Account Balances After Reserve", + "requests": [ + { + "id": 1, + "description": "Get balances for testfsp1", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.SIM1_NAME}/accounts", + "method": "get", + "params": { + "name": "{$inputs.SIM1_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "testfsp1 settlement account balance before and after reserve should be the same", + "exec": [ + "expect(environment.testfsp1SettleAccountBalanceAfterReserve).to.equal(environment.testfsp1SettleAccountBalanceAfterTransfer);" + ] + }, + { + "id": 3, + "description": "testfsp1 position account balance before and after reserve should be the same.", + "exec": [ + "expect(environment.testfsp1PositionAccountBalanceAfterReserve).to.equal(environment.testfsp1PositionAccountBalanceAfterTransfer);" + ] + } + ] + }, + "scriptingEngine": "javascript", + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.currency2).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"SETTLEMENT\")", + " {", + "environment.testfsp1SettleAccountBalanceAfterReserve= curAccount.value ", + "}", + " if(curAccount.ledgerAccountType === \"POSITION\") ", + " {", + "environment.testfsp1PositionAccountBalanceAfterReserve= curAccount.value;", + "}", + "", + "})" + ] + } + } + }, + { + "id": 2, + "description": "Get balances for testfsp2", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.SIM2_NAME}/accounts", + "method": "get", + "params": { + "name": "{$inputs.SIM2_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "testfsp2 settlement account balance before and after reserve should be the same", + "exec": [ + "expect(environment.testfsp2SettleAccountBalanceAfterReserve).to.equal(environment.testfsp2SettleAccountBalanceBeforeTransfer);" + ] + }, + { + "id": 3, + "description": "testfsp2 position account balance before and after reserve should be the same.", + "exec": [ + "expect(environment.testfsp2PositionAccountBalanceAfterReserve).to.equal(environment.testfsp2PositionAccountBalanceBeforeTransfer);" + ] + } + ] + }, + "scriptingEngine": "javascript", + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.currency2).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"SETTLEMENT\")", + " {", + "environment.testfsp2SettleAccountBalanceAfterReserve= curAccount.value ", + "}", + " if(curAccount.ledgerAccountType === \"POSITION\") ", + " {", + "environment.testfsp2PositionAccountBalanceAfterReserve= curAccount.value;", + "}", + "", + "})" + ] + } + } + }, + { + "id": 3, + "description": "Get balances for payerfsp", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.SIMPAYER_NAME}/accounts", + "method": "get", + "params": { + "name": "{$inputs.SIMPAYER_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "payerfsp settlement account balance before and after reserve should be the same", + "exec": [ + "expect(environment.payerfspSettleAccountBalanceAfterReserve).to.equal(environment.payerfspSettleAccountBalanceAfterTransfer);" + ] + }, + { + "id": 3, + "description": "payerfsp position account balance before and after reserve should be the same.", + "exec": [ + "expect(environment.payerfspPositionAccountBalanceAfterReserve).to.equal(environment.payerfspPositionAccountBalanceBeforeTransfer);" + ] + } + ] + }, + "scriptingEngine": "javascript", + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.currency2).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"SETTLEMENT\")", + " {", + "environment.payerfspSettleAccountBalanceAfterReserve= curAccount.value ", + "}", + " if(curAccount.ledgerAccountType === \"POSITION\") ", + " {", + "environment.payerfspPositionAccountBalanceAfterReserve= curAccount.value;", + "}", + "", + "})" + ] + } + } + }, + { + "id": 4, + "description": "Get balances for payeefsp", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.payeefsp}/accounts", + "method": "get", + "params": { + "name": "{$inputs.payeefsp}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "payeefsp settlement account balance before and after Reserve should be the same", + "exec": [ + "expect(environment.payeefspSettleAccountBalanceAfterReserve).to.equal(environment.payeefspSettleAccountBalanceAfterTransfer);" + ] + }, + { + "id": 3, + "description": "payeefsp position account balance before and after Reserve should be the same.", + "exec": [ + "expect(environment.payeefspPositionAccountBalanceAfterReserve).to.equal(environment.payeefspPositionAccountBalanceAfterTransfer);" + ] + } + ] + }, + "scriptingEngine": "javascript", + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.currency2).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"SETTLEMENT\")", + " {", + "environment.payeefspSettleAccountBalanceAfterReserve= curAccount.value ", + "}", + " if(curAccount.ledgerAccountType === \"POSITION\") ", + " {", + "environment.payeefspPositionAccountBalanceAfterReserve= curAccount.value;", + "}", + "", + "})" + ] + } + } + } + ] + }, + { + "id": 16, + "name": "commit-settlement", + "requests": [ + { + "id": 4, + "description": "commit Settlement", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "settlements" + }, + "operationPath": "/settlements/{id}", + "path": "/settlements/{$environment.settlementId}", + "method": "get", + "params": { + "id": "{$environment.settlementId}" + }, + "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code status is 200", + "exec": [ + "//if(environment.WINDOWISEMPTY === false){", + "expect(response.status).to.equal(200)", + "//}" + ] + } + ] + }, + "scriptingEngine": "javascript", + "delay": "2500", + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "console.log(environment.settlementId);", + "//environment.settlementId = 6;", + "var i=0;", + "var dfspsacc = [];", + "var callbackpayer;", + "", + "environment.winstate = res.settlementWindows[0].state;", + "", + "console.log(environment.winstate);", + "if(environment.winstate===\"PENDING_SETTLEMENT\"){", + "", + "res.participants.map(function (participant) {", + " participant.accounts.filter(account => account.netSettlementAmount.currency === environment.currency2).forEach(curAccount => {", + "//for(const curAccount of account) { ", + "", + " dfspsacc[i] = {", + " dfspid: participant.id,", + " dfspaccid: curAccount.id ", + " }", + " i++;", + "//}", + "})", + " })", + " ", + "", + "const config = { headers: {'Content-Type': 'application/json','FSPIOP-Source': 'testingtoolkitdfsp'} };", + "for(let dfspsaccx of dfspsacc){", + " console.log(dfspsaccx.dfspid,dfspsaccx.dfspaccid)", + "callbackpayer = await axios.put(environment.HOST_CENTRAL_SETTLEMENT + '/settlements/'+environment.settlementId, {", + " \"participants\": [", + " {", + " \"id\": dfspsaccx.dfspid,", + " \"accounts\": [", + " {", + " \"id\": dfspsaccx.dfspaccid,", + " \"reason\": \"Transfers committed\",", + " \"state\": \"PS_TRANSFERS_COMMITTED\"", + " }", + " ]", + " }", + " ]", + " },config) ", + "console.log(callbackpayer.data); ", + "}", + "}else{", + " console.log(\"Window is empty\")", + "}", + "/*res.participants.map(participant => {", + " participant.accounts.filter(account => account.netSettlementAmount.currency === pm.environment.get('currency2'))", + " .forEach(curAccount => {*/", + " " + ] + }, + "preRequest": { + "exec": [ + "" + ] + } + } + }, + { + "id": 5, + "description": "check state for participants after commit", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "settlements" + }, + "operationPath": "/settlements/{id}", + "path": "/settlements/{$environment.settlementId}", + "method": "get", + "params": { + "id": "{$environment.settlementId}" + }, + "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "scriptingEngine": "javascript", + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code status is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "Check status PS_TRANSFERS_COMMITTED", + "exec": [ + "expect(response.body.state).to.eql(\"PS_TRANSFERS_COMMITTED\");" + ] + }, + { + "id": 3, + "description": "Check status for window is PENDING SETTLEMENT", + "exec": [ + " expect(response.body.settlementWindows[0].state).to.eql(\"PENDING_SETTLEMENT\");" + ] + }, + { + "id": 4, + "description": "Account state is PS_TRANSFERS_COMMITTED for all accounts", + "exec": [ + "expect(environment.controlvar).to.equal(true)" + ] + } + ] + }, + "scripts": { + "postRequest": { + "exec": [ + "//Boolean isok = false;\r", + "var res = response.body;\r", + "var isok = true;\r", + "\r", + "try{\r", + "res.participants.map(function (participant) {\r", + " participant.accounts.filter(account => account.netSettlementAmount.currency === environment.currency2).every(curAccount => {\r", + " if(isok === true){ \r", + " if(curAccount.state === \"PS_TRANSFERS_COMMITTED\"){\r", + " isok= true;\r", + " \r", + " \r", + " \r", + " }else{\r", + " isok= false;\r", + " // console.log(isok);\r", + " \r", + " }\r", + " } \r", + " })\r", + "})\r", + "\r", + "}catch(exception){\r", + " console.log(exception);\r", + "}\r", + "\r", + "environment.controlvar = isok;" + ] + } + } + } + ] + }, + { + "id": 17, + "name": "Store Settlement&Position Account Balances After commit", + "requests": [ + { + "id": 1, + "description": "Get balances for testfsp1", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.SIM1_NAME}/accounts", + "method": "get", + "params": { + "name": "{$inputs.SIM1_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "testfsp1 settlement account balance before and after Commit should be the same", + "exec": [ + "expect(environment.testfsp1SettleAccountBalanceAfterCommit).to.equal(environment.testfsp1SettleAccountBalanceAfterTransfer);" + ] + }, + { + "id": 3, + "description": "testfsp1 position account balance before and after Commit should be the same.", + "exec": [ + "expect(environment.testfsp1PositionAccountBalanceAfterCommit).to.equal(environment.testfsp1PositionAccountBalanceBeforeTransfer);" + ] + } + ] + }, + "scriptingEngine": "javascript", + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.currency2).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"SETTLEMENT\")", + " {", + "environment.testfsp1SettleAccountBalanceAfterCommit= curAccount.value ", + "}", + " if(curAccount.ledgerAccountType === \"POSITION\") ", + " {", + "environment.testfsp1PositionAccountBalanceAfterCommit= curAccount.value;", + "}", + "", + "})" + ] + } + } + }, + { + "id": 2, + "description": "Get balances for testfsp2", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.SIM2_NAME}/accounts", + "method": "get", + "params": { + "name": "{$inputs.SIM2_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "testfsp2 settlement account balance before and after Commit should be the same", + "exec": [ + "expect(environment.testfsp2SettleAccountBalanceAfterCommit).to.equal(environment.testfsp2SettleAccountBalanceBeforeTransfer);" + ] + }, + { + "id": 3, + "description": "testfsp2 position account balance before and after Commit should be the same.", + "exec": [ + "expect(environment.testfsp2PositionAccountBalanceAfterCommit).to.equal(environment.testfsp2PositionAccountBalanceBeforeTransfer);" + ] + } + ] + }, + "scriptingEngine": "javascript", + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.currency2).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"SETTLEMENT\")", + " {", + "environment.testfsp2SettleAccountBalanceAfterCommit= curAccount.value ", + "}", + " if(curAccount.ledgerAccountType === \"POSITION\") ", + " {", + "environment.testfsp2PositionAccountBalanceAfterCommit= curAccount.value;", + "}", + "", + "})" + ] + } + } + }, + { + "id": 3, + "description": "Get balances for payerfsp", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.SIMPAYER_NAME}/accounts", + "method": "get", + "params": { + "name": "{$inputs.SIMPAYER_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "payerfsp settlement account balance before and after Commit should be the same", + "exec": [ + "expect(environment.payerfspSettleAccountBalanceAfterCommit).to.equal(environment.payerfspSettleAccountBalanceAfterTransfer);" + ] + }, + { + "id": 3, + "description": "payerfsp position account balance before and after Commit should be the same.", + "exec": [ + "expect(environment.payerfspPositionAccountBalanceAfterCommit).to.equal(environment.payerfspPositionAccountBalanceBeforeTransfer);" + ] + } + ] + }, + "scriptingEngine": "javascript", + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.currency2).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"SETTLEMENT\")", + " {", + "environment.payerfspSettleAccountBalanceAfterCommit= curAccount.value ", + "}", + " if(curAccount.ledgerAccountType === \"POSITION\") ", + " {", + "environment.payerfspPositionAccountBalanceAfterCommit= curAccount.value;", + "}", + "", + "})" + ] + } + } + }, + { + "id": 4, + "description": "Get balances for payeefsp", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.payeefsp}/accounts", + "method": "get", + "params": { + "name": "{$inputs.payeefsp}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "payeefsp settlement account balance before and after Commit should be the same", + "exec": [ + "expect(environment.payeefspSettleAccountBalanceAfterCommit).to.equal(environment.payeefspSettleAccountBalanceAfterTransfer);" + ] + }, + { + "id": 3, + "description": "payeefsp position account balance before and after Commit should be the same.", + "exec": [ + "expect(environment.payeefspPositionAccountBalanceAfterCommit).to.equal(environment.payeefspPositionAccountBalanceBeforeTransfer);" + ] + } + ] + }, + "scriptingEngine": "javascript", + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.currency2).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"SETTLEMENT\")", + " {", + "environment.payeefspSettleAccountBalanceAfterCommit= curAccount.value ", + "}", + " if(curAccount.ledgerAccountType === \"POSITION\") ", + " {", + "environment.payeefspPositionAccountBalanceAfterCommit= curAccount.value;", + "}", + "", + "})" + ] + } + } + }, + { + "id": 5, + "description": "hub account balance check", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/Hub/accounts", + "method": "get", + "params": { + "name": "Hub" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "hub reconciliation account balance before transfer and after commit should be the same.", + "exec": [ + "expect(environment.hubReconciliationAccountBalanceAfterCommit).to.equal(environment.hubReconciliationAccountBalanceBeforeTransfer);" + ] + }, + { + "id": 3, + "description": "hub multilateral account balance before transfer and after commit should be the same.", + "exec": [ + "expect(environment.hubMultilateralAccountBalanceAfterCommit).to.equal(environment.hubMultilateralAccountBalanceBeforeTransfer);" + ] + } + ] + }, + "scriptingEngine": "javascript", + "scripts": { + "postRequest": { + "exec": [ + "var jsonData = response.body;\r", + "var hubReconciliationAccountBalanceAfterCommit;\r", + "var hubMultilateralAccountBalanceAfterCommit;\r", + "jsonData\r", + " .filter(account => account.currency === environment.currency2)\r", + " .forEach(curAccount => {\r", + " if(curAccount.ledgerAccountType === \"HUB_RECONCILIATION\") {\r", + " hubReconciliationAccountBalanceAfterCommit = curAccount.value;\r", + " }\r", + " if(curAccount.ledgerAccountType === \"HUB_MULTILATERAL_SETTLEMENT\") {\r", + " hubMultilateralAccountBalanceAfterCommit = curAccount.value;\r", + " }\r", + " })\r", + " \r", + "environment.hubReconciliationAccountBalanceAfterCommit = hubReconciliationAccountBalanceAfterCommit;\r", + "\r", + "environment.hubMultilateralAccountBalanceAfterCommit = hubMultilateralAccountBalanceAfterCommit;" + ] + } + } + } + ] + }, + { + "id": 18, + "name": "settle-settlement", + "requests": [ + { + "id": 4, + "description": "settle Settlement", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "settlements" + }, + "operationPath": "/settlements/{id}", + "path": "/settlements/{$environment.settlementId}", + "method": "get", + "params": { + "id": "{$environment.settlementId}" + }, + "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code status is 200", + "exec": [ + "//if(environment.WINDOWISEMPTY === false){", + "expect(response.status).to.equal(200)", + "//}" + ] + } + ] + }, + "scriptingEngine": "javascript", + "delay": "2500", + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "console.log(environment.settlementId);", + "//environment.settlementId = 6;", + "var i=0;", + "var dfspsacc = [];", + "var callbackpayer;", + "", + "environment.winstate = res.settlementWindows[0].state;", + "", + "console.log(environment.winstate);", + "if(environment.winstate===\"PENDING_SETTLEMENT\"){", + "", + "res.participants.map(function (participant) {", + " participant.accounts.filter(account => account.netSettlementAmount.currency === environment.currency2).forEach(curAccount => {", + "//for(const curAccount of account) { ", + "", + " dfspsacc[i] = {", + " dfspid: participant.id,", + " dfspaccid: curAccount.id ", + " }", + " i++;", + "//}", + "})", + " })", + " ", + "", + "const config = { headers: {'Content-Type': 'application/json','FSPIOP-Source': 'testingtoolkitdfsp'} };", + "for(let dfspsaccx of dfspsacc){", + " console.log(dfspsaccx.dfspid,dfspsaccx.dfspaccid)", + "callbackpayer = await axios.put(environment.HOST_CENTRAL_SETTLEMENT + '/settlements/'+environment.settlementId, {", + " \"participants\": [", + " {", + " \"id\": dfspsaccx.dfspid,", + " \"accounts\": [", + " {", + " \"id\": dfspsaccx.dfspaccid,", + " \"reason\": \"Transfers settled for payer\",", + " \"state\": \"SETTLED\"", + " }", + " ]", + " }", + " ]", + " },config) ", + "console.log(callbackpayer.data); ", + "}", + "}else{", + " console.log(\"Window is empty\")", + "}", + "/*res.participants.map(participant => {", + " participant.accounts.filter(account => account.netSettlementAmount.currency === pm.environment.get('currency2'))", + " .forEach(curAccount => {*/", + " " + ] + }, + "preRequest": { + "exec": [ + "" + ] + } + } + }, + { + "id": 5, + "description": "check state for participants after commit", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "settlements" + }, + "operationPath": "/settlements/{id}", + "path": "/settlements/{$environment.settlementId}", + "method": "get", + "params": { + "id": "{$environment.settlementId}" + }, + "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "scriptingEngine": "javascript", + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code status is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "Check status SETTLED", + "exec": [ + "expect(response.body.state).to.eql(\"SETTLED\");" + ] + }, + { + "id": 3, + "description": "Check status for window is PENDING SETTLEMENT", + "exec": [ + " expect(response.body.settlementWindows[0].state).to.eql(\"SETTLED\");" + ] + }, + { + "id": 4, + "description": "Account state is SETTLED for all accounts", + "exec": [ + "expect(environment.controlvar).to.equal(true)" + ] + } + ] + }, + "scripts": { + "postRequest": { + "exec": [ + "//Boolean isok = false;\r", + "var res = response.body;\r", + "var isok = true;\r", + "\r", + "try{\r", + "res.participants.map(function (participant) {\r", + " participant.accounts.filter(account => account.netSettlementAmount.currency === environment.currency2).every(curAccount => {\r", + " if(isok === true){ \r", + " if(curAccount.state === \"SETTLED\"){\r", + " isok= true;\r", + " \r", + " \r", + " \r", + " }else{\r", + " isok= false;\r", + " // console.log(isok);\r", + " \r", + " }\r", + " } \r", + " })\r", + "})\r", + "\r", + "}catch(exception){\r", + " console.log(exception);\r", + "}\r", + "\r", + "environment.controlvar = isok;" + ] + } + } + } + ] + }, + { + "id": 19, + "name": "Store Settlement&Position Account Balances After Settle", + "requests": [ + { + "id": 1, + "description": "Get balances for testfsp1", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.SIM1_NAME}/accounts", + "method": "get", + "params": { + "name": "{$inputs.SIM1_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "testfsp1 settlement account balance before and after Settle should be the same", + "exec": [ + "expect(environment.testfsp1SettleAccountBalanceAfterSettle).to.equal(environment.testfsp1SettleAccountBalanceBeforeTransfer);" + ] + }, + { + "id": 3, + "description": "testfsp1 position account balance before and after Settle should be the same.", + "exec": [ + "expect(environment.testfsp1PositionAccountBalanceAfterSettle).to.equal(environment.testfsp1PositionAccountBalanceBeforeTransfer);" + ] + } + ] + }, + "scriptingEngine": "javascript", + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.currency2).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"SETTLEMENT\")", + " {", + "environment.testfsp1SettleAccountBalanceAfterSettle= curAccount.value ", + "}", + " if(curAccount.ledgerAccountType === \"POSITION\") ", + " {", + "environment.testfsp1PositionAccountBalanceAfterSettle= curAccount.value;", + "}", + "", + "})" + ] + } + } + }, + { + "id": 2, + "description": "Get balances for testfsp2", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.SIM2_NAME}/accounts", + "method": "get", + "params": { + "name": "{$inputs.SIM2_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "testfsp2 settlement account balance before and after Settle should be the same", + "exec": [ + "expect(environment.testfsp2SettleAccountBalanceAfterSettle).to.equal(environment.testfsp2SettleAccountBalanceBeforeTransfer);" + ] + }, + { + "id": 3, + "description": "testfsp2 position account balance before and after Settle should be the same.", + "exec": [ + "expect(environment.testfsp2PositionAccountBalanceAfterSettle).to.equal(environment.testfsp2PositionAccountBalanceBeforeTransfer);" + ] + } + ] + }, + "scriptingEngine": "javascript", + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.currency2).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"SETTLEMENT\")", + " {", + "environment.testfsp2SettleAccountBalanceAfterSettle= curAccount.value ", + "}", + " if(curAccount.ledgerAccountType === \"POSITION\") ", + " {", + "environment.testfsp2PositionAccountBalanceAfterSettle= curAccount.value;", + "}", + "", + "})" + ] + } + } + }, + { + "id": 3, + "description": "Get balances for payerfsp", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.SIMPAYER_NAME}/accounts", + "method": "get", + "params": { + "name": "{$inputs.SIMPAYER_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "payerfsp settlement account balance before and after Settle should be the same", + "exec": [ + "expect(environment.payerfspSettleAccountBalanceAfterSettle).to.equal(environment.payerfspSettleAccountBalanceAfterTransfer);" + ] + }, + { + "id": 3, + "description": "payerfsp position account balance before and after Settle should be the same.", + "exec": [ + "expect(environment.payerfspPositionAccountBalanceAfterSettle).to.equal(environment.payerfspPositionAccountBalanceBeforeTransfer);" + ] + } + ] + }, + "scriptingEngine": "javascript", + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.currency2).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"SETTLEMENT\")", + " {", + "environment.payerfspSettleAccountBalanceAfterSettle= curAccount.value ", + "}", + " if(curAccount.ledgerAccountType === \"POSITION\") ", + " {", + "environment.payerfspPositionAccountBalanceAfterSettle= curAccount.value;", + "}", + "", + "})" + ] + } + } + }, + { + "id": 4, + "description": "Get balances for payeefsp", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.payeefsp}/accounts", + "method": "get", + "params": { + "name": "{$inputs.payeefsp}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "payeefsp settlement account balance before and after Settle should be the same", + "exec": [ + "expect(environment.payeefspSettleAccountBalanceAfterSettle).to.equal(environment.payeefspSettleAccountBalanceAfterTransfer);" + ] + }, + { + "id": 3, + "description": "payeefsp position account balance before and after Settle should be the same.", + "exec": [ + "expect(environment.payeefspPositionAccountBalanceAfterSettle).to.equal(environment.payeefspPositionAccountBalanceBeforeTransfer);" + ] + } + ] + }, + "scriptingEngine": "javascript", + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "", + "res.filter(account => account.currency === environment.currency2).forEach(curAccount => {", + " if(curAccount.ledgerAccountType === \"SETTLEMENT\")", + " {", + "environment.payeefspSettleAccountBalanceAfterSettle= curAccount.value ", + "}", + " if(curAccount.ledgerAccountType === \"POSITION\") ", + " {", + "environment.payeefspPositionAccountBalanceAfterSettle= curAccount.value;", + "}", + "", + "})" + ] + } + } + } + ] + } + ] +} \ No newline at end of file diff --git a/collections/hub/golden_path/settlement_management/mixed_settlement_model.json b/collections/hub/golden_path/settlement_management/mixed_settlement_model.json new file mode 100644 index 00000000..4e62acff --- /dev/null +++ b/collections/hub/golden_path/settlement_management/mixed_settlement_model.json @@ -0,0 +1,7061 @@ +{ + "name": "multi", + "test_cases": [ + { + "id": 1, + "name": "Settlement_management", + "requests": [ + { + "id": 3, + "description": "Get payerfsp account id", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.SIMPAYER_NAME}/accounts", + "method": "get", + "params": { + "name": "{$inputs.SIMPAYER_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "Account id not null", + "exec": [ + "expect(environment.participant1accountid).to.not.be.null;" + ] + } + ] + }, + "scriptingEngine": "javascript", + "scripts": { + "postRequest": { + "exec": [ + "\r", + "var jsonData = response.body;\r", + "console.log(jsonData);\r", + "const {$inputs.SIMPAYER_NAME} = {}\r", + "\r", + "for (const i in jsonData) {\r", + " if (jsonData[i].ledgerAccountType === 'POSITION') {\r", + " {$inputs.SIMPAYER_NAME}[jsonData[i].currency] = jsonData[i].id\r", + " environment.accounts = {\r", + " ...environment.accounts,\r", + " {$inputs.SIMPAYER_NAME}\r", + " }\r", + " };\r", + "}\r", + "\r", + "console.log(environment.accounts.{$inputs.SIMPAYER_NAME});" + ] + }, + "preRequest": { + "exec": [ + "" + ] + } + } + }, + { + "id": 4, + "description": "Active account for currency for payerfsp", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts/{id}", + "path": "/participants/{$inputs.SIMPAYER_NAME}/accounts/{$requestVariables.currentId}", + "method": "put", + "params": { + "name": "{$inputs.SIMPAYER_NAME}", + "id": "{$requestVariables.currentId}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Content-Type": "application/json", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + } + ] + }, + "body": { + "isActive": true + }, + "scriptingEngine": "javascript", + "scripts": { + "preRequest": { + "exec": [ + "requestVariables.currentId = environment.accounts[environment.SIMPAYER_NAME][environment.currency]", + "", + "console.log(requestVariables.currentId)" + ] + } + } + }, + { + "id": 5, + "description": "Active account for currency2 for payerfsp", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts/{id}", + "path": "/participants/{$inputs.SIMPAYER_NAME}/accounts/{$requestVariables.currentId}", + "method": "put", + "params": { + "name": "{$inputs.SIMPAYER_NAME}", + "id": "{$requestVariables.currentId}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Content-Type": "application/json", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + } + ] + }, + "body": { + "isActive": true + }, + "scriptingEngine": "javascript", + "scripts": { + "preRequest": { + "exec": [ + "requestVariables.currentId = environment.accounts[environment.SIMPAYER_NAME][environment.currency2]", + "", + "console.log(requestVariables.currentId)" + ] + } + } + }, + { + "id": 6, + "description": "Get payeefsp account id", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.SIMPAYEE_NAME}/accounts", + "method": "get", + "params": { + "name": "{$inputs.SIMPAYEE_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "Account id not null", + "exec": [ + "expect(environment.participant1accountid).to.not.be.null;" + ] + } + ] + }, + "scriptingEngine": "javascript", + "scripts": { + "postRequest": { + "exec": [ + "\r", + "var jsonData = response.body;\r", + "console.log(jsonData);\r", + "const {$inputs.SIMPAYEE_NAME} = {}\r", + "\r", + "for (const i in jsonData) {\r", + " if (jsonData[i].ledgerAccountType === 'POSITION') {\r", + " {$inputs.SIMPAYEE_NAME}[jsonData[i].currency] = jsonData[i].id\r", + " environment.accounts = {\r", + " ...environment.accounts,\r", + " {$inputs.SIMPAYEE_NAME}\r", + " }\r", + " };\r", + "}\r", + "\r", + "console.log(environment.accounts.{$inputs.SIMPAYEE_NAME});" + ] + }, + "preRequest": { + "exec": [ + "" + ] + } + } + }, + { + "id": 7, + "description": "Active account for currency for payeefsp", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts/{id}", + "path": "/participants/{$inputs.SIMPAYER_NAME}/accounts/{$requestVariables.currentId}", + "method": "put", + "params": { + "name": "{$inputs.SIMPAYEE_NAME}", + "id": "{$requestVariables.currentId}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Content-Type": "application/json", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + } + ] + }, + "body": { + "isActive": true + }, + "scriptingEngine": "javascript", + "scripts": { + "preRequest": { + "exec": [ + "requestVariables.currentId = environment.accounts[environment.SIMPAYEE_NAME][environment.currency]", + "", + "console.log(requestVariables.currentId)" + ] + } + } + }, + { + "id": 8, + "description": "Active account for currency2 for payeefsp", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts/{id}", + "path": "/participants/{$inputs.SIMPAYEE_NAME}/accounts/{$requestVariables.currentId}", + "method": "put", + "params": { + "name": "{$inputs.SIMPAYEE_NAME}", + "id": "{$requestVariables.currentId}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Content-Type": "application/json", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + } + ] + }, + "body": { + "isActive": true + }, + "scriptingEngine": "javascript", + "scripts": { + "preRequest": { + "exec": [ + "requestVariables.currentId = environment.accounts[environment.SIMPAYEE_NAME][environment.currency2]", + "", + "console.log(requestVariables.currentId)" + ] + } + } + }, + { + "id": 9, + "description": "Get testfsp1 account id", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.SIM1_NAME}/accounts", + "method": "get", + "params": { + "name": "{$inputs.SIM1_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "Account id not null", + "exec": [ + "expect(environment.participant1accountid).to.not.be.null;" + ] + } + ] + }, + "scriptingEngine": "javascript", + "scripts": { + "postRequest": { + "exec": [ + "\r", + "var jsonData = response.body;\r", + "console.log(jsonData);\r", + "const {$inputs.SIM1_NAME} = {}\r", + "\r", + "for (const i in jsonData) {\r", + " if (jsonData[i].ledgerAccountType === 'POSITION') {\r", + " {$inputs.SIM1_NAME}[jsonData[i].currency] = jsonData[i].id\r", + " environment.accounts = {\r", + " ...environment.accounts,\r", + " {$inputs.SIM1_NAME}\r", + " }\r", + " };\r", + "}\r", + "\r", + "console.log(environment.accounts.{$inputs.SIM1_NAME});" + ] + }, + "preRequest": { + "exec": [ + "" + ] + } + } + }, + { + "id": 10, + "description": "Active account for currency for testfsp1", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts/{id}", + "path": "/participants/{$inputs.SIM1_NAME}/accounts/{$requestVariables.currentId}", + "method": "put", + "params": { + "name": "{$inputs.SIM1_NAME}", + "id": "{$requestVariables.currentId}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Content-Type": "application/json", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + } + ] + }, + "body": { + "isActive": true + }, + "scriptingEngine": "javascript", + "scripts": { + "preRequest": { + "exec": [ + "requestVariables.currentId = environment.accounts[environment.SIM1_NAME][environment.currency]", + "", + "console.log(requestVariables.currentId)" + ] + } + } + }, + { + "id": 11, + "description": "Active account for currency2 for testfsp1", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts/{id}", + "path": "/participants/{$inputs.SIM1_NAME}/accounts/{$requestVariables.currentId}", + "method": "put", + "params": { + "name": "{$inputs.SIM1_NAME}", + "id": "{$requestVariables.currentId}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Content-Type": "application/json", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + } + ] + }, + "body": { + "isActive": true + }, + "scriptingEngine": "javascript", + "scripts": { + "preRequest": { + "exec": [ + "requestVariables.currentId = environment.accounts[environment.SIM1_NAME][environment.currency2]", + "", + "console.log(requestVariables.currentId)" + ] + } + } + }, + { + "id": 12, + "description": "Get testfsp2 account id", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.SIM2_NAME}/accounts", + "method": "get", + "params": { + "name": "{$inputs.SIM2_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "Account id not null", + "exec": [ + "expect(environment.participant1accountid).to.not.be.null;" + ] + } + ] + }, + "scriptingEngine": "javascript", + "scripts": { + "postRequest": { + "exec": [ + "\r", + "var jsonData = response.body;\r", + "console.log(jsonData);\r", + "const {$inputs.SIM2_NAME} = {}\r", + "\r", + "for (const i in jsonData) {\r", + " if (jsonData[i].ledgerAccountType === 'POSITION') {\r", + " {$inputs.SIM2_NAME}[jsonData[i].currency] = jsonData[i].id\r", + " environment.accounts = {\r", + " ...environment.accounts,\r", + " {$inputs.SIM2_NAME}\r", + " }\r", + " };\r", + "}\r", + "\r", + "console.log(environment.accounts.{$inputs.SIM2_NAME});" + ] + }, + "preRequest": { + "exec": [ + "" + ] + } + } + }, + { + "id": 13, + "description": "Active account for currency for testfsp2", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts/{id}", + "path": "/participants/{$inputs.SIM2_NAME}/accounts/{$requestVariables.currentId}", + "method": "put", + "params": { + "name": "{$inputs.SIM2_NAME}", + "id": "{$requestVariables.currentId}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Content-Type": "application/json", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + } + ] + }, + "body": { + "isActive": true + }, + "scriptingEngine": "javascript", + "scripts": { + "preRequest": { + "exec": [ + "requestVariables.currentId = environment.accounts[environment.SIM2_NAME][environment.currency]", + "", + "console.log(requestVariables.currentId)" + ] + } + } + }, + { + "id": 14, + "description": "Active account for currency2 for testfsp2", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts/{id}", + "path": "/participants/{$inputs.SIM2_NAME}/accounts/{$requestVariables.currentId}", + "method": "put", + "params": { + "name": "{$inputs.SIM2_NAME}", + "id": "{$requestVariables.currentId}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Content-Type": "application/json", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + } + ] + }, + "body": { + "isActive": true + }, + "scriptingEngine": "javascript", + "scripts": { + "preRequest": { + "exec": [ + "requestVariables.currentId = environment.accounts[environment.SIM2_NAME][environment.currency2]", + "", + "console.log(requestVariables.currentId)" + ] + } + } + } + ] + }, + { + "id": 2, + "name": "Create Settlement on the current open window", + "requests": [ + { + "id": 1, + "description": "Get Existing Open Window", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "settlements" + }, + "operationPath": "/settlementWindows", + "path": "/settlementWindows", + "method": "get", + "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", + "queryParams": { + "state": "OPEN" + }, + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "State should be OPEN", + "exec": [ + "expect(environment.openWindowstate).to.equal(\"OPEN\")" + ] + } + ] + }, + "scriptingEngine": "javascript", + "scripts": { + "postRequest": { + "exec": [ + "var jsonData = response.body;", + "//console.log(jsonData.state);", + "", + "environment.openWindowID=jsonData[0].settlementWindowId;", + "environment.openWindowstate=jsonData[0].state;", + "", + "console.log(environment.openWindowID);" + ] + } + } + }, + { + "id": 2, + "description": "Close existent window", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "settlements" + }, + "operationPath": "/settlementWindows/{id}", + "path": "/settlementWindows/{$environment.openWindowID}", + "method": "post", + "params": { + "id": "{$environment.openWindowID}" + }, + "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", + "body": { + "state": "CLOSED", + "reason": "string" + }, + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 200 or 400", + "exec": [ + "if(response.status === 400){", + " expect(response.status).to.equal(400)", + "}", + "else{", + " expect(response.status).to.equal(200)", + "}", + "", + "" + ] + }, + { + "id": 2, + "description": "New window State should be OPEN", + "exec": [ + "", + " if (response.status === 400) {", + " ", + "expect(response.body.errorInformation.errorCode).to.eql('3100');", + "expect(response.body.errorInformation.errorDescription).to.eql('Generic validation error - Window ' + environment.openWindowID + ' is empty');", + "}else{", + " ", + " ", + " expect(environment.openWindowstate).to.equal(\"OPEN\");", + "}", + "", + "", + "" + ] + } + ] + }, + "scriptingEngine": "javascript", + "scripts": { + "postRequest": { + "exec": [ + "var jsonData = response.body;", + "var rcode = Number(response.status);", + "//console.log(rcode);", + "", + "//if (rcode == 200){", + "environment.closedWindowID= Number(environment.openWindowID);", + "environment.openWindowstate=jsonData.state;", + "", + "console.log(environment.openWindowstate);", + "console.log(environment.closedWindowID);", + "//}" + ] + } + } + }, + { + "id": 3, + "description": "Create Settlement for Closed Window in deferred settlement model for currency", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "settlements" + }, + "operationPath": "/settlements", + "path": "/settlements", + "method": "post", + "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 200", + "exec": [ + "if(environment.WINDOWISEMPTY === false){", + "expect(response.status).to.equal(200)", + "}" + ] + }, + { + "id": 2, + "description": "Settlement State should be PENDING_SETTLEMENT", + "exec": [ + "if(environment.WINDOWISEMPTY === false){", + "expect(environment.winstate).to.equal(\"PENDING_SETTLEMENT\")", + "}" + ] + }, + { + "id": 3, + "description": "Number of associated windows should be 1", + "exec": [ + "if(environment.WINDOWISEMPTY === false){", + "expect(response.body.settlementWindows.length).to.equal(1)", + "}" + ] + }, + { + "id": 4, + "description": "Associated Settlement Window ID is the correct one", + "exec": [ + "if(environment.WINDOWISEMPTY === false){", + "expect(response.body.settlementWindows[0].id).to.equal(environment.closedWindowID)", + "}" + ] + }, + { + "id": 5, + "description": "Associated Settlement Window state should be PENDING_SETTLEMENT", + "exec": [ + "if(environment.WINDOWISEMPTY === false){", + "expect(response.body.settlementWindows[0].state).to.equal(\"PENDING_SETTLEMENT\")", + "}" + ] + } + ] + }, + "scriptingEngine": "javascript", + "body": { + "settlementModel": "{$requestVariables.settlementModel}", + "reason": "TESTING", + "settlementWindows": [ + { + "id": "{$requestVariables.closedWindowID}" + } + ] + }, + "scripts": { + "postRequest": { + "exec": [ + "var jsonData = response.body;", + "environment.settlementId = jsonData.id;", + "environment.winstate = jsonData.state;", + "", + "if (response.body.errorInformation.errorCode === \"3100\"){", + " ", + " environment.WINDOWISEMPTY = true;", + " console.log(\"Window is empty\");", + "}else{", + " environment.WINDOWISEMPTY = false;", + "}" + ] + }, + "preRequest": { + "exec": [ + "//environment.closedWindowID = 6;", + "requestVariables.closedWindowID = Number(environment.closedWindowID);", + "", + "/*requestVariables.closedWindowID = Number(environment.closedWindowID);", + "*/", + "", + "requestVariables.settlementModel = environment.settlementModels.deferred[environment.currency]", + "", + "console.log(requestVariables.settlementModel)" + ] + } + } + }, + { + "id": 4, + "description": "Prepare Settlement", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "settlements" + }, + "operationPath": "/settlements/{id}", + "path": "/settlements/{$environment.settlementId}", + "method": "get", + "params": { + "id": "{$environment.settlementId}" + }, + "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code status is 200", + "exec": [ + "if(environment.WINDOWISEMPTY === false){", + "expect(response.status).to.equal(200)", + "}" + ] + } + ] + }, + "scriptingEngine": "javascript", + "delay": "2500", + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "console.log(environment.settlementId);", + "//environment.settlementId = 6;", + "var i=0;", + "var dfspsacc = [];", + "var callbackpayer;", + "", + "environment.winstate = res.state;", + "if(environment.winstate===\"PENDING_SETTLEMENT\"){", + "", + "res.participants.map(function (participant) {", + " participant.accounts.filter(account => account.netSettlementAmount.currency === environment.SIMPAYER_CURRENCY).forEach(curAccount => {", + "//for(const curAccount of account) { ", + "", + " dfspsacc[i] = {", + " dfspid: participant.id,", + " dfspaccid: curAccount.id ", + " }", + " i++;", + "//}", + "})", + " })", + " ", + "", + "const config = { headers: {'Content-Type': 'application/json','FSPIOP-Source': 'testingtoolkitdfsp'} };", + "for(let dfspsaccx of dfspsacc){", + " console.log(dfspsaccx.dfspid,dfspsaccx.dfspaccid)", + "callbackpayer = await axios.put(environment.HOST_CENTRAL_SETTLEMENT + '/settlements/'+environment.settlementId, {", + " \"participants\": [", + " {", + " \"id\": dfspsaccx.dfspid,", + " \"accounts\": [", + " {", + " \"id\": dfspsaccx.dfspaccid,", + " \"reason\": \"Transfers recorded for payer\",", + " \"state\": \"PS_TRANSFERS_RECORDED\"", + " }", + " ]", + " }", + " ]", + " },config) ", + "console.log(callbackpayer.data); ", + "}", + "}else{", + " console.log(\"Window is empty\")", + "}", + "/*res.participants.map(participant => {", + " participant.accounts.filter(account => account.netSettlementAmount.currency === pm.environment.get('SIMPAYER_CURRENCY'))", + " .forEach(curAccount => {*/", + " " + ] + }, + "preRequest": { + "exec": [ + "" + ] + } + } + }, + { + "id": 5, + "description": "Reserve Settlement", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "settlements" + }, + "operationPath": "/settlements/{id}", + "path": "/settlements/{$environment.settlementId}", + "method": "get", + "params": { + "id": "{$environment.settlementId}" + }, + "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code status is 200", + "exec": [ + "if(environment.WINDOWISEMPTY === false){", + "expect(response.status).to.equal(200)", + "}" + ] + } + ] + }, + "scriptingEngine": "javascript", + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "//environment.settlementId = 1;", + "var i=0;", + "var dfspsacc = [];", + "var callbackpayer;", + "", + "environment.winstate = res.state;", + "", + "if(environment.winstate===\"PS_TRANSFERS_RECORDED\"){", + "", + "", + "res.participants.map(function (participant) {", + " participant.accounts.filter(account => account.netSettlementAmount.currency === environment.SIMPAYER_CURRENCY).forEach(curAccount => {", + "//for(const curAccount of account) { ", + "", + " dfspsacc[i] = {", + " dfspid: participant.id,", + " dfspaccid: curAccount.id ", + " }", + " i++;", + "//}", + "})", + " })", + " ", + "", + "const config = { headers: {'Content-Type': 'application/json','FSPIOP-Source': 'testingtoolkitdfsp'} };", + "for(let dfspsaccx of dfspsacc){", + " //console.log(dfspsaccx.dfspid,dfspsaccx.dfspaccid)", + "callbackpayer = await axios.put(environment.HOST_CENTRAL_SETTLEMENT + '/settlements/'+environment.settlementId, {", + " \"participants\": [", + " {", + " \"id\": dfspsaccx.dfspid,", + " \"accounts\": [", + " {", + " \"id\": dfspsaccx.dfspaccid,", + " \"reason\": \"Transfers reserved\",", + " \"state\": \"PS_TRANSFERS_RESERVED\"", + " }", + " ]", + " }", + " ]", + " },config) ", + "console.log(callbackpayer.data); ", + "}", + "}else{", + " console.log(\"Window is empty\")", + "}", + "/*res.participants.map(participant => {", + " participant.accounts.filter(account => account.netSettlementAmount.currency === pm.environment.get('SIMPAYER_CURRENCY'))", + " .forEach(curAccount => {*/", + " " + ] + } + } + }, + { + "id": 6, + "description": "Commit Settlement", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "settlements" + }, + "operationPath": "/settlements/{id}", + "path": "/settlements/{$environment.settlementId}", + "method": "get", + "params": { + "id": "{$environment.settlementId}" + }, + "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code status is 200", + "exec": [ + "if(environment.WINDOWISEMPTY === false){", + "expect(response.status).to.equal(200)", + "}" + ] + } + ] + }, + "scriptingEngine": "javascript", + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "//environment.settlementId = 1;", + "var i=0;", + "var dfspsacc = [];", + "var callbackpayer;", + "", + "environment.winstate = res.state;", + "", + "if(environment.winstate===\"PS_TRANSFERS_RESERVED\"){", + "", + "", + "res.participants.map(function (participant) {", + " participant.accounts.filter(account => account.netSettlementAmount.currency === environment.SIMPAYER_CURRENCY).forEach(curAccount => {", + "//for(const curAccount of account) { ", + "", + " dfspsacc[i] = {", + " dfspid: participant.id,", + " dfspaccid: curAccount.id ", + " }", + " i++;", + "//}", + "})", + " })", + " ", + "", + "const config = { headers: {'Content-Type': 'application/json','FSPIOP-Source': 'testingtoolkitdfsp'} };", + "for(let dfspsaccx of dfspsacc){", + " //console.log(dfspsaccx.dfspid,dfspsaccx.dfspaccid)", + "callbackpayer = await axios.put(environment.HOST_CENTRAL_SETTLEMENT + '/settlements/'+environment.settlementId, {", + " \"participants\": [", + " {", + " \"id\": dfspsaccx.dfspid,", + " \"accounts\": [", + " {", + " \"id\": dfspsaccx.dfspaccid,", + " \"reason\": \"Transfers committed\",", + " \"state\": \"PS_TRANSFERS_COMMITTED\"", + " }", + " ]", + " }", + " ]", + " },config) ", + "console.log(callbackpayer.data); ", + "}", + "}else{", + " console.log(\"Window is empty\")", + "}", + "/*res.participants.map(participant => {", + " participant.accounts.filter(account => account.netSettlementAmount.currency === pm.environment.get('SIMPAYER_CURRENCY'))", + " .forEach(curAccount => {*/", + " " + ] + } + } + }, + { + "id": 7, + "description": "Settle Settlement", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "settlements" + }, + "operationPath": "/settlements/{id}", + "path": "/settlements/{$environment.settlementId}", + "method": "get", + "params": { + "id": "{$environment.settlementId}" + }, + "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code status is 200", + "exec": [ + "if(environment.WINDOWISEMPTY === false){", + "expect(response.status).to.equal(200)", + "}" + ] + } + ] + }, + "scriptingEngine": "javascript", + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "//environment.settlementId = 1;", + "var i=0;", + "var dfspsacc = [];", + "var callbackpayer;", + "", + "environment.winstate = res.state;", + "", + "if(environment.winstate===\"PS_TRANSFERS_COMMITTED\"){", + "", + "", + "res.participants.map(function (participant) {", + " participant.accounts.filter(account => account.netSettlementAmount.currency === environment.SIMPAYER_CURRENCY).forEach(curAccount => {", + "//for(const curAccount of account) { ", + "", + " dfspsacc[i] = {", + " dfspid: participant.id,", + " dfspaccid: curAccount.id ", + " }", + " i++;", + "//}", + "})", + " })", + " ", + "", + "const config = { headers: {'Content-Type': 'application/json','FSPIOP-Source': 'testingtoolkitdfsp'} };", + "for(let dfspsaccx of dfspsacc){", + " //console.log(dfspsaccx.dfspid,dfspsaccx.dfspaccid)", + "callbackpayer = await axios.put(environment.HOST_CENTRAL_SETTLEMENT + '/settlements/'+environment.settlementId, {", + " \"participants\": [", + " {", + " \"id\": dfspsaccx.dfspid,", + " \"accounts\": [", + " {", + " \"id\": dfspsaccx.dfspaccid,", + " \"reason\": \"Transfers settled for payer\",", + " \"state\": \"SETTLED\"", + " }", + " ]", + " }", + " ]", + " },config) ", + "console.log(callbackpayer.data); ", + "}", + "}else{", + " console.log(\"Window is empty\")", + "}", + "", + " " + ] + } + } + }, + { + "id": 8, + "description": "Create Settlement for Closed Window in default deferred settlement model ", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "settlements" + }, + "operationPath": "/settlements", + "path": "/settlements", + "method": "post", + "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 200", + "exec": [ + "if(environment.WINDOWISEMPTY === false){", + "expect(response.status).to.equal(200)", + "}" + ] + }, + { + "id": 2, + "description": "Settlement State should be PENDING_SETTLEMENT", + "exec": [ + "if(environment.WINDOWISEMPTY === false){", + "expect(environment.winstate).to.equal(\"PENDING_SETTLEMENT\")", + "}" + ] + }, + { + "id": 3, + "description": "Number of associated windows should be 1", + "exec": [ + "if(environment.WINDOWISEMPTY === false){", + "expect(response.body.settlementWindows.length).to.equal(1)", + "}" + ] + }, + { + "id": 4, + "description": "Associated Settlement Window ID is the correct one", + "exec": [ + "if(environment.WINDOWISEMPTY === false){", + "expect(response.body.settlementWindows[0].id).to.equal(environment.closedWindowID)", + "}" + ] + }, + { + "id": 5, + "description": "Associated Settlement Window state should be PENDING_SETTLEMENT", + "exec": [ + "if(environment.WINDOWISEMPTY === false){", + "expect(response.body.settlementWindows[0].state).to.equal(\"PENDING_SETTLEMENT\")", + "}" + ] + } + ] + }, + "scriptingEngine": "javascript", + "body": { + "settlementModel": "{$environment.settlementModels.deferred.default}", + "reason": "TESTING", + "settlementWindows": [ + { + "id": "{$requestVariables.closedWindowID}" + } + ] + }, + "scripts": { + "postRequest": { + "exec": [ + "var jsonData = response.body;", + "environment.settlementId = jsonData.id;", + "environment.winstate = jsonData.state;", + "", + "if (response.body.errorInformation.errorCode === \"3100\"){", + " ", + " environment.WINDOWISEMPTY = true;", + " console.log(\"Window is empty\");", + "}else{", + " environment.WINDOWISEMPTY = false;", + "}" + ] + }, + "preRequest": { + "exec": [ + "//environment.closedWindowID = 6;", + "requestVariables.closedWindowID = Number(environment.closedWindowID);", + "", + "/*requestVariables.closedWindowID = Number(environment.closedWindowID);", + "*/", + "", + "requestVariables.settlementModel = environment.settlementModels.deferred[environment.currency]", + "", + "console.log(requestVariables.settlementModel)" + ] + } + } + }, + { + "id": 9, + "description": "Prepare Settlement Default Settlement Model", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "settlements" + }, + "operationPath": "/settlements/{id}", + "path": "/settlements/{$environment.settlementId}", + "method": "get", + "params": { + "id": "{$environment.settlementId}" + }, + "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code status is 200", + "exec": [ + "if(environment.WINDOWISEMPTY === false){", + "expect(response.status).to.equal(200)", + "}" + ] + } + ] + }, + "scriptingEngine": "javascript", + "delay": "2500", + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "console.log(environment.settlementId);", + "//environment.settlementId = 6;", + "var i=0;", + "var dfspsacc = [];", + "var callbackpayer;", + "", + "environment.winstate = res.state;", + "if(environment.winstate===\"PENDING_SETTLEMENT\"){", + "", + "res.participants.map(function (participant) {", + " participant.accounts.filter(account => account.netSettlementAmount.currency === environment.SIMPAYER_CURRENCY).forEach(curAccount => {", + "//for(const curAccount of account) { ", + "", + " dfspsacc[i] = {", + " dfspid: participant.id,", + " dfspaccid: curAccount.id ", + " }", + " i++;", + "//}", + "})", + " })", + " ", + "", + "const config = { headers: {'Content-Type': 'application/json','FSPIOP-Source': 'testingtoolkitdfsp'} };", + "for(let dfspsaccx of dfspsacc){", + " console.log(dfspsaccx.dfspid,dfspsaccx.dfspaccid)", + "callbackpayer = await axios.put(environment.HOST_CENTRAL_SETTLEMENT + '/settlements/'+environment.settlementId, {", + " \"participants\": [", + " {", + " \"id\": dfspsaccx.dfspid,", + " \"accounts\": [", + " {", + " \"id\": dfspsaccx.dfspaccid,", + " \"reason\": \"Transfers recorded for payer\",", + " \"state\": \"PS_TRANSFERS_RECORDED\"", + " }", + " ]", + " }", + " ]", + " },config) ", + "console.log(callbackpayer.data); ", + "}", + "}else{", + " console.log(\"Window is empty\")", + "}", + "/*res.participants.map(participant => {", + " participant.accounts.filter(account => account.netSettlementAmount.currency === pm.environment.get('SIMPAYER_CURRENCY'))", + " .forEach(curAccount => {*/", + " " + ] + }, + "preRequest": { + "exec": [ + "" + ] + } + } + }, + { + "id": 10, + "description": "Reserve Settlement Default Settlement Model", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "settlements" + }, + "operationPath": "/settlements/{id}", + "path": "/settlements/{$environment.settlementId}", + "method": "get", + "params": { + "id": "{$environment.settlementId}" + }, + "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code status is 200", + "exec": [ + "if(environment.WINDOWISEMPTY === false){", + "expect(response.status).to.equal(200)", + "}" + ] + } + ] + }, + "scriptingEngine": "javascript", + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "//environment.settlementId = 1;", + "var i=0;", + "var dfspsacc = [];", + "var callbackpayer;", + "", + "environment.winstate = res.state;", + "", + "if(environment.winstate===\"PS_TRANSFERS_RECORDED\"){", + "", + "", + "res.participants.map(function (participant) {", + " participant.accounts.filter(account => account.netSettlementAmount.currency === environment.SIMPAYER_CURRENCY).forEach(curAccount => {", + "//for(const curAccount of account) { ", + "", + " dfspsacc[i] = {", + " dfspid: participant.id,", + " dfspaccid: curAccount.id ", + " }", + " i++;", + "//}", + "})", + " })", + " ", + "", + "const config = { headers: {'Content-Type': 'application/json','FSPIOP-Source': 'testingtoolkitdfsp'} };", + "for(let dfspsaccx of dfspsacc){", + " //console.log(dfspsaccx.dfspid,dfspsaccx.dfspaccid)", + "callbackpayer = await axios.put(environment.HOST_CENTRAL_SETTLEMENT + '/settlements/'+environment.settlementId, {", + " \"participants\": [", + " {", + " \"id\": dfspsaccx.dfspid,", + " \"accounts\": [", + " {", + " \"id\": dfspsaccx.dfspaccid,", + " \"reason\": \"Transfers reserved\",", + " \"state\": \"PS_TRANSFERS_RESERVED\"", + " }", + " ]", + " }", + " ]", + " },config) ", + "console.log(callbackpayer.data); ", + "}", + "}else{", + " console.log(\"Window is empty\")", + "}", + "/*res.participants.map(participant => {", + " participant.accounts.filter(account => account.netSettlementAmount.currency === pm.environment.get('SIMPAYER_CURRENCY'))", + " .forEach(curAccount => {*/", + " " + ] + } + } + }, + { + "id": 11, + "description": "Commit Settlement Default Settlement Model", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "settlements" + }, + "operationPath": "/settlements/{id}", + "path": "/settlements/{$environment.settlementId}", + "method": "get", + "params": { + "id": "{$environment.settlementId}" + }, + "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code status is 200", + "exec": [ + "if(environment.WINDOWISEMPTY === false){", + "expect(response.status).to.equal(200)", + "}" + ] + } + ] + }, + "scriptingEngine": "javascript", + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "//environment.settlementId = 1;", + "var i=0;", + "var dfspsacc = [];", + "var callbackpayer;", + "", + "environment.winstate = res.state;", + "", + "if(environment.winstate===\"PS_TRANSFERS_RESERVED\"){", + "", + "", + "res.participants.map(function (participant) {", + " participant.accounts.filter(account => account.netSettlementAmount.currency === environment.SIMPAYER_CURRENCY).forEach(curAccount => {", + "//for(const curAccount of account) { ", + "", + " dfspsacc[i] = {", + " dfspid: participant.id,", + " dfspaccid: curAccount.id ", + " }", + " i++;", + "//}", + "})", + " })", + " ", + "", + "const config = { headers: {'Content-Type': 'application/json','FSPIOP-Source': 'testingtoolkitdfsp'} };", + "for(let dfspsaccx of dfspsacc){", + " //console.log(dfspsaccx.dfspid,dfspsaccx.dfspaccid)", + "callbackpayer = await axios.put(environment.HOST_CENTRAL_SETTLEMENT + '/settlements/'+environment.settlementId, {", + " \"participants\": [", + " {", + " \"id\": dfspsaccx.dfspid,", + " \"accounts\": [", + " {", + " \"id\": dfspsaccx.dfspaccid,", + " \"reason\": \"Transfers committed\",", + " \"state\": \"PS_TRANSFERS_COMMITTED\"", + " }", + " ]", + " }", + " ]", + " },config) ", + "console.log(callbackpayer.data); ", + "}", + "}else{", + " console.log(\"Window is empty\")", + "}", + "/*res.participants.map(participant => {", + " participant.accounts.filter(account => account.netSettlementAmount.currency === pm.environment.get('SIMPAYER_CURRENCY'))", + " .forEach(curAccount => {*/", + " " + ] + } + } + }, + { + "id": 12, + "description": "Settle Settlement Default Settlement Model", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "settlements" + }, + "operationPath": "/settlements/{id}", + "path": "/settlements/{$environment.settlementId}", + "method": "get", + "params": { + "id": "{$environment.settlementId}" + }, + "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code status is 200", + "exec": [ + "if(environment.WINDOWISEMPTY === false){", + "expect(response.status).to.equal(200)", + "}" + ] + } + ] + }, + "scriptingEngine": "javascript", + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "//environment.settlementId = 1;", + "var i=0;", + "var dfspsacc = [];", + "var callbackpayer;", + "", + "environment.winstate = res.state;", + "", + "if(environment.winstate===\"PS_TRANSFERS_COMMITTED\"){", + "", + "", + "res.participants.map(function (participant) {", + " participant.accounts.filter(account => account.netSettlementAmount.currency === environment.SIMPAYER_CURRENCY).forEach(curAccount => {", + "//for(const curAccount of account) { ", + "", + " dfspsacc[i] = {", + " dfspid: participant.id,", + " dfspaccid: curAccount.id ", + " }", + " i++;", + "//}", + "})", + " })", + " ", + "", + "const config = { headers: {'Content-Type': 'application/json','FSPIOP-Source': 'testingtoolkitdfsp'} };", + "for(let dfspsaccx of dfspsacc){", + " //console.log(dfspsaccx.dfspid,dfspsaccx.dfspaccid)", + "callbackpayer = await axios.put(environment.HOST_CENTRAL_SETTLEMENT + '/settlements/'+environment.settlementId, {", + " \"participants\": [", + " {", + " \"id\": dfspsaccx.dfspid,", + " \"accounts\": [", + " {", + " \"id\": dfspsaccx.dfspaccid,", + " \"reason\": \"Transfers settled for payer\",", + " \"state\": \"SETTLED\"", + " }", + " ]", + " }", + " ]", + " },config) ", + "console.log(callbackpayer.data); ", + "}", + "}else{", + " console.log(\"Window is empty\")", + "}", + "", + "", + " " + ] + } + } + }, + { + "id": 13, + "description": "get settlements models", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/settlementModels", + "path": "/settlementModels", + "method": "get", + "scriptingEngine": "javascript", + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "scripts": { + "postRequest": { + "exec": [ + "var jsonData = response.body;", + "environment.settlementModels = { deferred: {}}", + "for (const sm of jsonData) {", + " if (sm.settlementDelay === 'DEFERRED') {", + " if (sm.currency === null) {", + " environment.settlementModels.deferred.default = sm.name", + " } else {", + " environment.settlementModels.deferred[sm.currency] = sm.name", + " }", + " }", + "}", + "", + "console.log(environment.settlementModels)" + ] + } + } + } + ] + }, + { + "id": 3, + "name": "Store settlement and position balances before", + "requests": [ + { + "id": 1, + "description": "get balances for testfsp1", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.SIM1_NAME}/accounts", + "method": "get", + "params": { + "name": "{$inputs.SIM1_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + } + ] + }, + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "scriptingEngine": "javascript", + "scripts": { + "preRequest": { + "exec": [ + "environment.balances = {}", + "" + ] + }, + "postRequest": { + "exec": [ + "var jsonData = response.body;", + "console.log(jsonData);", + "const {$inputs.SIM1_NAME} = { beforeTransfer: {} }", + "", + "for (const i in jsonData) {", + " if (!Object.keys({$inputs.SIM1_NAME}.beforeTransfer).includes(jsonData[i].currency)) {", + " {$inputs.SIM1_NAME}.beforeTransfer[jsonData[i].currency] = {}", + " }", + " {$inputs.SIM1_NAME}.beforeTransfer[jsonData[i].currency][jsonData[i].ledgerAccountType] = jsonData[i].value", + " environment.balances = {", + " ...environment.balances,", + " {$inputs.SIM1_NAME}", + " }", + "}", + "", + "", + "console.log(environment.balances);" + ] + } + } + }, + { + "id": 2, + "description": "get balances for testfsp2", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.SIM2_NAME}/accounts", + "method": "get", + "params": { + "name": "{$inputs.SIM2_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + } + ] + }, + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "scriptingEngine": "javascript", + "scripts": { + "preRequest": { + "exec": [ + "" + ] + }, + "postRequest": { + "exec": [ + "var jsonData = response.body;", + "console.log(jsonData);", + "const {$inputs.SIM2_NAME} = { beforeTransfer: {} }", + "", + "for (const i in jsonData) {", + " if (!Object.keys({$inputs.SIM2_NAME}.beforeTransfer).includes(jsonData[i].currency)) {", + " {$inputs.SIM2_NAME}.beforeTransfer[jsonData[i].currency] = {}", + " }", + " {$inputs.SIM2_NAME}.beforeTransfer[jsonData[i].currency][jsonData[i].ledgerAccountType] = jsonData[i].value", + " environment.balances = {", + " ...environment.balances,", + " {$inputs.SIM2_NAME}", + " }", + "}", + "", + "", + "console.log(environment.balances);" + ] + } + } + }, + { + "id": 3, + "description": "get balances for payerfsp", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.SIMPAYER_NAME}/accounts", + "method": "get", + "params": { + "name": "{$inputs.SIMPAYER_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + } + ] + }, + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "scriptingEngine": "javascript", + "scripts": { + "preRequest": { + "exec": [ + "" + ] + }, + "postRequest": { + "exec": [ + "var jsonData = response.body;", + "console.log(jsonData);", + "const {$inputs.SIMPAYER_NAME} = { beforeTransfer: {} }", + "", + "for (const i in jsonData) {", + " if (!Object.keys({$inputs.SIMPAYER_NAME}.beforeTransfer).includes(jsonData[i].currency)) {", + " {$inputs.SIMPAYER_NAME}.beforeTransfer[jsonData[i].currency] = {}", + " }", + " {$inputs.SIMPAYER_NAME}.beforeTransfer[jsonData[i].currency][jsonData[i].ledgerAccountType] = jsonData[i].value", + " environment.balances = {", + " ...environment.balances,", + " {$inputs.SIMPAYER_NAME}", + " }", + "}", + "", + "", + "console.log(environment.balances);" + ] + } + } + }, + { + "id": 4, + "description": "get balances for payeefsp", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.SIMPAYEE_NAME}/accounts", + "method": "get", + "params": { + "name": "{$inputs.SIMPAYEE_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + } + ] + }, + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "scriptingEngine": "javascript", + "scripts": { + "preRequest": { + "exec": [ + "" + ] + }, + "postRequest": { + "exec": [ + "var jsonData = response.body;", + "console.log(jsonData);", + "const {$inputs.SIMPAYEE_NAME} = { beforeTransfer: {} }", + "", + "for (const i in jsonData) {", + " if (!Object.keys({$inputs.SIMPAYEE_NAME}.beforeTransfer).includes(jsonData[i].currency)) {", + " {$inputs.SIMPAYEE_NAME}.beforeTransfer[jsonData[i].currency] = {}", + " }", + " {$inputs.SIMPAYEE_NAME}.beforeTransfer[jsonData[i].currency][jsonData[i].ledgerAccountType] = jsonData[i].value", + " environment.balances = {", + " ...environment.balances,", + " {$inputs.SIMPAYEE_NAME}", + " }", + "}", + "", + "", + "console.log(environment.balances);" + ] + } + } + }, + { + "id": 5, + "description": "Get Hub balances", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/Hub/accounts", + "method": "get", + "params": { + "name": "Hub" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + } + ] + }, + "scriptingEngine": "javascript", + "scripts": { + "postRequest": { + "exec": [ + "var jsonData = response.body;", + "console.log(jsonData);", + "const Hub = { beforeTransfer: {} }", + "", + "for (const i in jsonData) {", + " if (!Object.keys(Hub.beforeTransfer).includes(jsonData[i].currency)) {", + " Hub.beforeTransfer[jsonData[i].currency] = {}", + " }", + " Hub.beforeTransfer[jsonData[i].currency][jsonData[i].ledgerAccountType] = jsonData[i].value", + " environment.balances = {", + " ...environment.balances,", + " Hub", + " }", + "}", + "", + "", + "console.log(environment.balances);" + ] + } + } + } + ] + }, + { + "id": 4, + "name": "SIM1 to SIM2", + "requests": [ + { + "id": 3, + "description": "Send quote", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "operationPath": "/quotes", + "method": "post", + "headers": { + "Accept": "application/vnd.interoperability.quotes+json;version=1.0", + "Content-Type": "application/vnd.interoperability.quotes+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.SIM1_NAME}", + "Authorization": "{$inputs.TESTFSP1_BEARER_TOKEN}", + "FSPIOP-Destination": "{$inputs.SIM2_NAME}" + }, + "body": { + "quoteId": "{$function.generic.generateUUID}", + "transactionId": "{$function.generic.generateUUID}", + "payer": { + "partyIdInfo": { + "partyIdType": "{$inputs.fromIdType}", + "partyIdentifier": "{$inputs.testfsp1Identifier}", + "fspId": "{$inputs.SIM1_NAME}" + }, + "personalInfo": { + "complexName": { + "firstName": "{$inputs.fromFirstName}", + "lastName": "{$inputs.fromLastName}" + }, + "dateOfBirth": "{$inputs.fromDOB}" + } + }, + "payee": { + "partyIdInfo": { + "partyIdType": "{$inputs.fromIdType}", + "partyIdentifier": "{$inputs.testfsp2Identifier}", + "fspId": "{$inputs.SIM2_NAME}" + } + }, + "amountType": "RECEIVE", + "amount": { + "amount": "60", + "currency": "{$inputs.currency}" + }, + "transactionType": { + "scenario": "TRANSFER", + "initiator": "PAYER", + "initiatorType": "CONSUMER" + }, + "note": "{$inputs.note}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(environment.testfsp1callbacks.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(environment.testfsp1callbacks.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback body should contain transferAmount", + "exec": [ + "expect(environment.testfsp1callbacks.data).to.have.property('transferAmount')" + ] + }, + { + "id": 6, + "description": "Callback transferAmount (amount & currency)to match the request", + "exec": [ + "expect(environment.testfsp1callbacks.data.transferAmount.amount).to.equal('{$request.body.amount.amount}')", + "expect(environment.testfsp1callbacks.data.transferAmount.currency).to.equal('{$request.body.amount.currency}')" + ] + }, + { + "id": 7, + "description": "Callback content-type to be quotes", + "exec": [ + "expect(environment.testfsp1callbacks.headers['content-type']).to.equal('application/vnd.interoperability.quotes+json;version={$inputs.expectedQuotesVersion}')" + ] + }, + { + "id": 8, + "description": "Request amountType to be RECEIVE", + "exec": [ + "expect('{$request.body.amountType}').to.equal('RECEIVE')" + ] + }, + { + "id": 9, + "description": "Request transactionType scenario to be TRANSFER", + "exec": [ + "expect('{$request.body.transactionType.scenario}').to.equal('TRANSFER')" + ] + }, + { + "id": 10, + "description": "Request transactionType initiator to be PAYER", + "exec": [ + "expect('{$request.body.transactionType.initiator}').to.equal('PAYER')" + ] + }, + { + "id": 11, + "description": "Request transactionType initiatorType to be CONSUMER", + "exec": [ + "expect('{$request.body.transactionType.initiatorType}').to.equal('CONSUMER')" + ] + } + ] + }, + "params": { + "Type": "MSISDN", + "ID": "{$inputs.toIdValue}" + }, + "path": "/quotes", + "url": "{$inputs.HOST_QUOTING_SERVICE}", + "scriptingEngine": "javascript", + "ignoreCallbacks": true, + "scripts": { + "preRequest": { + "exec": [ + "if (environment.ENABLE_WS_ASSERTIONS===true) {", + " await websocket.connect(environment.TESTFSP1_SDK_TESTAPI_WS_URL + '/callbacks/{$request.body.quoteId}', 'testfsp1callbacksq')", + "}" + ] + }, + "postRequest": { + "exec": [ + "if (environment.ENABLE_WS_ASSERTIONS===true) {", + " environment.testfsp1callbacks = await websocket.getMessage('testfsp1callbacksq', environment.WS_ASSERTION_TIMEOUT)", + "}", + "", + "/*console.log(environment.testfsp1callbacks);", + "", + "environment.transactionid = '{$request.body.transactionId}'", + "console.log(environment.transactionid);*/" + ] + } + } + }, + { + "id": 2, + "description": "Send transfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "operationPath": "/transfers", + "method": "post", + "headers": { + "Accept": "application/vnd.interoperability.transfers+json;version=1.0", + "Content-Type": "application/vnd.interoperability.transfers+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.SIM1_NAME}", + "Authorization": "{$inputs.TESTFSP1_BEARER_TOKEN}" + }, + "body": { + "transferId": "{$prev.3.request.body.transactionId}", + "payerFsp": "{$inputs.SIM1_NAME}", + "payeeFsp": "{$inputs.SIM2_NAME}", + "amount": { + "amount": "60", + "currency": "{$inputs.currency}" + }, + "expiration": "{$environment.testfsp1callbacks.data.expiration}", + "ilpPacket": "{$environment.testfsp1callbacks.data.ilpPacket}", + "condition": "{$environment.testfsp1callbacks.data.condition}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(environment.testfsp1callbackst.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(environment.testfsp1callbackst.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback transferState to be COMMITTED", + "exec": [ + "expect(environment.testfsp1callbackst.data.transferState).to.equal('COMMITTED')" + ] + }, + { + "id": 6, + "description": "Callback content-type to be transfers", + "exec": [ + "expect(environment.testfsp1callbackst.headers['content-type']).to.equal('application/vnd.interoperability.transfers+json;version={$inputs.expectedTransfersVersion}')" + ] + }, + { + "id": 7, + "description": "Request transferId same as quote request transferId", + "exec": [ + "expect('{$request.body.transferId}').to.equal('{$prev.3.request.body.transactionId}')" + ] + }, + { + "id": 8, + "description": "Request transferAmount (amount & currency) to match quote request", + "exec": [ + "expect('{$prev.3.request.body.amount.amount}').to.equal('{$request.body.amount.amount}')", + "expect('{$prev.3.request.body.amount.currency}').to.equal('{$request.body.amount.currency}')" + ] + }, + { + "id": 9, + "description": "Request FSP source the same as quote callback FSP destination", + "exec": [ + "expect('{$request.headers['FSPIOP-Source']}').to.equal(environment.testfsp1callbackst.headers['fspiop-destination'])", + "", + "" + ] + } + ] + }, + "url": "{$inputs.HOST_ML_API_ADAPTER}", + "scriptingEngine": "javascript", + "ignoreCallbacks": true, + "scripts": { + "preRequest": { + "exec": [ + "if (environment.ENABLE_WS_ASSERTIONS===true) {", + " await websocket.connect(environment.TESTFSP1_SDK_TESTAPI_WS_URL + '/callbacks/{$request.body.transferId}', 'testfsp1callbackst')", + "}", + "", + "" + ] + }, + "postRequest": { + "exec": [ + "if (environment.ENABLE_WS_ASSERTIONS===true) {", + " environment.testfsp1callbackst = await websocket.getMessage('testfsp1callbackst', environment.WS_ASSERTION_TIMEOUT)", + "}", + "", + "console.log(environment.testfsp1callbackst);" + ] + } + } + } + ] + }, + { + "id": 5, + "name": "SIM1 to PAYEEFSP", + "requests": [ + { + "id": 3, + "description": "Send quote", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "operationPath": "/quotes", + "method": "post", + "headers": { + "Accept": "application/vnd.interoperability.quotes+json;version=1.0", + "Content-Type": "application/vnd.interoperability.quotes+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.SIM1_NAME}", + "FSPIOP-Destination": "{$inputs.SIMPAYEE_NAME}", + "Authorization": "{$inputs.TESTFSP1_BEARER_TOKEN}" + }, + "body": { + "quoteId": "{$function.generic.generateUUID}", + "transactionId": "{$function.generic.generateUUID}", + "payer": { + "partyIdInfo": { + "partyIdType": "{$inputs.fromIdType}", + "partyIdentifier": "{$inputs.testfsp1Identifier}", + "fspId": "{$inputs.SIM1_NAME}" + }, + "personalInfo": { + "complexName": { + "firstName": "{$inputs.fromFirstName}", + "lastName": "{$inputs.fromLastName}" + }, + "dateOfBirth": "{$inputs.fromDOB}" + } + }, + "payee": { + "partyIdInfo": { + "partyIdType": "{$inputs.fromIdType}", + "partyIdentifier": "{$inputs.payeefspIdentifier}", + "fspId": "{$inputs.SIMPAYEE_NAME}" + } + }, + "amountType": "RECEIVE", + "amount": { + "amount": "55", + "currency": "{$inputs.currency2}" + }, + "transactionType": { + "scenario": "TRANSFER", + "initiator": "PAYER", + "initiatorType": "CONSUMER" + }, + "note": "{$inputs.note}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(environment.testfsp1callbacks.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(environment.testfsp1callbacks.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback body should contain transferAmount", + "exec": [ + "expect(environment.testfsp1callbacks.data).to.have.property('transferAmount')" + ] + }, + { + "id": 6, + "description": "Callback transferAmount (amount & currency)to match the request", + "exec": [ + "expect(environment.testfsp1callbacks.data.transferAmount.amount).to.equal('{$request.body.amount.amount}')", + "expect(environment.testfsp1callbacks.data.transferAmount.currency).to.equal('{$request.body.amount.currency}')" + ] + }, + { + "id": 7, + "description": "Callback content-type to be quotes", + "exec": [ + "expect(environment.testfsp1callbacks.headers['content-type']).to.equal('application/vnd.interoperability.quotes+json;version={$inputs.expectedQuotesVersion}')" + ] + }, + { + "id": 8, + "description": "Request amountType to be RECEIVE", + "exec": [ + "expect('{$request.body.amountType}').to.equal('RECEIVE')" + ] + }, + { + "id": 9, + "description": "Request transactionType scenario to be TRANSFER", + "exec": [ + "expect('{$request.body.transactionType.scenario}').to.equal('TRANSFER')" + ] + }, + { + "id": 10, + "description": "Request transactionType initiator to be PAYER", + "exec": [ + "expect('{$request.body.transactionType.initiator}').to.equal('PAYER')" + ] + }, + { + "id": 11, + "description": "Request transactionType initiatorType to be CONSUMER", + "exec": [ + "expect('{$request.body.transactionType.initiatorType}').to.equal('CONSUMER')" + ] + } + ] + }, + "params": { + "Type": "MSISDN", + "ID": "{$inputs.toIdValue}" + }, + "path": "/quotes", + "url": "{$inputs.HOST_QUOTING_SERVICE}", + "scriptingEngine": "javascript", + "ignoreCallbacks": true, + "scripts": { + "preRequest": { + "exec": [ + "if (environment.ENABLE_WS_ASSERTIONS===true) {", + " await websocket.connect(environment.TESTFSP1_SDK_TESTAPI_WS_URL + '/callbacks/{$request.body.quoteId}', 'testfsp1callbacksq')", + "}" + ] + }, + "postRequest": { + "exec": [ + "if (environment.ENABLE_WS_ASSERTIONS===true) {", + " environment.testfsp1callbacks = await websocket.getMessage('testfsp1callbacksq', environment.WS_ASSERTION_TIMEOUT)", + "}", + "", + "console.log(environment.testfsp1callbacks);", + "/*", + "environment.transactionid = '{$request.body.transactionId}'", + "console.log(environment.transactionid);*/" + ] + } + } + }, + { + "id": 2, + "description": "Send transfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "operationPath": "/transfers", + "method": "post", + "headers": { + "Accept": "application/vnd.interoperability.transfers+json;version=1.0", + "Content-Type": "application/vnd.interoperability.transfers+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.SIM1_NAME}", + "Authorization": "{$inputs.TESTFSP1_BEARER_TOKEN}" + }, + "body": { + "transferId": "{$prev.3.request.body.transactionId}", + "payerFsp": "{$inputs.SIM1_NAME}", + "payeeFsp": "{$inputs.SIMPAYEE_NAME}", + "amount": { + "amount": "55", + "currency": "{$inputs.currency2}" + }, + "expiration": "{$environment.testfsp1callbacks.data.expiration}", + "ilpPacket": "{$environment.testfsp1callbacks.data.ilpPacket}", + "condition": "{$environment.testfsp1callbacks.data.condition}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(environment.testfsp1callbackst.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(environment.testfsp1callbackst.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback transferState to be COMMITTED", + "exec": [ + "expect(environment.testfsp1callbackst.data.transferState).to.equal('COMMITTED')" + ] + }, + { + "id": 6, + "description": "Callback content-type to be transfers", + "exec": [ + "expect(environment.testfsp1callbackst.headers['content-type']).to.equal('application/vnd.interoperability.transfers+json;version={$inputs.expectedTransfersVersion}')" + ] + }, + { + "id": 7, + "description": "Request transferId same as quote request transferId", + "exec": [ + "expect('{$request.body.transferId}').to.equal('{$prev.3.request.body.transactionId}')" + ] + }, + { + "id": 8, + "description": "Request transferAmount (amount & currency) to match quote request", + "exec": [ + "expect('{$prev.3.request.body.amount.amount}').to.equal('{$request.body.amount.amount}')", + "expect('{$prev.3.request.body.amount.currency}').to.equal('{$request.body.amount.currency}')" + ] + }, + { + "id": 9, + "description": "Request FSP source the same as quote callback FSP destination", + "exec": [ + "expect('{$request.headers['FSPIOP-Source']}').to.equal(environment.testfsp1callbackst.headers['fspiop-destination'])" + ] + } + ] + }, + "url": "{$inputs.HOST_ML_API_ADAPTER}", + "scriptingEngine": "javascript", + "ignoreCallbacks": true, + "scripts": { + "preRequest": { + "exec": [ + "if (environment.ENABLE_WS_ASSERTIONS===true) {", + " await websocket.connect(environment.TESTFSP1_SDK_TESTAPI_WS_URL + '/callbacks/{$request.body.transferId}', 'testfsp1callbackst')", + "}" + ] + }, + "postRequest": { + "exec": [ + "if (environment.ENABLE_WS_ASSERTIONS===true) {", + " environment.testfsp1callbackst = await websocket.getMessage('testfsp1callbackst', environment.WS_ASSERTION_TIMEOUT)", + "}", + "", + "console.log(environment.testfsp1callbackst);" + ] + } + } + } + ] + }, + { + "id": 6, + "name": "PAYERFSP to SIM1", + "requests": [ + { + "id": 3, + "description": "Send quote", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "operationPath": "/quotes", + "method": "post", + "headers": { + "Accept": "application/vnd.interoperability.quotes+json;version=1.0", + "Content-Type": "application/vnd.interoperability.quotes+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.SIMPAYER_NAME}", + "FSPIOP-Destination": "{$inputs.SIM1_NAME}", + "Authorization": "{$inputs.PAYER_BEARER_TOKEN}" + }, + "body": { + "quoteId": "{$function.generic.generateUUID}", + "transactionId": "{$function.generic.generateUUID}", + "payer": { + "partyIdInfo": { + "partyIdType": "{$inputs.fromIdType}", + "partyIdentifier": "{$inputs.payerIdentifier}", + "fspId": "{$inputs.SIMPAYER_NAME}" + }, + "personalInfo": { + "complexName": { + "firstName": "{$inputs.fromFirstName}", + "lastName": "{$inputs.fromLastName}" + }, + "dateOfBirth": "{$inputs.fromDOB}" + } + }, + "payee": { + "partyIdInfo": { + "partyIdType": "{$inputs.fromIdType}", + "partyIdentifier": "{$inputs.testfsp1MSISDN}", + "fspId": "{$inputs.SIM1_NAME}" + } + }, + "amountType": "RECEIVE", + "amount": { + "amount": "35", + "currency": "{$inputs.currency}" + }, + "transactionType": { + "scenario": "TRANSFER", + "initiator": "PAYER", + "initiatorType": "CONSUMER" + }, + "note": "{$inputs.note}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(environment.payerfspcallbacksq.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(environment.payerfspcallbacksq.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback body should contain transferAmount", + "exec": [ + "expect(environment.payerfspcallbacksq.data).to.have.property('transferAmount')" + ] + }, + { + "id": 6, + "description": "Callback transferAmount (amount & currency)to match the request", + "exec": [ + "expect(environment.payerfspcallbacksq.data.transferAmount.amount).to.equal('{$request.body.amount.amount}')", + "expect(environment.payerfspcallbacksq.data.transferAmount.currency).to.equal('{$request.body.amount.currency}')" + ] + }, + { + "id": 7, + "description": "Callback content-type to be quotes", + "exec": [ + "expect(environment.payerfspcallbacksq.headers['content-type']).to.equal('application/vnd.interoperability.quotes+json;version={$inputs.expectedQuotesVersion}')" + ] + }, + { + "id": 8, + "description": "Request amountType to be RECEIVE", + "exec": [ + "expect('{$request.body.amountType}').to.equal('RECEIVE')" + ] + }, + { + "id": 9, + "description": "Request transactionType scenario to be TRANSFER", + "exec": [ + "expect('{$request.body.transactionType.scenario}').to.equal('TRANSFER')" + ] + }, + { + "id": 10, + "description": "Request transactionType initiator to be PAYER", + "exec": [ + "expect('{$request.body.transactionType.initiator}').to.equal('PAYER')" + ] + }, + { + "id": 11, + "description": "Request transactionType initiatorType to be CONSUMER", + "exec": [ + "expect('{$request.body.transactionType.initiatorType}').to.equal('CONSUMER')" + ] + } + ] + }, + "params": { + "Type": "MSISDN", + "ID": "{$inputs.toIdValue}" + }, + "path": "/quotes", + "url": "{$inputs.HOST_QUOTING_SERVICE}", + "scriptingEngine": "javascript", + "ignoreCallbacks": true, + "scripts": { + "preRequest": { + "exec": [ + "if (environment.ENABLE_WS_ASSERTIONS===true) {", + " await websocket.connect(environment.PAYERFSP_SDK_TESTAPI_WS_URL + '/callbacks/{$request.body.quoteId}', 'payerfspcallbacksq')", + "}" + ] + }, + "postRequest": { + "exec": [ + "if (environment.ENABLE_WS_ASSERTIONS===true) {", + " environment.payerfspcallbacksq = await websocket.getMessage('payerfspcallbacksq', environment.WS_ASSERTION_TIMEOUT)", + "}", + "", + "console.log(environment.payerfspcallbacksq);", + "", + "/*environment.transactionid = '{$request.body.transactionId}'", + "console.log(environment.transactionid);*/" + ] + } + } + }, + { + "id": 2, + "description": "Send transfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "operationPath": "/transfers", + "method": "post", + "headers": { + "Accept": "application/vnd.interoperability.transfers+json;version=1.0", + "Content-Type": "application/vnd.interoperability.transfers+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.SIMPAYER_NAME}", + "Authorization": "{$inputs.PAYER_BEARER_TOKEN}" + }, + "body": { + "transferId": "{$prev.3.request.body.transactionId}", + "payerFsp": "{$inputs.SIMPAYER_NAME}", + "payeeFsp": "{$inputs.SIM1_NAME}", + "amount": { + "amount": "35", + "currency": "{$inputs.currency}" + }, + "expiration": "{$environment.payerfspcallbacksq.data.expiration}", + "ilpPacket": "{$environment.payerfspcallbacksq.data.ilpPacket}", + "condition": "{$environment.payerfspcallbacksq.data.condition}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(environment.payerfspcallbackst.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(environment.payerfspcallbackst.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback transferState to be COMMITTED", + "exec": [ + "expect(environment.payerfspcallbackst.data.transferState).to.equal('COMMITTED')" + ] + }, + { + "id": 6, + "description": "Callback content-type to be transfers", + "exec": [ + "expect(environment.payerfspcallbackst.headers['content-type']).to.equal('application/vnd.interoperability.transfers+json;version={$inputs.expectedTransfersVersion}')" + ] + }, + { + "id": 7, + "description": "Request transferId same as quote request transferId", + "exec": [ + "expect('{$request.body.transferId}').to.equal('{$prev.3.request.body.transactionId}')" + ] + }, + { + "id": 8, + "description": "Request transferAmount (amount & currency) to match quote request", + "exec": [ + "expect('{$prev.3.request.body.amount.amount}').to.equal('{$request.body.amount.amount}')", + "expect('{$prev.3.request.body.amount.currency}').to.equal('{$request.body.amount.currency}')" + ] + }, + { + "id": 9, + "description": "Request FSP source the same as quote callback FSP destination", + "exec": [ + "expect('{$request.headers['FSPIOP-Source']}').to.equal(environment.payerfspcallbackst.headers['fspiop-destination'])" + ] + } + ] + }, + "url": "{$inputs.HOST_ML_API_ADAPTER}", + "scriptingEngine": "javascript", + "ignoreCallbacks": true, + "scripts": { + "preRequest": { + "exec": [ + "if (environment.ENABLE_WS_ASSERTIONS===true) {", + " await websocket.connect(environment.PAYERFSP_SDK_TESTAPI_WS_URL + '/callbacks/{$request.body.transferId}', 'payerfspcallbackst')", + "}" + ] + }, + "postRequest": { + "exec": [ + "if (environment.ENABLE_WS_ASSERTIONS===true) {", + " environment.payerfspcallbackst = await websocket.getMessage('payerfspcallbackst', environment.WS_ASSERTION_TIMEOUT)", + "}", + "", + "console.log(environment.payerfspcallbackst);" + ] + } + } + } + ] + }, + { + "id": 7, + "name": "SIM2 to PAYERFSP", + "requests": [ + { + "id": 3, + "description": "Send quote", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "operationPath": "/quotes", + "method": "post", + "headers": { + "Accept": "application/vnd.interoperability.quotes+json;version=1.0", + "Content-Type": "application/vnd.interoperability.quotes+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.SIM2_NAME}", + "FSPIOP-Destination": "{$inputs.SIMPAYER_NAME}", + "Authorization": "{$inputs.TESTFSP2_BEARER_TOKEN}" + }, + "body": { + "quoteId": "{$function.generic.generateUUID}", + "transactionId": "{$function.generic.generateUUID}", + "payer": { + "partyIdInfo": { + "partyIdType": "{$inputs.fromIdType}", + "partyIdentifier": "{$inputs.testfsp2Identifier}", + "fspId": "{$inputs.SIM2_NAME}" + }, + "personalInfo": { + "complexName": { + "firstName": "{$inputs.fromFirstName}", + "lastName": "{$inputs.fromLastName}" + }, + "dateOfBirth": "{$inputs.fromDOB}" + } + }, + "payee": { + "partyIdInfo": { + "partyIdType": "{$inputs.fromIdType}", + "partyIdentifier": "{$inputs.payerIdentifier}", + "fspId": "{$inputs.SIMPAYER_NAME}" + } + }, + "amountType": "RECEIVE", + "amount": { + "amount": "20", + "currency": "{$inputs.currency2}" + }, + "transactionType": { + "scenario": "TRANSFER", + "initiator": "PAYER", + "initiatorType": "CONSUMER" + }, + "note": "{$inputs.note}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(environment.testfsp2callbacks.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(environment.testfsp2callbacks.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback body should contain transferAmount", + "exec": [ + "expect(environment.testfsp2callbacks.data).to.have.property('transferAmount')" + ] + }, + { + "id": 6, + "description": "Callback transferAmount (amount & currency)to match the request", + "exec": [ + "expect(environment.testfsp2callbacks.data.transferAmount.amount).to.equal('{$request.body.amount.amount}')", + "expect(environment.testfsp2callbacks.data.transferAmount.currency).to.equal('{$request.body.amount.currency}')" + ] + }, + { + "id": 7, + "description": "Callback content-type to be quotes", + "exec": [ + "expect(environment.testfsp2callbacks.headers['content-type']).to.equal('application/vnd.interoperability.quotes+json;version={$inputs.expectedQuotesVersion}')" + ] + }, + { + "id": 8, + "description": "Request amountType to be RECEIVE", + "exec": [ + "expect('{$request.body.amountType}').to.equal('RECEIVE')" + ] + }, + { + "id": 9, + "description": "Request transactionType scenario to be TRANSFER", + "exec": [ + "expect('{$request.body.transactionType.scenario}').to.equal('TRANSFER')" + ] + }, + { + "id": 10, + "description": "Request transactionType initiator to be PAYER", + "exec": [ + "expect('{$request.body.transactionType.initiator}').to.equal('PAYER')" + ] + }, + { + "id": 11, + "description": "Request transactionType initiatorType to be CONSUMER", + "exec": [ + "expect('{$request.body.transactionType.initiatorType}').to.equal('CONSUMER')" + ] + } + ] + }, + "params": { + "Type": "MSISDN", + "ID": "{$inputs.toIdValue}" + }, + "path": "/quotes", + "url": "{$inputs.HOST_QUOTING_SERVICE}", + "scriptingEngine": "javascript", + "ignoreCallbacks": true, + "scripts": { + "preRequest": { + "exec": [ + "console.log(environment.TESTFSP2_SDK_TESTAPI_WS_URL + '/callbacks/{$request.body.quoteId}');", + "", + "if (environment.ENABLE_WS_ASSERTIONS===true) {", + " await websocket.connect(environment.TESTFSP2_SDK_TESTAPI_WS_URL + '/callbacks/{$request.body.quoteId}', 'testfsp2callbacksq')", + "}" + ] + }, + "postRequest": { + "exec": [ + "if (environment.ENABLE_WS_ASSERTIONS===true) {", + " environment.testfsp2callbacks = await websocket.getMessage('testfsp2callbacksq', environment.WS_ASSERTION_TIMEOUT)", + "}", + "", + "console.log(environment.testfsp2callbacks);", + "", + "" + ] + } + } + }, + { + "id": 2, + "description": "Send transfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "operationPath": "/transfers", + "method": "post", + "headers": { + "Accept": "application/vnd.interoperability.transfers+json;version=1.0", + "Content-Type": "application/vnd.interoperability.transfers+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.SIM2_NAME}", + "Authorization": "{$inputs.TESTFSP2_BEARER_TOKEN}" + }, + "body": { + "transferId": "{$prev.3.request.body.transactionId}", + "payerFsp": "{$inputs.SIM2_NAME}", + "payeeFsp": "{$inputs.SIMPAYER_NAME}", + "amount": { + "amount": "20", + "currency": "{$inputs.currency2}" + }, + "expiration": "{$environment.testfsp2callbacks.data.expiration}", + "ilpPacket": "{$environment.testfsp2callbacks.data.ilpPacket}", + "condition": "{$environment.testfsp2callbacks.data.condition}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(environment.testfsp2callbackst.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(environment.testfsp2callbackst.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback transferState to be COMMITTED", + "exec": [ + "expect(environment.testfsp2callbackst.data.transferState).to.equal('COMMITTED')" + ] + }, + { + "id": 6, + "description": "Callback content-type to be transfers", + "exec": [ + "expect(environment.testfsp2callbackst.headers['content-type']).to.equal('application/vnd.interoperability.transfers+json;version={$inputs.expectedTransfersVersion}')" + ] + }, + { + "id": 7, + "description": "Request transferId same as quote request transferId", + "exec": [ + "expect('{$request.body.transferId}').to.equal('{$prev.3.request.body.transactionId}')" + ] + }, + { + "id": 8, + "description": "Request transferAmount (amount & currency) to match quote request", + "exec": [ + "expect('{$prev.3.request.body.amount.amount}').to.equal('{$request.body.amount.amount}')", + "expect('{$prev.3.request.body.amount.currency}').to.equal('{$request.body.amount.currency}')" + ] + }, + { + "id": 9, + "description": "Request FSP source the same as quote callback FSP destination", + "exec": [ + "expect('{$request.headers['FSPIOP-Source']}').to.equal(environment.testfsp2callbackst.headers['fspiop-destination'])" + ] + } + ] + }, + "url": "{$inputs.HOST_ML_API_ADAPTER}", + "scriptingEngine": "javascript", + "ignoreCallbacks": true, + "scripts": { + "preRequest": { + "exec": [ + "if (environment.ENABLE_WS_ASSERTIONS===true) {", + " await websocket.connect(environment.TESTFSP2_SDK_TESTAPI_WS_URL + '/callbacks/{$request.body.transferId}', 'testfsp2callbackst')", + "}" + ] + }, + "postRequest": { + "exec": [ + "if (environment.ENABLE_WS_ASSERTIONS===true) {", + " environment.testfsp2callbackst = await websocket.getMessage('testfsp2callbackst', environment.WS_ASSERTION_TIMEOUT)", + "}" + ] + } + } + } + ] + }, + { + "id": 8, + "name": "PAYEEFSP to SIM2", + "requests": [ + { + "id": 3, + "description": "Send quote", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "operationPath": "/quotes", + "method": "post", + "headers": { + "Accept": "application/vnd.interoperability.quotes+json;version=1.0", + "Content-Type": "application/vnd.interoperability.quotes+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.SIMPAYEE_NAME}", + "FSPIOP-Destination": "{$inputs.SIM2_NAME}", + "Authorization": "{$inputs.PAYEE_BEARER_TOKEN}" + }, + "body": { + "quoteId": "{$function.generic.generateUUID}", + "transactionId": "{$function.generic.generateUUID}", + "payer": { + "partyIdInfo": { + "partyIdType": "{$inputs.fromIdType}", + "partyIdentifier": "{$inputs.payeeIdentifier}", + "fspId": "{$inputs.SIMPAYEE_NAME}" + }, + "personalInfo": { + "complexName": { + "firstName": "{$inputs.fromFirstName}", + "lastName": "{$inputs.fromLastName}" + }, + "dateOfBirth": "{$inputs.fromDOB}" + } + }, + "payee": { + "partyIdInfo": { + "partyIdType": "{$inputs.fromIdType}", + "partyIdentifier": "{$inputs.payeefspIdentifier}", + "fspId": "{$inputs.SIM2_NAME}" + } + }, + "amountType": "RECEIVE", + "amount": { + "amount": "35", + "currency": "{$inputs.currency}" + }, + "transactionType": { + "scenario": "TRANSFER", + "initiator": "PAYER", + "initiatorType": "CONSUMER" + }, + "note": "{$inputs.note}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(environment.payeefspcallbacks.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(environment.payeefspcallbacks.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback body should contain transferAmount", + "exec": [ + "expect(environment.payeefspcallbacks.data).to.have.property('transferAmount')" + ] + }, + { + "id": 6, + "description": "Callback transferAmount (amount & currency)to match the request", + "exec": [ + "expect(environment.payeefspcallbacks.data.transferAmount.amount).to.equal('{$request.body.amount.amount}')", + "expect(environment.payeefspcallbacks.data.transferAmount.currency).to.equal('{$request.body.amount.currency}')" + ] + }, + { + "id": 7, + "description": "Callback content-type to be quotes", + "exec": [ + "expect(environment.payeefspcallbacks.headers['content-type']).to.equal('application/vnd.interoperability.quotes+json;version={$inputs.expectedQuotesVersion}')" + ] + }, + { + "id": 8, + "description": "Request amountType to be RECEIVE", + "exec": [ + "expect('{$request.body.amountType}').to.equal('RECEIVE')" + ] + }, + { + "id": 9, + "description": "Request transactionType scenario to be TRANSFER", + "exec": [ + "expect('{$request.body.transactionType.scenario}').to.equal('TRANSFER')" + ] + }, + { + "id": 10, + "description": "Request transactionType initiator to be PAYER", + "exec": [ + "expect('{$request.body.transactionType.initiator}').to.equal('PAYER')" + ] + }, + { + "id": 11, + "description": "Request transactionType initiatorType to be CONSUMER", + "exec": [ + "expect('{$request.body.transactionType.initiatorType}').to.equal('CONSUMER')" + ] + } + ] + }, + "params": { + "Type": "MSISDN", + "ID": "{$inputs.toIdValue}" + }, + "path": "/quotes", + "url": "{$inputs.HOST_QUOTING_SERVICE}", + "scriptingEngine": "javascript", + "ignoreCallbacks": true, + "scripts": { + "preRequest": { + "exec": [ + "if (environment.ENABLE_WS_ASSERTIONS===true) {", + " await websocket.connect(environment.PAYEEFSP_SDK_TESTAPI_WS_URL + '/callbacks/{$request.body.quoteId}', 'payeefspcallbacksq')", + "}" + ] + }, + "postRequest": { + "exec": [ + "if (environment.ENABLE_WS_ASSERTIONS===true) {", + " environment.payeefspcallbacks = await websocket.getMessage('payeefspcallbacksq', environment.WS_ASSERTION_TIMEOUT)", + "}", + "", + "console.log(environment.payeefspcallbacks);", + "/*", + "environment.transactionid = '{$request.body.transactionId}'", + "console.log(environment.transactionid);*/" + ] + } + } + }, + { + "id": 2, + "description": "Send transfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "operationPath": "/transfers", + "method": "post", + "headers": { + "Accept": "application/vnd.interoperability.transfers+json;version=1.0", + "Content-Type": "application/vnd.interoperability.transfers+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.SIMPAYEE_NAME}", + "Authorization": "{$inputs.PAYEE_BEARER_TOKEN}" + }, + "body": { + "transferId": "{$prev.3.request.body.transactionId}", + "payerFsp": "{$inputs.SIMPAYEE_NAME}", + "payeeFsp": "{$inputs.SIM2_NAME}", + "amount": { + "amount": "35", + "currency": "{$inputs.currency}" + }, + "expiration": "{$environment.payeefspcallbacks.data.expiration}", + "ilpPacket": "{$environment.payeefspcallbacks.data.ilpPacket}", + "condition": "{$environment.payeefspcallbacks.data.condition}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(environment.payeefspcallbackst.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(environment.payeefspcallbackst.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback transferState to be COMMITTED", + "exec": [ + "expect(environment.payeefspcallbackst.data.transferState).to.equal('COMMITTED')" + ] + }, + { + "id": 6, + "description": "Callback content-type to be transfers", + "exec": [ + "expect(environment.payeefspcallbackst.headers['content-type']).to.equal('application/vnd.interoperability.transfers+json;version={$inputs.expectedTransfersVersion}')" + ] + }, + { + "id": 7, + "description": "Request transferId same as quote request transferId", + "exec": [ + "expect('{$request.body.transferId}').to.equal('{$prev.3.request.body.transactionId}')" + ] + }, + { + "id": 8, + "description": "Request transferAmount (amount & currency) to match quote request", + "exec": [ + "expect('{$prev.3.request.body.amount.amount}').to.equal('{$request.body.amount.amount}')", + "expect('{$prev.3.request.body.amount.currency}').to.equal('{$request.body.amount.currency}')" + ] + }, + { + "id": 9, + "description": "Request FSP source the same as quote callback FSP destination", + "exec": [ + "expect('{$request.headers['FSPIOP-Source']}').to.equal(environment.payeefspcallbackst.headers['fspiop-destination'])" + ] + } + ] + }, + "url": "{$inputs.HOST_ML_API_ADAPTER}", + "scriptingEngine": "javascript", + "ignoreCallbacks": true, + "scripts": { + "preRequest": { + "exec": [ + "if (environment.ENABLE_WS_ASSERTIONS===true) {", + " await websocket.connect(environment.PAYEEFSP_SDK_TESTAPI_WS_URL + '/callbacks/{$request.body.transferId}', 'payeefspcallbackst')", + "}" + ] + }, + "postRequest": { + "exec": [ + "if (environment.ENABLE_WS_ASSERTIONS===true) {", + " environment.payeefspcallbackst = await websocket.getMessage('payeefspcallbackst', environment.WS_ASSERTION_TIMEOUT)", + "}", + "", + "console.log(environment.payeefspcallbackst);" + ] + } + } + } + ] + }, + { + "id": 9, + "name": "PAYEEFSP to PAYERFSP", + "requests": [ + { + "id": 3, + "description": "Send quote", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "operationPath": "/quotes", + "method": "post", + "headers": { + "Accept": "application/vnd.interoperability.quotes+json;version=1.0", + "Content-Type": "application/vnd.interoperability.quotes+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.SIMPAYEE_NAME}", + "FSPIOP-Destination": "{$inputs.SIMPAYER_NAME}", + "Authorization": "{$inputs.PAYEE_BEARER_TOKEN}" + }, + "body": { + "quoteId": "{$function.generic.generateUUID}", + "transactionId": "{$function.generic.generateUUID}", + "payer": { + "partyIdInfo": { + "partyIdType": "{$inputs.fromIdType}", + "partyIdentifier": "{$inputs.payeeIdentifier}", + "fspId": "{$inputs.SIMPAYEE_NAME}" + }, + "personalInfo": { + "complexName": { + "firstName": "{$inputs.fromFirstName}", + "lastName": "{$inputs.fromLastName}" + }, + "dateOfBirth": "{$inputs.fromDOB}" + } + }, + "payee": { + "partyIdInfo": { + "partyIdType": "{$inputs.fromIdType}", + "partyIdentifier": "{$inputs.payerIdentifier}", + "fspId": "{$inputs.SIMPAYER_NAME}" + } + }, + "amountType": "RECEIVE", + "amount": { + "amount": "25", + "currency": "{$inputs.currency2}" + }, + "transactionType": { + "scenario": "TRANSFER", + "initiator": "PAYER", + "initiatorType": "CONSUMER" + }, + "note": "{$inputs.note}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(environment.payeefspcallbacks.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(environment.payeefspcallbacks.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback body should contain transferAmount", + "exec": [ + "expect(environment.payeefspcallbacks.data).to.have.property('transferAmount')" + ] + }, + { + "id": 6, + "description": "Callback transferAmount (amount & currency)to match the request", + "exec": [ + "expect(environment.payeefspcallbacks.data.transferAmount.amount).to.equal('{$request.body.amount.amount}')", + "expect(environment.payeefspcallbacks.data.transferAmount.currency).to.equal('{$request.body.amount.currency}')" + ] + }, + { + "id": 7, + "description": "Callback content-type to be quotes", + "exec": [ + "expect(environment.payeefspcallbacks.headers['content-type']).to.equal('application/vnd.interoperability.quotes+json;version={$inputs.expectedQuotesVersion}')" + ] + }, + { + "id": 8, + "description": "Request amountType to be RECEIVE", + "exec": [ + "expect('{$request.body.amountType}').to.equal('RECEIVE')" + ] + }, + { + "id": 9, + "description": "Request transactionType scenario to be TRANSFER", + "exec": [ + "expect('{$request.body.transactionType.scenario}').to.equal('TRANSFER')" + ] + }, + { + "id": 10, + "description": "Request transactionType initiator to be PAYER", + "exec": [ + "expect('{$request.body.transactionType.initiator}').to.equal('PAYER')" + ] + }, + { + "id": 11, + "description": "Request transactionType initiatorType to be CONSUMER", + "exec": [ + "expect('{$request.body.transactionType.initiatorType}').to.equal('CONSUMER')" + ] + } + ] + }, + "params": { + "Type": "MSISDN", + "ID": "{$inputs.toIdValue}" + }, + "path": "/quotes", + "url": "{$inputs.HOST_QUOTING_SERVICE}", + "scriptingEngine": "javascript", + "ignoreCallbacks": true, + "scripts": { + "preRequest": { + "exec": [ + "if (environment.ENABLE_WS_ASSERTIONS===true) {", + " await websocket.connect(environment.PAYEEFSP_SDK_TESTAPI_WS_URL + '/callbacks/{$request.body.quoteId}', 'payeefspcallbacksq')", + "}" + ] + }, + "postRequest": { + "exec": [ + "if (environment.ENABLE_WS_ASSERTIONS===true) {", + " environment.payeefspcallbacks = await websocket.getMessage('payeefspcallbacksq', environment.WS_ASSERTION_TIMEOUT)", + "}", + "", + "console.log(environment.payeefspcallbacks);", + "", + "/*environment.transactionid = '{$request.body.transactionId}'", + "console.log(environment.transactionid);*/" + ] + } + } + }, + { + "id": 2, + "description": "Send transfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "operationPath": "/transfers", + "method": "post", + "headers": { + "Accept": "application/vnd.interoperability.transfers+json;version=1.0", + "Content-Type": "application/vnd.interoperability.transfers+json;version=1.0", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.SIMPAYEE_NAME}", + "Authorization": "{$inputs.PAYEE_BEARER_TOKEN}" + }, + "body": { + "transferId": "{$prev.3.request.body.transactionId}", + "payerFsp": "{$inputs.SIMPAYEE_NAME}", + "payeeFsp": "{$inputs.SIMPAYER_NAME}", + "amount": { + "amount": "25", + "currency": "{$inputs.currency2}" + }, + "expiration": "{$environment.payeefspcallbacks.data.expiration}", + "ilpPacket": "{$environment.payeefspcallbacks.data.ilpPacket}", + "condition": "{$environment.payeefspcallbacks.data.condition}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Response statusText be Accepted", + "exec": [ + "expect(response.statusText).to.equal('Accepted')" + ] + }, + { + "id": 3, + "description": "Callback Content Length not 0", + "exec": [ + "expect(environment.payeefspcallbackst.headers['Content-Length']).to.not.equal('0')" + ] + }, + { + "id": 4, + "description": "Callback FSP Destination equal to request FSP Source", + "exec": [ + "expect(environment.payeefspcallbackst.headers['fspiop-destination']).to.equal('{$request.headers['FSPIOP-Source']}')" + ] + }, + { + "id": 5, + "description": "Callback transferState to be COMMITTED", + "exec": [ + "expect(environment.payeefspcallbackst.data.transferState).to.equal('COMMITTED')" + ] + }, + { + "id": 6, + "description": "Callback content-type to be transfers", + "exec": [ + "expect(environment.payeefspcallbackst.headers['content-type']).to.equal('application/vnd.interoperability.transfers+json;version={$inputs.expectedTransfersVersion}')" + ] + }, + { + "id": 7, + "description": "Request transferId same as quote request transferId", + "exec": [ + "expect('{$request.body.transferId}').to.equal('{$prev.3.request.body.transactionId}')" + ] + }, + { + "id": 8, + "description": "Request transferAmount (amount & currency) to match quote request", + "exec": [ + "expect('{$prev.3.request.body.amount.amount}').to.equal('{$request.body.amount.amount}')", + "expect('{$prev.3.request.body.amount.currency}').to.equal('{$request.body.amount.currency}')" + ] + }, + { + "id": 9, + "description": "Request FSP source the same as quote callback FSP destination", + "exec": [ + "expect('{$request.headers['FSPIOP-Source']}').to.equal(environment.payeefspcallbackst.headers['fspiop-destination'])" + ] + } + ] + }, + "url": "{$inputs.HOST_ML_API_ADAPTER}", + "scriptingEngine": "javascript", + "ignoreCallbacks": true, + "scripts": { + "preRequest": { + "exec": [ + "if (environment.ENABLE_WS_ASSERTIONS===true) {", + " await websocket.connect(environment.PAYEEFSP_SDK_TESTAPI_WS_URL + '/callbacks/{$request.body.transferId}', 'payeefspcallbackst')", + "}" + ] + }, + "postRequest": { + "exec": [ + "if (environment.ENABLE_WS_ASSERTIONS===true) {", + " environment.payeefspcallbackst = await websocket.getMessage('payeefspcallbackst', environment.WS_ASSERTION_TIMEOUT)", + "}", + "", + "console.log(environment.payeefspcallbackst);" + ] + } + } + } + ] + }, + { + "id": 10, + "name": "Create Settlement on the current open window", + "requests": [ + { + "id": 1, + "description": "Get Existing Open Window", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "settlements" + }, + "operationPath": "/settlementWindows", + "path": "/settlementWindows", + "method": "get", + "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", + "queryParams": { + "state": "OPEN" + }, + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response status to be 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "State should be OPEN", + "exec": [ + "expect(environment.openWindowstate).to.equal(\"OPEN\")" + ] + } + ] + }, + "scriptingEngine": "javascript", + "scripts": { + "postRequest": { + "exec": [ + "var jsonData = response.body;", + "//console.log(jsonData.state);", + "", + "environment.openWindowID=jsonData[0].settlementWindowId;", + "environment.openWindowstate=jsonData[0].state;", + "", + "console.log(environment.openWindowID);" + ] + } + } + }, + { + "id": 2, + "description": "Close existent window", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "settlements" + }, + "operationPath": "/settlementWindows/{id}", + "path": "/settlementWindows/{$environment.openWindowID}", + "method": "post", + "params": { + "id": "{$environment.openWindowID}" + }, + "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", + "body": { + "state": "CLOSED", + "reason": "string" + }, + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 200 or 400", + "exec": [ + "if(response.status === 400){", + " expect(response.status).to.equal(400)", + "}", + "else{", + " expect(response.status).to.equal(200)", + "}", + "", + "" + ] + }, + { + "id": 2, + "description": "New window State should be OPEN", + "exec": [ + "", + " if (response.status === 400) {", + " ", + "expect(response.body.errorInformation.errorCode).to.eql('3100');", + "expect(response.body.errorInformation.errorDescription).to.eql('Generic validation error - Window ' + environment.openWindowID + ' is empty');", + "}else{", + " ", + " ", + " expect(environment.openWindowstate).to.equal(\"OPEN\");", + "}", + "", + "", + "" + ] + } + ] + }, + "scriptingEngine": "javascript", + "scripts": { + "postRequest": { + "exec": [ + "var jsonData = response.body;", + "var rcode = Number(response.status);", + "//console.log(rcode);", + "", + "//if (rcode == 200){", + "environment.closedWindowID= Number(environment.openWindowID);", + "environment.openWindowstate=jsonData.state;", + "", + "console.log(environment.openWindowstate);", + "console.log(environment.closedWindowID);", + "//}" + ] + } + } + }, + { + "id": 3, + "description": "Create Settlement for Closed Window with Settlement Model for Currency", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "settlements" + }, + "operationPath": "/settlements", + "path": "/settlements", + "method": "post", + "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "Settlement State should be PENDING_SETTLEMENT", + "exec": [ + "expect(environment.winstate).to.equal(\"PENDING_SETTLEMENT\")" + ] + }, + { + "id": 3, + "description": "Number of associated windows should be 1", + "exec": [ + "expect(response.body.settlementWindows.length).to.equal(1)" + ] + }, + { + "id": 4, + "description": "Associated Settlement Window ID is the correct one", + "exec": [ + "expect(response.body.settlementWindows[0].id).to.equal(environment.closedWindowID)" + ] + }, + { + "id": 5, + "description": "Associated Settlement Window state should be PENDING_SETTLEMENT", + "exec": [ + "expect(response.body.settlementWindows[0].state).to.equal(\"PENDING_SETTLEMENT\")" + ] + } + ] + }, + "scriptingEngine": "javascript", + "body": { + "settlementModel": "{$requestVariables.settlementModel}", + "reason": "TESTING", + "settlementWindows": [ + { + "id": "{$environment.closedWindowID}" + } + ] + }, + "delay": "3000", + "scripts": { + "postRequest": { + "exec": [ + "var jsonData = response.body;", + "environment.deferredSettlementId = jsonData.id;", + "environment.winstate = jsonData.state;", + "", + "" + ] + }, + "preRequest": { + "exec": [ + "//environment.closedWindowID = 6;", + "requestVariables.closedWindowID = Number(environment.closedWindowID);", + "", + "/*requestVariables.closedWindowID = Number(environment.closedWindowID);", + "*/", + "", + "requestVariables.settlementModel = environment.settlementModels.deferred[environment.currency]", + "", + "console.log(requestVariables.settlementModel)" + ] + } + } + }, + { + "id": 4, + "description": "Create Settlement for Closed Window for Default Settlement Model", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "settlements" + }, + "operationPath": "/settlements", + "path": "/settlements", + "method": "post", + "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "Settlement State should be PENDING_SETTLEMENT", + "exec": [ + "expect(environment.winstate).to.equal(\"PENDING_SETTLEMENT\")" + ] + }, + { + "id": 3, + "description": "Number of associated windows should be 1", + "exec": [ + "expect(response.body.settlementWindows.length).to.equal(1)" + ] + }, + { + "id": 4, + "description": "Associated Settlement Window ID is the correct one", + "exec": [ + "expect(response.body.settlementWindows[0].id).to.equal(environment.closedWindowID)" + ] + }, + { + "id": 5, + "description": "Associated Settlement Window state should be PENDING_SETTLEMENT", + "exec": [ + "expect(response.body.settlementWindows[0].state).to.equal(\"PENDING_SETTLEMENT\")" + ] + } + ] + }, + "scriptingEngine": "javascript", + "body": { + "settlementModel": "{$requestVariables.settlementModel}", + "reason": "TESTING", + "settlementWindows": [ + { + "id": "{$environment.closedWindowID}" + } + ] + }, + "delay": "3000", + "scripts": { + "postRequest": { + "exec": [ + "var jsonData = response.body;", + "environment.defaultSettlementId = jsonData.id;", + "environment.winstate = jsonData.state;", + "", + "" + ] + }, + "preRequest": { + "exec": [ + "requestVariables.settlementModel = environment.settlementModels.deferred.default", + "", + "console.log(requestVariables.settlementModel)" + ] + } + } + } + ] + }, + { + "id": 11, + "name": "Store Settlement&Position Account Balances After Transfers", + "requests": [ + { + "id": 1, + "description": "Get balances for testfsp1", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.SIM1_NAME}/accounts", + "method": "get", + "params": { + "name": "{$inputs.SIM1_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + } + ] + }, + "scriptingEngine": "javascript", + "scripts": { + "postRequest": { + "exec": [ + "var jsonData = response.body;", + "console.log(jsonData);", + "const {$inputs.SIM1_NAME} = {", + " ...environment.balances[environment.SIM1_NAME],", + " ...{afterTransfer: {}}", + "}", + "", + "for (const i in jsonData) {", + " if (!Object.keys({$inputs.SIM1_NAME}.afterTransfer).includes(jsonData[i].currency)) {", + " {$inputs.SIM1_NAME}.afterTransfer[jsonData[i].currency] = {}", + " }", + " {$inputs.SIM1_NAME}.afterTransfer[jsonData[i].currency][jsonData[i].ledgerAccountType] = jsonData[i].value", + " environment.balances = {", + " ...environment.balances,", + " {$inputs.SIM1_NAME}", + " }", + "}", + "", + "", + "console.log(environment.balances)" + ] + }, + "preRequest": { + "exec": [ + "environment.balances.afterTransfer = {}" + ] + } + } + }, + { + "id": 2, + "description": "Get balances for testfsp2", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.SIM2_NAME}/accounts", + "method": "get", + "params": { + "name": "{$inputs.SIM2_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + } + ] + }, + "scriptingEngine": "javascript", + "scripts": { + "postRequest": { + "exec": [ + "var jsonData = response.body;", + "console.log(jsonData);", + "const {$inputs.SIM2_NAME} = {", + " ...environment.balances[environment.SIM2_NAME],", + " ...{afterTransfer: {}}", + "}", + "", + "for (const i in jsonData) {", + " if (!Object.keys({$inputs.SIM2_NAME}.afterTransfer).includes(jsonData[i].currency)) {", + " {$inputs.SIM2_NAME}.afterTransfer[jsonData[i].currency] = {}", + " }", + " {$inputs.SIM2_NAME}.afterTransfer[jsonData[i].currency][jsonData[i].ledgerAccountType] = jsonData[i].value", + " environment.balances = {", + " ...environment.balances,", + " {$inputs.SIM2_NAME}", + " }", + "}", + "", + "", + "console.log(environment.balances)" + ] + } + } + }, + { + "id": 3, + "description": "Get balances for ttkdfsp", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.SIMPAYER_NAME}/accounts", + "method": "get", + "params": { + "name": "{$inputs.SIMPAYER_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + } + ] + }, + "scriptingEngine": "javascript", + "scripts": { + "postRequest": { + "exec": [ + "var jsonData = response.body;", + "console.log(jsonData);", + "const {$inputs.SIMPAYER_NAME} = {", + " ...environment.balances[environment.SIMPAYER_NAME],", + " ...{afterTransfer: {}}", + "}", + "", + "for (const i in jsonData) {", + " if (!Object.keys({$inputs.SIMPAYER_NAME}.afterTransfer).includes(jsonData[i].currency)) {", + " {$inputs.SIMPAYER_NAME}.afterTransfer[jsonData[i].currency] = {}", + " }", + " {$inputs.SIMPAYER_NAME}.afterTransfer[jsonData[i].currency][jsonData[i].ledgerAccountType] = jsonData[i].value", + " environment.balances = {", + " ...environment.balances,", + " {$inputs.SIMPAYER_NAME}", + " }", + "}", + "", + "", + "console.log(environment.balances)" + ] + } + } + }, + { + "id": 4, + "description": "Get balances for payeefsp", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.SIMPAYEE_NAME}/accounts", + "method": "get", + "params": { + "name": "{$inputs.SIMPAYEE_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + } + ] + }, + "scriptingEngine": "javascript", + "scripts": { + "postRequest": { + "exec": [ + "var jsonData = response.body;", + "console.log(jsonData);", + "const {$inputs.SIMPAYEE_NAME} = {", + " ...environment.balances[environment.SIMPAYEE_NAME],", + " ...{afterTransfer: {}}", + "}", + "", + "for (const i in jsonData) {", + " if (!Object.keys({$inputs.SIMPAYEE_NAME}.afterTransfer).includes(jsonData[i].currency)) {", + " {$inputs.SIMPAYEE_NAME}.afterTransfer[jsonData[i].currency] = {}", + " }", + " {$inputs.SIMPAYEE_NAME}.afterTransfer[jsonData[i].currency][jsonData[i].ledgerAccountType] = jsonData[i].value", + " environment.balances = {", + " ...environment.balances,", + " {$inputs.SIMPAYEE_NAME}", + " }", + "}", + "", + "", + "console.log(environment.balances)" + ] + } + } + } + ] + }, + { + "id": 12, + "name": "Prepare-settlements", + "requests": [ + { + "id": 4, + "description": "Prepare Settlement with deferred settlement model for currency", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "settlements" + }, + "operationPath": "/settlements/{id}", + "path": "/settlements/{$environment.deferredSettlementId}", + "method": "get", + "params": { + "id": "{$environment.deferredSettlementId}" + }, + "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code status is 200", + "exec": [ + "//if(environment.WINDOWISEMPTY === false){", + "expect(response.status).to.equal(200)", + "//}" + ] + } + ] + }, + "scriptingEngine": "javascript", + "delay": "2500", + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "console.log(environment.deferredSettlementId);", + "//environment.settlementId = 6;", + "var i=0;", + "var dfspsacc = [];", + "var callbackpayer;", + "", + "environment.winstate = res.settlementWindows[0].state;", + "", + "console.log(environment.winstate);", + "if(environment.winstate===\"PENDING_SETTLEMENT\"){", + "", + "res.participants.map(function (participant) {", + " participant.accounts.filter(account => account.netSettlementAmount.currency === environment.currency).forEach(curAccount => {", + "//for(const curAccount of account) { ", + "", + " dfspsacc[i] = {", + " dfspid: participant.id,", + " dfspaccid: curAccount.id ", + " }", + " i++;", + "//}", + "})", + " })", + " ", + "", + "const config = { headers: {'Content-Type': 'application/json','FSPIOP-Source': 'testingtoolkitdfsp'} };", + "for(let dfspsaccx of dfspsacc){", + " console.log(dfspsaccx.dfspid,dfspsaccx.dfspaccid)", + "callbackpayer = await axios.put(environment.HOST_CENTRAL_SETTLEMENT + '/settlements/'+environment.deferredSettlementId, {", + " \"participants\": [", + " {", + " \"id\": dfspsaccx.dfspid,", + " \"accounts\": [", + " {", + " \"id\": dfspsaccx.dfspaccid,", + " \"reason\": \"Transfers recorded for payer\",", + " \"state\": \"PS_TRANSFERS_RECORDED\"", + " }", + " ]", + " }", + " ]", + " },config) ", + "console.log(callbackpayer.data); ", + "}", + "}else{", + " console.log(\"Window is empty\")", + "}", + "/*res.participants.map(participant => {", + " participant.accounts.filter(account => account.netSettlementAmount.currency === pm.environment.get('SIMPAYER_CURRENCY'))", + " .forEach(curAccount => {*/", + " " + ] + }, + "preRequest": { + "exec": [ + "" + ] + } + } + }, + { + "id": 5, + "description": "check state for participants after prepare deferred settlement model", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "settlements" + }, + "operationPath": "/settlements/{id}", + "path": "/settlements/{$environment.deferredSettlementId}", + "method": "get", + "params": { + "id": "{$environment.deferredSettlementId}" + }, + "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "scriptingEngine": "javascript", + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code status is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "Check status PS_TRANSFERS_RECORDED", + "exec": [ + "expect(response.body.state).to.eql(\"PS_TRANSFERS_RECORDED\");" + ] + }, + { + "id": 3, + "description": "Check status for window is PENDING SETTLEMENT", + "exec": [ + " expect(response.body.settlementWindows[0].state).to.eql(\"PENDING_SETTLEMENT\");" + ] + }, + { + "id": 4, + "description": "Account state is PS_TRANSFERS_RECORDED for all accounts", + "exec": [ + "expect(environment.controlvar).to.equal(true)" + ] + } + ] + }, + "scripts": { + "postRequest": { + "exec": [ + "//Boolean isok = false;\r", + "var res = response.body;\r", + "var isok = true;\r", + "\r", + "try{\r", + "res.participants.map(function (participant) {\r", + " participant.accounts.filter(account => account.netSettlementAmount.currency === environment.currency).every(curAccount => {\r", + " if(isok === true){ \r", + " if(curAccount.state === \"PS_TRANSFERS_RECORDED\"){\r", + " isok= true;\r", + " \r", + " \r", + " \r", + " }else{\r", + " isok= false;\r", + " // console.log(isok);\r", + " \r", + " }\r", + " } \r", + " })\r", + "})\r", + "\r", + "}catch(exception){\r", + " console.log(exception);\r", + "}\r", + "\r", + "environment.controlvar = isok;" + ] + } + } + }, + { + "id": 6, + "description": "Prepare Settlement with default settlement model", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "settlements" + }, + "operationPath": "/settlements/{id}", + "path": "/settlements/{$environment.defaultSettlementId}", + "method": "get", + "params": { + "id": "{$environment.defaultSettlementId}" + }, + "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code status is 200", + "exec": [ + "//if(environment.WINDOWISEMPTY === false){", + "expect(response.status).to.equal(200)", + "//}" + ] + } + ] + }, + "scriptingEngine": "javascript", + "delay": "2500", + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "console.log(environment.defaultSettlementId);", + "//environment.settlementId = 6;", + "var i=0;", + "var dfspsacc = [];", + "var callbackpayer;", + "", + "environment.winstate = res.settlementWindows[0].state;", + "", + "console.log(environment.winstate);", + "if(environment.winstate===\"PENDING_SETTLEMENT\"){", + "", + "res.participants.map(function (participant) {", + " participant.accounts.filter(account => account.netSettlementAmount.currency === environment.currency2).forEach(curAccount => {", + "//for(const curAccount of account) { ", + "", + " dfspsacc[i] = {", + " dfspid: participant.id,", + " dfspaccid: curAccount.id ", + " }", + " i++;", + "//}", + "})", + " })", + " ", + "", + "const config = { headers: {'Content-Type': 'application/json','FSPIOP-Source': 'testingtoolkitdfsp'} };", + "for(let dfspsaccx of dfspsacc){", + " console.log(dfspsaccx.dfspid,dfspsaccx.dfspaccid)", + "callbackpayer = await axios.put(environment.HOST_CENTRAL_SETTLEMENT + '/settlements/'+environment.defaultSettlementId, {", + " \"participants\": [", + " {", + " \"id\": dfspsaccx.dfspid,", + " \"accounts\": [", + " {", + " \"id\": dfspsaccx.dfspaccid,", + " \"reason\": \"Transfers recorded for payer\",", + " \"state\": \"PS_TRANSFERS_RECORDED\"", + " }", + " ]", + " }", + " ]", + " },config) ", + "console.log(callbackpayer.data); ", + "}", + "}else{", + " console.log(\"Window is empty\")", + "}", + "/*res.participants.map(participant => {", + " participant.accounts.filter(account => account.netSettlementAmount.currency === pm.environment.get('SIMPAYER_CURRENCY'))", + " .forEach(curAccount => {*/", + " " + ] + }, + "preRequest": { + "exec": [ + "" + ] + } + } + }, + { + "id": 7, + "description": "check state for participants after prepare default settlement", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "settlements" + }, + "operationPath": "/settlements/{id}", + "path": "/settlements/{$environment.deferredSettlementId}", + "method": "get", + "params": { + "id": "{$environment.deferredSettlementId}" + }, + "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "scriptingEngine": "javascript", + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code status is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "Check status PS_TRANSFERS_RECORDED", + "exec": [ + "expect(response.body.state).to.eql(\"PS_TRANSFERS_RECORDED\");" + ] + }, + { + "id": 3, + "description": "Check status for window is PENDING SETTLEMENT", + "exec": [ + " expect(response.body.settlementWindows[0].state).to.eql(\"PENDING_SETTLEMENT\");" + ] + }, + { + "id": 4, + "description": "Account state is PS_TRANSFERS_RECORDED for all accounts", + "exec": [ + "expect(environment.controlvar).to.equal(true)" + ] + } + ] + }, + "scripts": { + "postRequest": { + "exec": [ + "//Boolean isok = false;\r", + "var res = response.body;\r", + "var isok = true;\r", + "\r", + "try{\r", + "res.participants.map(function (participant) {\r", + " participant.accounts.filter(account => account.netSettlementAmount.currency === environment.currency2).every(curAccount => {\r", + " if(isok === true){ \r", + " if(curAccount.state === \"PS_TRANSFERS_RECORDED\"){\r", + " isok= true;\r", + " \r", + " \r", + " \r", + " }else{\r", + " isok= false;\r", + " // console.log(isok);\r", + " \r", + " }\r", + " } \r", + " })\r", + "})\r", + "\r", + "}catch(exception){\r", + " console.log(exception);\r", + "}\r", + "\r", + "environment.controlvar = isok;" + ] + } + } + } + ] + }, + { + "id": 13, + "name": "Store Settlement&Position Account Balances After Prepare", + "requests": [ + { + "id": 1, + "description": "Get balances for testfsp1", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.SIM1_NAME}/accounts", + "method": "get", + "params": { + "name": "{$inputs.SIM1_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "testfsp1 account balance before and after prepare should be the same", + "exec": [ + "expect(environment.balances[environment.SIM1_NAME].afterPrepare).to.deep.equal(environment.balances[environment.SIM1_NAME].afterTransfer)" + ] + } + ] + }, + "scriptingEngine": "javascript", + "scripts": { + "postRequest": { + "exec": [ + "var jsonData = response.body;", + "console.log(jsonData);", + "const {$inputs.SIM1_NAME} = {", + " ...environment.balances[environment.SIM1_NAME],", + " ...{afterPrepare: {}}", + "}", + "", + "for (const i in jsonData) {", + " if (!Object.keys({$inputs.SIM1_NAME}.afterPrepare).includes(jsonData[i].currency)) {", + " {$inputs.SIM1_NAME}.afterPrepare[jsonData[i].currency] = {}", + " }", + " {$inputs.SIM1_NAME}.afterPrepare[jsonData[i].currency][jsonData[i].ledgerAccountType] = jsonData[i].value", + " environment.balances = {", + " ...environment.balances,", + " {$inputs.SIM1_NAME}", + " }", + "}", + "", + "console.log(environment.balances)", + "console.log('afterPreapre: ',JSON.stringify(environment.balances[environment.SIM1_NAME].afterPrepare, null, 2)) ", + "console.log('afterTransfer: ',JSON.stringify(environment.balances[environment.SIM1_NAME].afterTransfer, null, 2))", + "" + ] + }, + "preRequest": { + "exec": [ + "environment.balances.afterPrepare = {}" + ] + } + } + }, + { + "id": 2, + "description": "Get balances for testfsp2", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.SIM2_NAME}/accounts", + "method": "get", + "params": { + "name": "{$inputs.SIM2_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "testfsp2 account balance before and after prepare should be the same", + "exec": [ + "expect(environment.balances[environment.SIM2_NAME].afterPrepare).to.deep.equal(environment.balances[environment.SIM2_NAME].afterTransfer)", + "" + ] + } + ] + }, + "scriptingEngine": "javascript", + "scripts": { + "postRequest": { + "exec": [ + "var jsonData = response.body;", + "console.log(jsonData);", + "const {$inputs.SIM2_NAME} = {", + " ...environment.balances[environment.SIM2_NAME],", + " ...{afterPrepare: {}}", + "}", + "", + "for (const i in jsonData) {", + " if (!Object.keys({$inputs.SIM2_NAME}.afterPrepare).includes(jsonData[i].currency)) {", + " {$inputs.SIM2_NAME}.afterPrepare[jsonData[i].currency] = {}", + " }", + " {$inputs.SIM2_NAME}.afterPrepare[jsonData[i].currency][jsonData[i].ledgerAccountType] = jsonData[i].value", + " environment.balances = {", + " ...environment.balances,", + " {$inputs.SIM2_NAME}", + " }", + "}", + "", + "", + "console.log(environment.balances)", + "console.log('afterPreapre: ',JSON.stringify(environment.balances[environment.SIM2_NAME].afterPrepare, null, 2)) ", + "console.log('afterTransfer: ',JSON.stringify(environment.balances[environment.SIM2_NAME].afterTransfer, null, 2))" + ] + } + } + }, + { + "id": 3, + "description": "Get balances for payerfsp", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.SIMPAYER_NAME}/accounts", + "method": "get", + "params": { + "name": "{$inputs.SIMPAYER_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "payerfsp account balance before and after prepare should be the same", + "exec": [ + "expect(environment.balances[environment.SIMPAYER_NAME].afterPrepare).to.deep.equal(environment.balances[environment.SIMPAYER_NAME].afterTransfer)" + ] + } + ] + }, + "scriptingEngine": "javascript", + "scripts": { + "postRequest": { + "exec": [ + "var jsonData = response.body;", + "console.log(jsonData);", + "const {$inputs.SIMPAYER_NAME} = {", + " ...environment.balances[environment.SIMPAYER_NAME],", + " ...{afterPrepare: {}}", + "}", + "", + "for (const i in jsonData) {", + " if (!Object.keys({$inputs.SIMPAYER_NAME}.afterPrepare).includes(jsonData[i].currency)) {", + " {$inputs.SIMPAYER_NAME}.afterPrepare[jsonData[i].currency] = {}", + " }", + " {$inputs.SIMPAYER_NAME}.afterPrepare[jsonData[i].currency][jsonData[i].ledgerAccountType] = jsonData[i].value", + " environment.balances = {", + " ...environment.balances,", + " {$inputs.SIMPAYER_NAME}", + " }", + "}", + "", + "", + "console.log(environment.balances)" + ] + } + } + }, + { + "id": 4, + "description": "Get balances for payeefsp", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.SIMPAYEE_NAME}/accounts", + "method": "get", + "params": { + "name": "{$inputs.SIMPAYEE_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "payeefsp account balance before and after prepare should be the same", + "exec": [ + "expect(environment.balances[environment.SIMPAYEE_NAME].afterPrepare).to.deep.equal(environment.balances[environment.SIMPAYEE_NAME].afterTransfer)" + ] + } + ] + }, + "scriptingEngine": "javascript", + "scripts": { + "postRequest": { + "exec": [ + "var jsonData = response.body;", + "console.log(jsonData);", + "const {$inputs.SIMPAYEE_NAME} = {", + " ...environment.balances[environment.SIMPAYEE_NAME],", + " ...{afterPrepare: {}}", + "}", + "", + "for (const i in jsonData) {", + " if (!Object.keys({$inputs.SIMPAYEE_NAME}.afterPrepare).includes(jsonData[i].currency)) {", + " {$inputs.SIMPAYEE_NAME}.afterPrepare[jsonData[i].currency] = {}", + " }", + " {$inputs.SIMPAYEE_NAME}.afterPrepare[jsonData[i].currency][jsonData[i].ledgerAccountType] = jsonData[i].value", + " environment.balances = {", + " ...environment.balances,", + " {$inputs.SIMPAYEE_NAME}", + " }", + "}", + "", + "", + "console.log(environment.balances)" + ] + } + } + } + ] + }, + { + "id": 14, + "name": "reserve-settlement", + "requests": [ + { + "id": 4, + "description": "reserve Settlement with Currency Deferred Settlement Model", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "settlements" + }, + "operationPath": "/settlements/{id}", + "path": "/settlements/{$environment.deferredSettlementId}", + "method": "get", + "params": { + "id": "{$environment.deferredSettlementId}" + }, + "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code status is 200", + "exec": [ + "//if(environment.WINDOWISEMPTY === false){", + "expect(response.status).to.equal(200)", + "//}" + ] + } + ] + }, + "scriptingEngine": "javascript", + "delay": "2500", + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "console.log(environment.deferredSettlementId);", + "//environment.settlementId = 6;", + "var i=0;", + "var dfspsacc = [];", + "var callbackpayer;", + "", + "environment.winstate = res.settlementWindows[0].state;", + "", + "console.log(environment.winstate);", + "if(environment.winstate===\"PENDING_SETTLEMENT\"){", + "", + "res.participants.map(function (participant) {", + " participant.accounts.filter(account => account.netSettlementAmount.currency === environment.currency).forEach(curAccount => {", + "//for(const curAccount of account) { ", + "", + " dfspsacc[i] = {", + " dfspid: participant.id,", + " dfspaccid: curAccount.id ", + " }", + " i++;", + "//}", + "})", + " })", + " ", + "", + "const config = { headers: {'Content-Type': 'application/json','FSPIOP-Source': 'testingtoolkitdfsp'} };", + "for(let dfspsaccx of dfspsacc){", + " console.log(dfspsaccx.dfspid,dfspsaccx.dfspaccid)", + "callbackpayer = await axios.put(environment.HOST_CENTRAL_SETTLEMENT + '/settlements/'+environment.deferredSettlementId, {", + " \"participants\": [", + " {", + " \"id\": dfspsaccx.dfspid,", + " \"accounts\": [", + " {", + " \"id\": dfspsaccx.dfspaccid,", + " \"reason\": \"Transfers reserved\",", + " \"state\": \"PS_TRANSFERS_RESERVED\"", + " }", + " ]", + " }", + " ]", + " },config) ", + "console.log(callbackpayer.data); ", + "}", + "}else{", + " console.log(\"Window is empty\")", + "}", + "/*res.participants.map(participant => {", + " participant.accounts.filter(account => account.netSettlementAmount.currency === pm.environment.get('SIMPAYER_CURRENCY'))", + " .forEach(curAccount => {*/", + " " + ] + }, + "preRequest": { + "exec": [ + "" + ] + } + } + }, + { + "id": 5, + "description": "check state for participants after reserve with deferred settlement model", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "settlements" + }, + "operationPath": "/settlements/{id}", + "path": "/settlements/{$environment.deferredSettlementId}", + "method": "get", + "params": { + "id": "{$environment.deferredSettlementId}" + }, + "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "scriptingEngine": "javascript", + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code status is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "Check status PS_TRANSFERS_RESERVED", + "exec": [ + "expect(response.body.state).to.eql(\"PS_TRANSFERS_RESERVED\");" + ] + }, + { + "id": 3, + "description": "Check status for window is PENDING SETTLEMENT", + "exec": [ + " expect(response.body.settlementWindows[0].state).to.eql(\"PENDING_SETTLEMENT\");" + ] + }, + { + "id": 4, + "description": "Account state is PS_TRANSFERS_RESERVEDfor all accounts", + "exec": [ + "expect(environment.controlvar).to.equal(true)" + ] + } + ] + }, + "scripts": { + "postRequest": { + "exec": [ + "//Boolean isok = false;\r", + "var res = response.body;\r", + "var isok = true;\r", + "\r", + "try{\r", + "res.participants.map(function (participant) {\r", + " participant.accounts.filter(account => account.netSettlementAmount.currency === environment.currency).every(curAccount => {\r", + " if(isok === true){ \r", + " if(curAccount.state === \"PS_TRANSFERS_RESERVED\"){\r", + " isok= true;\r", + " \r", + " \r", + " \r", + " }else{\r", + " isok= false;\r", + " // console.log(isok);\r", + " \r", + " }\r", + " } \r", + " })\r", + "})\r", + "\r", + "}catch(exception){\r", + " console.log(exception);\r", + "}\r", + "\r", + "environment.controlvar = isok;" + ] + } + } + }, + { + "id": 6, + "description": "reserve Settlement with default settlement model", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "settlements" + }, + "operationPath": "/settlements/{id}", + "path": "/settlements/{$environment.defaultSettlementId}", + "method": "get", + "params": { + "id": "{$environment.defaultSettlementId}" + }, + "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code status is 200", + "exec": [ + "//if(environment.WINDOWISEMPTY === false){", + "expect(response.status).to.equal(200)", + "//}" + ] + } + ] + }, + "scriptingEngine": "javascript", + "delay": "2500", + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "console.log(environment.defaultSettlementId);", + "//environment.settlementId = 6;", + "var i=0;", + "var dfspsacc = [];", + "var callbackpayer;", + "", + "environment.winstate = res.settlementWindows[0].state;", + "", + "console.log(environment.winstate);", + "if(environment.winstate===\"PENDING_SETTLEMENT\"){", + "", + "res.participants.map(function (participant) {", + " participant.accounts.filter(account => account.netSettlementAmount.currency === environment.currency2).forEach(curAccount => {", + "//for(const curAccount of account) { ", + "", + " dfspsacc[i] = {", + " dfspid: participant.id,", + " dfspaccid: curAccount.id ", + " }", + " i++;", + "//}", + "})", + " })", + " ", + "", + "const config = { headers: {'Content-Type': 'application/json','FSPIOP-Source': 'testingtoolkitdfsp'} };", + "for(let dfspsaccx of dfspsacc){", + " console.log(dfspsaccx.dfspid,dfspsaccx.dfspaccid)", + "callbackpayer = await axios.put(environment.HOST_CENTRAL_SETTLEMENT + '/settlements/'+environment.defaultSettlementId, {", + " \"participants\": [", + " {", + " \"id\": dfspsaccx.dfspid,", + " \"accounts\": [", + " {", + " \"id\": dfspsaccx.dfspaccid,", + " \"reason\": \"Transfers reserved\",", + " \"state\": \"PS_TRANSFERS_RESERVED\"", + " }", + " ]", + " }", + " ]", + " },config) ", + "console.log(callbackpayer.data); ", + "}", + "}else{", + " console.log(\"Window is empty\")", + "}", + "/*res.participants.map(participant => {", + " participant.accounts.filter(account => account.netSettlementAmount.currency === pm.environment.get('SIMPAYER_CURRENCY'))", + " .forEach(curAccount => {*/", + " " + ] + }, + "preRequest": { + "exec": [ + "" + ] + } + } + }, + { + "id": 7, + "description": "check state for participants after reserve with default settlement model", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "settlements" + }, + "operationPath": "/settlements/{id}", + "path": "/settlements/{$environment.defaultSettlementId}", + "method": "get", + "params": { + "id": "{$environment.defaultSettlementId}" + }, + "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "scriptingEngine": "javascript", + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code status is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "Check status PS_TRANSFERS_RESERVED", + "exec": [ + "expect(response.body.state).to.eql(\"PS_TRANSFERS_RESERVED\");" + ] + }, + { + "id": 3, + "description": "Check status for window is PENDING SETTLEMENT", + "exec": [ + " expect(response.body.settlementWindows[0].state).to.eql(\"PENDING_SETTLEMENT\");" + ] + }, + { + "id": 4, + "description": "Account state is PS_TRANSFERS_RESERVEDfor all accounts", + "exec": [ + "expect(environment.controlvar).to.equal(true)" + ] + } + ] + }, + "scripts": { + "postRequest": { + "exec": [ + "//Boolean isok = false;\r", + "var res = response.body;\r", + "var isok = true;\r", + "\r", + "try{\r", + "res.participants.map(function (participant) {\r", + " participant.accounts.filter(account => account.netSettlementAmount.currency === environment.currency2).every(curAccount => {\r", + " if(isok === true){ \r", + " if(curAccount.state === \"PS_TRANSFERS_RESERVED\"){\r", + " isok= true;\r", + " \r", + " \r", + " \r", + " }else{\r", + " isok= false;\r", + " // console.log(isok);\r", + " \r", + " }\r", + " } \r", + " })\r", + "})\r", + "\r", + "}catch(exception){\r", + " console.log(exception);\r", + "}\r", + "\r", + "environment.controlvar = isok;" + ] + } + } + } + ] + }, + { + "id": 15, + "name": "Store Settlement&Position Account Balances After Reserve", + "requests": [ + { + "id": 1, + "description": "Get balances for testfsp1", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.SIM1_NAME}/accounts", + "method": "get", + "params": { + "name": "{$inputs.SIM1_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "testfsp1 account balance before and after reserve should be the same", + "exec": [ + "expect(environment.balances[environment.SIM1_NAME].afterReserve).to.deep.equal(environment.balances[environment.SIM1_NAME].afterTransfer)" + ] + } + ] + }, + "scriptingEngine": "javascript", + "scripts": { + "postRequest": { + "exec": [ + "var jsonData = response.body;", + "console.log(jsonData);", + "const {$inputs.SIM1_NAME} = {", + " ...environment.balances[environment.SIM1_NAME],", + " ...{afterReserve: {}}", + "}", + "", + "for (const i in jsonData) {", + " if (!Object.keys({$inputs.SIM1_NAME}.afterReserve).includes(jsonData[i].currency)) {", + " {$inputs.SIM1_NAME}.afterReserve[jsonData[i].currency] = {}", + " }", + " {$inputs.SIM1_NAME}.afterReserve[jsonData[i].currency][jsonData[i].ledgerAccountType] = jsonData[i].value", + " environment.balances = {", + " ...environment.balances,", + " {$inputs.SIM1_NAME}", + " }", + "}", + "", + "", + "console.log(environment.balances)" + ] + }, + "preRequest": { + "exec": [ + "environment.balances.afterReserve = {}" + ] + } + } + }, + { + "id": 2, + "description": "Get balances for testfsp2", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.SIM2_NAME}/accounts", + "method": "get", + "params": { + "name": "{$inputs.SIM2_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "testfsp2 account for currency balance before and after reserve should be the same", + "exec": [ + "expect(environment.balances[environment.SIM2_NAME].afterReserve[environment.currency]).to.deep.equal(environment.balances[environment.SIM2_NAME].beforeTransfer[environment.currency])", + "" + ] + }, + { + "id": 3, + "description": "testfsp2 account for currency2 balance before and after reserve should be the same", + "exec": [ + "expect(environment.balances[environment.SIM2_NAME].afterReserve[environment.currency2]).to.deep.equal(environment.balances[environment.SIM2_NAME].afterTransfer[environment.currency2])" + ] + } + ] + }, + "scriptingEngine": "javascript", + "scripts": { + "postRequest": { + "exec": [ + "var jsonData = response.body;", + "console.log(jsonData);", + "const {$inputs.SIM2_NAME} = {", + " ...environment.balances[environment.SIM2_NAME],", + " ...{afterReserve: {}}", + "}", + "", + "for (const i in jsonData) {", + " if (!Object.keys({$inputs.SIM2_NAME}.afterReserve).includes(jsonData[i].currency)) {", + " {$inputs.SIM2_NAME}.afterReserve[jsonData[i].currency] = {}", + " }", + " {$inputs.SIM2_NAME}.afterReserve[jsonData[i].currency][jsonData[i].ledgerAccountType] = jsonData[i].value", + " environment.balances = {", + " ...environment.balances,", + " {$inputs.SIM2_NAME}", + " }", + "}", + "", + "", + "console.log(environment.balances)" + ] + } + } + }, + { + "id": 3, + "description": "Get balances for payerfsp", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.SIMPAYER_NAME}/accounts", + "method": "get", + "params": { + "name": "{$inputs.SIMPAYER_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "payerfsp account for currency balance before and after reserve should be the same", + "exec": [ + "expect(environment.balances[environment.SIMPAYER_NAME].afterReserve[environment.currency]).to.deep.equal(environment.balances[environment.SIMPAYER_NAME].afterTransfer[environment.currency])", + "" + ] + }, + { + "id": 3, + "description": "payerfsp account for currency2 balance before and after reserve should be the same", + "exec": [ + "expect(environment.balances[environment.SIMPAYER_NAME].afterReserve[environment.currency2]).to.deep.equal(environment.balances[environment.SIMPAYER_NAME].beforeTransfer[environment.currency2])" + ] + } + ] + }, + "scriptingEngine": "javascript", + "scripts": { + "postRequest": { + "exec": [ + "var jsonData = response.body;", + "console.log(jsonData);", + "const {$inputs.SIMPAYER_NAME} = {", + " ...environment.balances[environment.SIMPAYER_NAME],", + " ...{afterReserve: {}}", + "}", + "", + "for (const i in jsonData) {", + " if (!Object.keys({$inputs.SIMPAYER_NAME}.afterReserve).includes(jsonData[i].currency)) {", + " {$inputs.SIMPAYER_NAME}.afterReserve[jsonData[i].currency] = {}", + " }", + " {$inputs.SIMPAYER_NAME}.afterReserve[jsonData[i].currency][jsonData[i].ledgerAccountType] = jsonData[i].value", + " environment.balances = {", + " ...environment.balances,", + " {$inputs.SIMPAYER_NAME}", + " }", + "}", + "", + "", + "console.log(environment.balances)" + ] + } + } + }, + { + "id": 4, + "description": "Get balances for payeefsp", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.SIMPAYEE_NAME}/accounts", + "method": "get", + "params": { + "name": "{$inputs.SIMPAYEE_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "payeefsp account for currency balance before and after Reserve should be the same", + "exec": [ + "expect(environment.balances[environment.SIMPAYEE_NAME].afterReserve[environment.currency]).to.deep.equal(environment.balances[environment.SIMPAYEE_NAME].afterTransfer[environment.currency])", + "" + ] + }, + { + "id": 3, + "description": "payeefsp account for currency 2 balance before and after Reserve should be the same", + "exec": [ + "expect(environment.balances[environment.SIMPAYEE_NAME].afterReserve[environment.currency2]).to.deep.equal(environment.balances[environment.SIMPAYEE_NAME].beforeTransfer[environment.currency2])" + ] + } + ] + }, + "scriptingEngine": "javascript", + "scripts": { + "postRequest": { + "exec": [ + "var jsonData = response.body;", + "console.log(jsonData);", + "const {$inputs.SIMPAYEE_NAME} = {", + " ...environment.balances[environment.SIMPAYEE_NAME],", + " ...{afterReserve: {}}", + "}", + "", + "for (const i in jsonData) {", + " if (!Object.keys({$inputs.SIMPAYEE_NAME}.afterReserve).includes(jsonData[i].currency)) {", + " {$inputs.SIMPAYEE_NAME}.afterReserve[jsonData[i].currency] = {}", + " }", + " {$inputs.SIMPAYEE_NAME}.afterReserve[jsonData[i].currency][jsonData[i].ledgerAccountType] = jsonData[i].value", + " environment.balances = {", + " ...environment.balances,", + " {$inputs.SIMPAYEE_NAME}", + " }", + "}", + "", + "", + "console.log(environment.balances)" + ] + } + } + } + ] + }, + { + "id": 16, + "name": "commit-settlement", + "requests": [ + { + "id": 4, + "description": "commit Settlement with deferred settlement model", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "settlements" + }, + "operationPath": "/settlements/{id}", + "path": "/settlements/{$environment.deferredSettlementId}", + "method": "get", + "params": { + "id": "{$environment.deferredSettlementId}" + }, + "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code status is 200", + "exec": [ + "//if(environment.WINDOWISEMPTY === false){", + "expect(response.status).to.equal(200)", + "//}" + ] + } + ] + }, + "scriptingEngine": "javascript", + "delay": "2500", + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "console.log(environment.deferredSettlementId);", + "//environment.settlementId = 6;", + "var i=0;", + "var dfspsacc = [];", + "var callbackpayer;", + "", + "environment.winstate = res.settlementWindows[0].state;", + "", + "console.log(environment.winstate);", + "if(environment.winstate===\"PENDING_SETTLEMENT\"){", + "", + "res.participants.map(function (participant) {", + " participant.accounts.filter(account => account.netSettlementAmount.currency === environment.currency).forEach(curAccount => {", + "//for(const curAccount of account) { ", + "", + " dfspsacc[i] = {", + " dfspid: participant.id,", + " dfspaccid: curAccount.id ", + " }", + " i++;", + "//}", + "})", + " })", + " ", + "", + "const config = { headers: {'Content-Type': 'application/json','FSPIOP-Source': 'testingtoolkitdfsp'} };", + "for(let dfspsaccx of dfspsacc){", + " console.log(dfspsaccx.dfspid,dfspsaccx.dfspaccid)", + "callbackpayer = await axios.put(environment.HOST_CENTRAL_SETTLEMENT + '/settlements/'+environment.deferredSettlementId, {", + " \"participants\": [", + " {", + " \"id\": dfspsaccx.dfspid,", + " \"accounts\": [", + " {", + " \"id\": dfspsaccx.dfspaccid,", + " \"reason\": \"Transfers committed\",", + " \"state\": \"PS_TRANSFERS_COMMITTED\"", + " }", + " ]", + " }", + " ]", + " },config) ", + "console.log(callbackpayer.data); ", + "}", + "}else{", + " console.log(\"Window is empty\")", + "}", + "/*res.participants.map(participant => {", + " participant.accounts.filter(account => account.netSettlementAmount.currency === pm.environment.get('SIMPAYER_CURRENCY'))", + " .forEach(curAccount => {*/", + " " + ] + }, + "preRequest": { + "exec": [ + "" + ] + } + } + }, + { + "id": 5, + "description": "check state for participants after commit deferred settlement model", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "settlements" + }, + "operationPath": "/settlements/{id}", + "path": "/settlements/{$environment.deferredSettlementId}", + "method": "get", + "params": { + "id": "{$environment.deferredSettlementId}" + }, + "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "scriptingEngine": "javascript", + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code status is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "Check status PS_TRANSFERS_COMMITTED", + "exec": [ + "expect(response.body.state).to.eql(\"PS_TRANSFERS_COMMITTED\");" + ] + }, + { + "id": 3, + "description": "Check status for window is PENDING SETTLEMENT", + "exec": [ + " expect(response.body.settlementWindows[0].state).to.eql(\"PENDING_SETTLEMENT\");" + ] + }, + { + "id": 4, + "description": "Account state is PS_TRANSFERS_COMMITTED for all accounts", + "exec": [ + "expect(environment.controlvar).to.equal(true)" + ] + } + ] + }, + "scripts": { + "postRequest": { + "exec": [ + "//Boolean isok = false;\r", + "var res = response.body;\r", + "var isok = true;\r", + "\r", + "try{\r", + "res.participants.map(function (participant) {\r", + " participant.accounts.filter(account => account.netSettlementAmount.currency === environment.currency).every(curAccount => {\r", + " if(isok === true){ \r", + " if(curAccount.state === \"PS_TRANSFERS_COMMITTED\"){\r", + " isok= true;\r", + " \r", + " \r", + " \r", + " }else{\r", + " isok= false;\r", + " // console.log(isok);\r", + " \r", + " }\r", + " } \r", + " })\r", + "})\r", + "\r", + "}catch(exception){\r", + " console.log(exception);\r", + "}\r", + "\r", + "environment.controlvar = isok;" + ] + } + } + }, + { + "id": 6, + "description": "commit Settlement default settlement model", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "settlements" + }, + "operationPath": "/settlements/{id}", + "path": "/settlements/{$environment.defaultSettlementId}", + "method": "get", + "params": { + "id": "{$environment.defaultSettlementId}" + }, + "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code status is 200", + "exec": [ + "//if(environment.WINDOWISEMPTY === false){", + "expect(response.status).to.equal(200)", + "//}" + ] + } + ] + }, + "scriptingEngine": "javascript", + "delay": "2500", + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "console.log(environment.defaultSettlementId);", + "//environment.settlementId = 6;", + "var i=0;", + "var dfspsacc = [];", + "var callbackpayer;", + "", + "environment.winstate = res.settlementWindows[0].state;", + "", + "console.log(environment.winstate);", + "if(environment.winstate===\"PENDING_SETTLEMENT\"){", + "", + "res.participants.map(function (participant) {", + " participant.accounts.filter(account => account.netSettlementAmount.currency === environment.currency2).forEach(curAccount => {", + "//for(const curAccount of account) { ", + "", + " dfspsacc[i] = {", + " dfspid: participant.id,", + " dfspaccid: curAccount.id ", + " }", + " i++;", + "//}", + "})", + " })", + " ", + "", + "const config = { headers: {'Content-Type': 'application/json','FSPIOP-Source': 'testingtoolkitdfsp'} };", + "for(let dfspsaccx of dfspsacc){", + " console.log(dfspsaccx.dfspid,dfspsaccx.dfspaccid)", + "callbackpayer = await axios.put(environment.HOST_CENTRAL_SETTLEMENT + '/settlements/'+environment.defaultSettlementId, {", + " \"participants\": [", + " {", + " \"id\": dfspsaccx.dfspid,", + " \"accounts\": [", + " {", + " \"id\": dfspsaccx.dfspaccid,", + " \"reason\": \"Transfers committed\",", + " \"state\": \"PS_TRANSFERS_COMMITTED\"", + " }", + " ]", + " }", + " ]", + " },config) ", + "console.log(callbackpayer.data); ", + "}", + "}else{", + " console.log(\"Window is empty\")", + "}", + "/*res.participants.map(participant => {", + " participant.accounts.filter(account => account.netSettlementAmount.currency === pm.environment.get('SIMPAYER_CURRENCY'))", + " .forEach(curAccount => {*/", + " " + ] + }, + "preRequest": { + "exec": [ + "" + ] + } + } + }, + { + "id": 7, + "description": "check state for participants after commit default settlement model", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "settlements" + }, + "operationPath": "/settlements/{id}", + "path": "/settlements/{$environment.defaultSettlementId}", + "method": "get", + "params": { + "id": "{$environment.defaultSettlementId}" + }, + "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "scriptingEngine": "javascript", + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code status is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "Check status PS_TRANSFERS_COMMITTED", + "exec": [ + "expect(response.body.state).to.eql(\"PS_TRANSFERS_COMMITTED\");" + ] + }, + { + "id": 3, + "description": "Check status for window is PENDING SETTLEMENT", + "exec": [ + " expect(response.body.settlementWindows[0].state).to.eql(\"PENDING_SETTLEMENT\");" + ] + }, + { + "id": 4, + "description": "Account state is PS_TRANSFERS_COMMITTED for all accounts", + "exec": [ + "expect(environment.controlvar).to.equal(true)" + ] + } + ] + }, + "scripts": { + "postRequest": { + "exec": [ + "//Boolean isok = false;\r", + "var res = response.body;\r", + "var isok = true;\r", + "\r", + "try{\r", + "res.participants.map(function (participant) {\r", + " participant.accounts.filter(account => account.netSettlementAmount.currency === environment.currency2).every(curAccount => {\r", + " if(isok === true){ \r", + " if(curAccount.state === \"PS_TRANSFERS_COMMITTED\"){\r", + " isok= true;\r", + " \r", + " \r", + " \r", + " }else{\r", + " isok= false;\r", + " // console.log(isok);\r", + " \r", + " }\r", + " } \r", + " })\r", + "})\r", + "\r", + "}catch(exception){\r", + " console.log(exception);\r", + "}\r", + "\r", + "environment.controlvar = isok;" + ] + } + } + } + ] + }, + { + "id": 17, + "name": "Store Settlement&Position Account Balances After commit", + "requests": [ + { + "id": 1, + "description": "Get balances for testfsp1", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.SIM1_NAME}/accounts", + "method": "get", + "params": { + "name": "{$inputs.SIM1_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "testfsp1 account balance before and after Commit should be the same", + "exec": [ + "expect(environment.balances[environment.SIM1_NAME].afterCommit).to.deep.equal(environment.balances[environment.SIM1_NAME].beforeTransfer)" + ] + } + ] + }, + "scriptingEngine": "javascript", + "scripts": { + "postRequest": { + "exec": [ + "var jsonData = response.body;", + "console.log(jsonData);", + "const {$inputs.SIM1_NAME} = {", + " ...environment.balances[environment.SIM1_NAME],", + " ...{afterCommit: {}}", + "}", + "", + "for (const i in jsonData) {", + " if (!Object.keys({$inputs.SIM1_NAME}.afterCommit).includes(jsonData[i].currency)) {", + " {$inputs.SIM1_NAME}.afterCommit[jsonData[i].currency] = {}", + " }", + " {$inputs.SIM1_NAME}.afterCommit[jsonData[i].currency][jsonData[i].ledgerAccountType] = jsonData[i].value", + " environment.balances = {", + " ...environment.balances,", + " {$inputs.SIM1_NAME}", + " }", + "}", + "", + "", + "console.log(environment.balances)" + ] + }, + "preRequest": { + "exec": [ + "environment.balances.afterCommit = {}" + ] + } + } + }, + { + "id": 2, + "description": "Get balances for testfsp2", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.SIM2_NAME}/accounts", + "method": "get", + "params": { + "name": "{$inputs.SIM2_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "testfsp2 account balance before and after Commit should be the same", + "exec": [ + "expect(environment.balances[environment.SIM2_NAME].afterCommit).to.deep.equal(environment.balances[environment.SIM2_NAME].beforeTransfer)" + ] + } + ] + }, + "scriptingEngine": "javascript", + "scripts": { + "postRequest": { + "exec": [ + "var jsonData = response.body;", + "console.log(jsonData);", + "const {$inputs.SIM2_NAME} = {", + " ...environment.balances[environment.SIM2_NAME],", + " ...{afterCommit: {}}", + "}", + "", + "for (const i in jsonData) {", + " if (!Object.keys({$inputs.SIM2_NAME}.afterCommit).includes(jsonData[i].currency)) {", + " {$inputs.SIM2_NAME}.afterCommit[jsonData[i].currency] = {}", + " }", + " {$inputs.SIM2_NAME}.afterCommit[jsonData[i].currency][jsonData[i].ledgerAccountType] = jsonData[i].value", + " environment.balances = {", + " ...environment.balances,", + " {$inputs.SIM2_NAME}", + " }", + "}", + "", + "", + "console.log(environment.balances)" + ] + } + } + }, + { + "id": 3, + "description": "Get balances for payerfsp", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.SIMPAYER_NAME}/accounts", + "method": "get", + "params": { + "name": "{$inputs.SIMPAYER_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "payerfsp account balance before and after Commit should be the same", + "exec": [ + "expect(environment.balances[environment.SIMPAYER_NAME].afterCommit).to.deep.equal(environment.balances[environment.SIMPAYER_NAME].beforeTransfer)" + ] + } + ] + }, + "scriptingEngine": "javascript", + "scripts": { + "postRequest": { + "exec": [ + "var jsonData = response.body;", + "console.log(jsonData);", + "const {$inputs.SIMPAYER_NAME} = {", + " ...environment.balances[environment.SIMPAYER_NAME],", + " ...{afterCommit: {}}", + "}", + "", + "for (const i in jsonData) {", + " if (!Object.keys({$inputs.SIMPAYER_NAME}.afterCommit).includes(jsonData[i].currency)) {", + " {$inputs.SIMPAYER_NAME}.afterCommit[jsonData[i].currency] = {}", + " }", + " {$inputs.SIMPAYER_NAME}.afterCommit[jsonData[i].currency][jsonData[i].ledgerAccountType] = jsonData[i].value", + " environment.balances = {", + " ...environment.balances,", + " {$inputs.SIMPAYER_NAME}", + " }", + "}", + "", + "", + "console.log(environment.balances)" + ] + } + } + }, + { + "id": 4, + "description": "Get balances for payeefsp", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.SIMPAYEE_NAME}/accounts", + "method": "get", + "params": { + "name": "{$inputs.SIMPAYEE_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "payeefsp account balance before and after Commit should be the same", + "exec": [ + "expect(environment.balances[environment.SIMPAYEE_NAME].afterCommit).to.deep.equal(environment.balances[environment.SIMPAYEE_NAME].beforeTransfer)" + ] + } + ] + }, + "scriptingEngine": "javascript", + "scripts": { + "postRequest": { + "exec": [ + "var jsonData = response.body;", + "console.log(jsonData);", + "const {$inputs.SIMPAYEE_NAME} = {", + " ...environment.balances[environment.SIMPAYEE_NAME],", + " ...{afterCommit: {}}", + "}", + "", + "for (const i in jsonData) {", + " if (!Object.keys({$inputs.SIMPAYEE_NAME}.afterCommit).includes(jsonData[i].currency)) {", + " {$inputs.SIMPAYEE_NAME}.afterCommit[jsonData[i].currency] = {}", + " }", + " {$inputs.SIMPAYEE_NAME}.afterCommit[jsonData[i].currency][jsonData[i].ledgerAccountType] = jsonData[i].value", + " environment.balances = {", + " ...environment.balances,", + " {$inputs.SIMPAYEE_NAME}", + " }", + "}", + "", + "", + "console.log(environment.balances)" + ] + } + } + }, + { + "id": 5, + "description": "hub account balance check", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/Hub/accounts", + "method": "get", + "params": { + "name": "Hub" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "hub reconciliation account balance before transfer and after commit should be the same.", + "exec": [ + "expect(environment.balances.Hub.afterCommit).to.deep.equal(environment.balances.Hub.beforeTransfer)" + ] + } + ] + }, + "scriptingEngine": "javascript", + "scripts": { + "postRequest": { + "exec": [ + "var jsonData = response.body;", + "console.log(jsonData);", + "const Hub = {", + " ...environment.balances.Hub,", + " ...{afterCommit: {}}", + "}", + "", + "for (const i in jsonData) {", + " if (!Object.keys(Hub.afterCommit).includes(jsonData[i].currency)) {", + " Hub.afterCommit[jsonData[i].currency] = {}", + " }", + " Hub.afterCommit[jsonData[i].currency][jsonData[i].ledgerAccountType] = jsonData[i].value", + " environment.balances = {", + " ...environment.balances,", + " Hub", + " }", + "}", + "", + "", + "console.log(environment.balances)" + ] + } + } + } + ] + }, + { + "id": 18, + "name": "settle-settlement", + "requests": [ + { + "id": 4, + "description": "settle Settlement with deferred settlement model", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "settlements" + }, + "operationPath": "/settlements/{id}", + "path": "/settlements/{$environment.deferredSettlementId}", + "method": "get", + "params": { + "id": "{$environment.deferredSettlementId}" + }, + "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code status is 200", + "exec": [ + "//if(environment.WINDOWISEMPTY === false){", + "expect(response.status).to.equal(200)", + "//}" + ] + } + ] + }, + "scriptingEngine": "javascript", + "delay": "2500", + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "console.log(environment.deferredSettlementId);", + "//environment.settlementId = 6;", + "var i=0;", + "var dfspsacc = [];", + "var callbackpayer;", + "", + "environment.winstate = res.settlementWindows[0].state;", + "", + "console.log(environment.winstate);", + "if(environment.winstate===\"PENDING_SETTLEMENT\"){", + "", + "res.participants.map(function (participant) {", + " participant.accounts.filter(account => account.netSettlementAmount.currency === environment.currency).forEach(curAccount => {", + "//for(const curAccount of account) { ", + "", + " dfspsacc[i] = {", + " dfspid: participant.id,", + " dfspaccid: curAccount.id ", + " }", + " i++;", + "//}", + "})", + " })", + " ", + "", + "const config = { headers: {'Content-Type': 'application/json','FSPIOP-Source': 'testingtoolkitdfsp'} };", + "for(let dfspsaccx of dfspsacc){", + " console.log(dfspsaccx.dfspid,dfspsaccx.dfspaccid)", + "callbackpayer = await axios.put(environment.HOST_CENTRAL_SETTLEMENT + '/settlements/'+environment.deferredSettlementId, {", + " \"participants\": [", + " {", + " \"id\": dfspsaccx.dfspid,", + " \"accounts\": [", + " {", + " \"id\": dfspsaccx.dfspaccid,", + " \"reason\": \"Transfers settled for payer\",", + " \"state\": \"SETTLED\"", + " }", + " ]", + " }", + " ]", + " },config) ", + "console.log(callbackpayer.data); ", + "}", + "}else{", + " console.log(\"Window is empty\")", + "}", + "/*res.participants.map(participant => {", + " participant.accounts.filter(account => account.netSettlementAmount.currency === pm.environment.get('SIMPAYER_CURRENCY'))", + " .forEach(curAccount => {*/", + " " + ] + }, + "preRequest": { + "exec": [ + "" + ] + } + } + }, + { + "id": 5, + "description": "check state for participants after settle with deferred settlement model", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "settlements" + }, + "operationPath": "/settlements/{id}", + "path": "/settlements/{$environment.deferredSettlementId}", + "method": "get", + "params": { + "id": "{$environment.deferredSettlementId}" + }, + "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "scriptingEngine": "javascript", + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code status is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "Check status SETTLED", + "exec": [ + "expect(response.body.state).to.eql(\"SETTLED\");" + ] + }, + { + "id": 3, + "description": "Check status for window is PENDING SETTLEMENT", + "exec": [ + " expect(response.body.settlementWindows[0].state).to.eql(\"PENDING_SETTLEMENT\");" + ] + }, + { + "id": 4, + "description": "Account state is SETTLED for all accounts", + "exec": [ + "expect(environment.controlvar).to.equal(true)" + ] + } + ] + }, + "scripts": { + "postRequest": { + "exec": [ + "//Boolean isok = false;\r", + "var res = response.body;\r", + "var isok = true;\r", + "\r", + "try{\r", + "res.participants.map(function (participant) {\r", + " participant.accounts.filter(account => account.netSettlementAmount.currency === environment.currency).every(curAccount => {\r", + " if(isok === true){ \r", + " if(curAccount.state === \"SETTLED\"){\r", + " isok= true;\r", + " \r", + " \r", + " \r", + " }else{\r", + " isok= false;\r", + " // console.log(isok);\r", + " \r", + " }\r", + " } \r", + " })\r", + "})\r", + "\r", + "}catch(exception){\r", + " console.log(exception);\r", + "}\r", + "\r", + "environment.controlvar = isok;" + ] + } + } + }, + { + "id": 6, + "description": "settle Settlement default settlement model", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "settlements" + }, + "operationPath": "/settlements/{id}", + "path": "/settlements/{$environment.defaultSettlementId}", + "method": "get", + "params": { + "id": "{$environment.defaultSettlementId}" + }, + "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code status is 200", + "exec": [ + "//if(environment.WINDOWISEMPTY === false){", + "expect(response.status).to.equal(200)", + "//}" + ] + } + ] + }, + "scriptingEngine": "javascript", + "delay": "2500", + "scripts": { + "postRequest": { + "exec": [ + "var res = response.body;", + "console.log(environment.defaultSettlementId);", + "//environment.settlementId = 6;", + "var i=0;", + "var dfspsacc = [];", + "var callbackpayer;", + "", + "environment.winstate = res.settlementWindows[0].state;", + "", + "console.log(environment.winstate);", + "if(environment.winstate===\"PENDING_SETTLEMENT\"){", + "", + "res.participants.map(function (participant) {", + " participant.accounts.filter(account => account.netSettlementAmount.currency === environment.currency2).forEach(curAccount => {", + "//for(const curAccount of account) { ", + "", + " dfspsacc[i] = {", + " dfspid: participant.id,", + " dfspaccid: curAccount.id ", + " }", + " i++;", + "//}", + "})", + " })", + " ", + "", + "const config = { headers: {'Content-Type': 'application/json','FSPIOP-Source': 'testingtoolkitdfsp'} };", + "for(let dfspsaccx of dfspsacc){", + " console.log(dfspsaccx.dfspid,dfspsaccx.dfspaccid)", + "callbackpayer = await axios.put(environment.HOST_CENTRAL_SETTLEMENT + '/settlements/'+environment.defaultSettlementId, {", + " \"participants\": [", + " {", + " \"id\": dfspsaccx.dfspid,", + " \"accounts\": [", + " {", + " \"id\": dfspsaccx.dfspaccid,", + " \"reason\": \"Transfers settled for payer\",", + " \"state\": \"SETTLED\"", + " }", + " ]", + " }", + " ]", + " },config) ", + "console.log(callbackpayer.data); ", + "}", + "}else{", + " console.log(\"Window is empty\")", + "}", + "/*res.participants.map(participant => {", + " participant.accounts.filter(account => account.netSettlementAmount.currency === pm.environment.get('SIMPAYER_CURRENCY'))", + " .forEach(curAccount => {*/", + " " + ] + }, + "preRequest": { + "exec": [ + "" + ] + } + } + }, + { + "id": 7, + "description": "check state for participants after settle default settlement model", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "settlements" + }, + "operationPath": "/settlements/{id}", + "path": "/settlements/{$environment.defaultSettlementId}", + "method": "get", + "params": { + "id": "{$environment.defaultSettlementId}" + }, + "url": "{$inputs.HOST_CENTRAL_SETTLEMENT}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "scriptingEngine": "javascript", + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code status is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "Check status SETTLED", + "exec": [ + "expect(response.body.state).to.eql(\"SETTLED\");" + ] + }, + { + "id": 3, + "description": "Check status for window is PENDING SETTLEMENT", + "exec": [ + " expect(response.body.settlementWindows[0].state).to.eql(\"SETTLED\");" + ] + }, + { + "id": 4, + "description": "Account state is SETTLED for all accounts", + "exec": [ + "expect(environment.controlvar).to.equal(true)" + ] + } + ] + }, + "scripts": { + "postRequest": { + "exec": [ + "//Boolean isok = false;\r", + "var res = response.body;\r", + "var isok = true;\r", + "\r", + "try{\r", + "res.participants.map(function (participant) {\r", + " participant.accounts.filter(account => account.netSettlementAmount.currency === environment.currency2).every(curAccount => {\r", + " if(isok === true){ \r", + " if(curAccount.state === \"SETTLED\"){\r", + " isok= true;\r", + " \r", + " \r", + " \r", + " }else{\r", + " isok= false;\r", + " // console.log(isok);\r", + " \r", + " }\r", + " } \r", + " })\r", + "})\r", + "\r", + "}catch(exception){\r", + " console.log(exception);\r", + "}\r", + "\r", + "environment.controlvar = isok;" + ] + } + } + } + ] + }, + { + "id": 19, + "name": "Store Settlement&Position Account Balances After Settle", + "requests": [ + { + "id": 1, + "description": "Get balances for testfsp1", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.SIM1_NAME}/accounts", + "method": "get", + "params": { + "name": "{$inputs.SIM1_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "testfsp1 account balance before and after Settle should be the same", + "exec": [ + "expect(environment.balances[environment.SIM1_NAME].afterSettle).to.deep.equal(environment.balances[environment.SIM1_NAME].beforeTransfer)" + ] + } + ] + }, + "scriptingEngine": "javascript", + "scripts": { + "postRequest": { + "exec": [ + "var jsonData = response.body;", + "console.log(jsonData);", + "const {$inputs.SIM1_NAME} = {", + " ...environment.balances[environment.SIM1_NAME],", + " ...{afterSettle: {}}", + "}", + "", + "for (const i in jsonData) {", + " if (!Object.keys({$inputs.SIM1_NAME}.afterSettle).includes(jsonData[i].currency)) {", + " {$inputs.SIM1_NAME}.afterSettle[jsonData[i].currency] = {}", + " }", + " {$inputs.SIM1_NAME}.afterSettle[jsonData[i].currency][jsonData[i].ledgerAccountType] = jsonData[i].value", + " environment.balances = {", + " ...environment.balances,", + " {$inputs.SIM1_NAME}", + " }", + "}", + "", + "", + "console.log(environment.balances)" + ] + }, + "preRequest": { + "exec": [ + "environment.balances.afterSettle = {}" + ] + } + } + }, + { + "id": 2, + "description": "Get balances for testfsp2", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.SIM2_NAME}/accounts", + "method": "get", + "params": { + "name": "{$inputs.SIM2_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "testfsp2 account balance before and after Settle should be the same", + "exec": [ + "expect(environment.balances[environment.SIM2_NAME].afterSettle).to.deep.equal(environment.balances[environment.SIM2_NAME].beforeTransfer)" + ] + } + ] + }, + "scriptingEngine": "javascript", + "scripts": { + "postRequest": { + "exec": [ + "var jsonData = response.body;", + "console.log(jsonData);", + "const {$inputs.SIM2_NAME} = {", + " ...environment.balances[environment.SIM2_NAME],", + " ...{afterSettle: {}}", + "}", + "", + "for (const i in jsonData) {", + " if (!Object.keys({$inputs.SIM2_NAME}.afterSettle).includes(jsonData[i].currency)) {", + " {$inputs.SIM2_NAME}.afterSettle[jsonData[i].currency] = {}", + " }", + " {$inputs.SIM2_NAME}.afterSettle[jsonData[i].currency][jsonData[i].ledgerAccountType] = jsonData[i].value", + " environment.balances = {", + " ...environment.balances,", + " {$inputs.SIM2_NAME}", + " }", + "}", + "", + "", + "console.log(environment.balances)" + ] + } + } + }, + { + "id": 3, + "description": "Get balances for payerfsp", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.SIMPAYER_NAME}/accounts", + "method": "get", + "params": { + "name": "{$inputs.SIMPAYER_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "payerfsp account balance before and after Settle should be the same", + "exec": [ + "expect(environment.balances[environment.SIMPAYER_NAME].afterSettle).to.deep.equal(environment.balances[environment.SIMPAYER_NAME].beforeTransfer)" + ] + } + ] + }, + "scriptingEngine": "javascript", + "scripts": { + "postRequest": { + "exec": [ + "var jsonData = response.body;", + "console.log(jsonData);", + "const {$inputs.SIMPAYER_NAME} = {", + " ...environment.balances[environment.SIMPAYER_NAME],", + " ...{afterSettle: {}}", + "}", + "", + "for (const i in jsonData) {", + " if (!Object.keys({$inputs.SIMPAYER_NAME}.afterSettle).includes(jsonData[i].currency)) {", + " {$inputs.SIMPAYER_NAME}.afterSettle[jsonData[i].currency] = {}", + " }", + " {$inputs.SIMPAYER_NAME}.afterSettle[jsonData[i].currency][jsonData[i].ledgerAccountType] = jsonData[i].value", + " environment.balances = {", + " ...environment.balances,", + " {$inputs.SIMPAYER_NAME}", + " }", + "}", + "", + "", + "console.log(environment.balances)" + ] + } + } + }, + { + "id": 4, + "description": "Get balances for payeefsp", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.SIMPAYEE_NAME}/accounts", + "method": "get", + "params": { + "name": "{$inputs.SIMPAYEE_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "FSPIOP-Source": "{$inputs.fromFspId}", + "Authorization": "{$inputs.TTK_BEARER_TOKEN}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Response code is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "payeefsp settlement balance before and after Settle should be the same", + "exec": [ + "expect(environment.balances[environment.SIMPAYEE_NAME].afterSettle).to.deep.equal(environment.balances[environment.SIMPAYEE_NAME].beforeTransfer)" + ] + } + ] + }, + "scriptingEngine": "javascript", + "scripts": { + "postRequest": { + "exec": [ + "var jsonData = response.body;", + "console.log(jsonData);", + "const {$inputs.SIMPAYEE_NAME} = {", + " ...environment.balances[environment.SIMPAYEE_NAME],", + " ...{afterSettle: {}}", + "}", + "", + "for (const i in jsonData) {", + " if (!Object.keys({$inputs.SIMPAYEE_NAME}.afterSettle).includes(jsonData[i].currency)) {", + " {$inputs.SIMPAYEE_NAME}.afterSettle[jsonData[i].currency] = {}", + " }", + " {$inputs.SIMPAYEE_NAME}.afterSettle[jsonData[i].currency][jsonData[i].ledgerAccountType] = jsonData[i].value", + " environment.balances = {", + " ...environment.balances,", + " {$inputs.SIMPAYEE_NAME}", + " }", + "}", + "", + "", + "console.log(environment.balances)" + ] + } + } + } + ] + } + ] +} \ No newline at end of file From 9ab461d387e74e3ae168ea4b6d43d23a540ada86 Mon Sep 17 00:00:00 2001 From: vgenev Date: Fri, 25 Jun 2021 16:06:37 +0300 Subject: [PATCH 3/7] fixed few titles and an order --- .../Settlement-management-primary-currency-test.json | 6 +++--- .../Settlement-management-second-currency-test.json | 2 +- collections/hub/provisioning/MojaloopHub_Setup/hub.json | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/collections/hub/golden_path/settlement_management/Settlement-management-primary-currency-test.json b/collections/hub/golden_path/settlement_management/Settlement-management-primary-currency-test.json index d5ec15f5..bff6c6d0 100644 --- a/collections/hub/golden_path/settlement_management/Settlement-management-primary-currency-test.json +++ b/collections/hub/golden_path/settlement_management/Settlement-management-primary-currency-test.json @@ -339,7 +339,7 @@ }, { "id": 10, - "description": "Active account for testfsp1 Copy", + "description": "Active account for testfsp2", "apiVersion": { "minorVersion": 3, "majorVersion": 9, @@ -580,7 +580,7 @@ }, "scriptingEngine": "javascript", "body": { - "settlementModel": "DEFERREDNET", + "settlementModel": "DEFERREDNET{$inpust.currency}", "reason": "TESTING", "settlementWindows": [ { @@ -3253,7 +3253,7 @@ }, "scriptingEngine": "javascript", "body": { - "settlementModel": "DEFERREDNET", + "settlementModel": "DEFERREDNET{$inpust.currency}", "reason": "TESTING", "settlementWindows": [ { diff --git a/collections/hub/golden_path/settlement_management/Settlement-management-second-currency-test.json b/collections/hub/golden_path/settlement_management/Settlement-management-second-currency-test.json index 739393b1..4bdd7c69 100644 --- a/collections/hub/golden_path/settlement_management/Settlement-management-second-currency-test.json +++ b/collections/hub/golden_path/settlement_management/Settlement-management-second-currency-test.json @@ -339,7 +339,7 @@ }, { "id": 10, - "description": "Active account for testfsp1 Copy", + "description": "Active account for testfsp2", "apiVersion": { "minorVersion": 3, "majorVersion": 9, diff --git a/collections/hub/provisioning/MojaloopHub_Setup/hub.json b/collections/hub/provisioning/MojaloopHub_Setup/hub.json index 6775a705..a4f2b301 100644 --- a/collections/hub/provisioning/MojaloopHub_Setup/hub.json +++ b/collections/hub/provisioning/MojaloopHub_Setup/hub.json @@ -284,7 +284,7 @@ "path": "/settlementModels", "method": "post", "body": { - "name": "DEFERREDNET", + "name": "DEFERREDNET{$inputs.currency}", "settlementGranularity": "NET", "settlementInterchange": "MULTILATERAL", "settlementDelay": "DEFERRED", From c9b1f6016891a2689b2a98447fdea168cfa786bc Mon Sep 17 00:00:00 2001 From: vgenev Date: Fri, 25 Jun 2021 16:10:57 +0300 Subject: [PATCH 4/7] removed unnecessary files --- .gitignore | 5 +- .vscode/notes.md | 0 ...ronments_hub-k8s-environment-2nd-curr.json | 131 ------------------ 3 files changed, 4 insertions(+), 132 deletions(-) delete mode 100644 .vscode/notes.md delete mode 100644 environments/examples_environments_hub-k8s-environment-2nd-curr.json diff --git a/.gitignore b/.gitignore index 1dbb9e5f..cfd8e11d 100644 --- a/.gitignore +++ b/.gitignore @@ -68,4 +68,7 @@ typings/ .DS_Store # Electron backup folders -**/*_electron-backup-* \ No newline at end of file +**/*_electron-backup-* + +# VSCode +.vscode \ No newline at end of file diff --git a/.vscode/notes.md b/.vscode/notes.md deleted file mode 100644 index e69de29b..00000000 diff --git a/environments/examples_environments_hub-k8s-environment-2nd-curr.json b/environments/examples_environments_hub-k8s-environment-2nd-curr.json deleted file mode 100644 index 4b61b13e..00000000 --- a/environments/examples_environments_hub-k8s-environment-2nd-curr.json +++ /dev/null @@ -1,131 +0,0 @@ -{ - "inputValues": { - "BASE_CENTRAL_LEDGER_ADMIN": "", - "CALLBACK_ENDPOINT_BASE_URL": "http://dev1-ml-testing-toolkit-backend:5000", - "ENABLE_JWS_SIGNING": true, - "ENABLE_JWS_VALIDATION": false, - "ENABLE_PROTECTED_HEADERS_VALIDATION": true, - "ENABLE_WS_ASSERTIONS": true, - "HOST_ACCOUNT_LOOKUP_ADMIN": "http://dev1-account-lookup-service-admin", - "HOST_ACCOUNT_LOOKUP_SERVICE": "http://dev1-account-lookup-service", - "HOST_ACCOUNT_LOOKUP_SERVICE_ADMIN": "http://dev1-account-lookup-service-admin", - "HOST_BULK_ADAPTER": "http://dev1-bulk-api-adapter-service", - "HOST_CENTRAL_LEDGER": "http://dev1-centralledger-service", - "HOST_CENTRAL_SETTLEMENT": "http://dev1-centralsettlement-service/v2", - "HOST_LEGACY_SIMULATOR": "http://dev1-simulator", - "HOST_ML_API_ADAPTER": "http://dev1-ml-api-adapter-service", - "HOST_QUOTING_SERVICE": "http://dev1-quoting-service", - "HOST_SIMULATOR": "http://dev1-simulator", - "HOST_TRANSACTION_REQUESTS_SERVICE": "http://dev1-transaction-requests-service", - "HUB_OPERATOR_BEARER_TOKEN": "NOT_APPLICABLE", - "NORESPONSE_SIMPAYEE_NAME": "noresponsepayeefsp", - "ON_US_TRANSFERS_ENABLED": false, - "PAYEEFSP_BACKEND_TESTAPI_URL": "http://dev1-sim-payeefsp-backend:3003", - "PAYEEFSP_CALLBACK_URL": "http://dev1-sim-payeefsp-scheme-adapter:4000", - "PAYEEFSP_SDK_TESTAPI_URL": "http://dev1-sim-payeefsp-scheme-adapter:4002", - "PAYEEFSP_SDK_TESTAPI_WS_URL": "ws://dev1-sim-payeefsp-scheme-adapter:4002", - "PAYERFSP_BACKEND_TESTAPI_URL": "http://dev1-sim-payerfsp-backend:3003", - "PAYERFSP_CALLBACK_URL": "http://dev1-sim-payerfsp-scheme-adapter:4000", - "PAYERFSP_SDK_TESTAPI_URL": "http://dev1-sim-payerfsp-scheme-adapter:4002", - "PAYERFSP_SDK_TESTAPI_WS_URL": "ws://dev1-sim-payerfsp-scheme-adapter:4002", - "SIM1_JWS_KEY": "-----BEGIN PRIVATE KEY-----\n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\nDgoQeSng2kt5Z6mkoDIQTs7nEflb4w==\n-----END PRIVATE KEY-----\n", - "SIM1_MSISDN": "17039811903", - "SIM1_NAME": "testfsp1", - "SIM2_JWS_KEY": "-----BEGIN PRIVATE KEY-----\n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\nTv4G862WYeqD1fdyZaKQ3b9fAQEq1g==\n-----END PRIVATE KEY-----\n", - "SIM2_MSISDN": "17039811904", - "SIM2_NAME": "testfsp2", - "SIMPAYEE_CURRENCY": "USD", - "SIMPAYEE_JWS_PRIVATE_KEY": "-----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDMu126miewCUCT\n7f49B0SyCPFGzmqGSs9rTPbk1se+BBhqfhsfkZj6cRRfrlg3rme6we0Ib2AF5TQL\nnoSBlDAimQcNOHXrqpAY/B0l/mgyUwmfv0NJ3UjZuCFuw3HRrU/oSUfXoDITC+Bi\n120w4FY2B/vPn+1iC/tsaCayneoaV/Sedq7H9+smEnQfGl3p5QJp/B2Ws3Bz1HqI\nIoxLEaO9VMeDHQPvNJn/7g9erqA5vIhmgLS46worOVjdRLH2SECH73qp8Wg0rJ8Y\neW2kQ8kuY4uHcG3MO6drYrC011U0ZyM90KV7dv2Y0h2FHlpn9s/pmb630m5ELpnB\nT/pYTLcXAgMBAAECggEADqk6Qz3SgBeMMYEWYZ4ZdsW6Ktpm+Xqg/kDy4JywOB9z\nSikBXeeKH3Z6ltwq2BicDV020Wb8Zt+s3vTOmLhDzC544/hPmtKfjWfR2eHX6gaq\nm+8ml+20pQFmb4Kn2MlC/Xzwm/SOXBvPyUmTua95rQExsK12DT0+F4YhLfhYsTh2\nHfkEzdFW4rrd+9ddKG1ZANS4ZaiMyzhtvUWeEBypBtVf+kBk+51t9pLCdjuynb8I\nWylSDhikT3/YQ/3g/Sz3SMp1u4x0GQe9FWYrnPzzp5LnM5fm49v8JWVHUvd0TOi0\ndQV+LYlgSD38YPpi4iKQSh0Zf0EBfbA83GsX2ArJ7QKBgQDmvcA6PqPo0OV/7RKY\nJuziA3TpucL8iVM1i7/Lv6+VkX88uDvEjwLoNAiYcgIm/CMK7WAwA+Dzn4r38EHB\nBKF4KRhP0qQS0KLXsd0tdsmAB0In7+cbKL4ttqNUP98xZAkTLJq9PXqTKN0qtyw4\nSfIsVMjDGoeSdWHObZYbGKICfQKBgQDjJLwolDrVX29V4zVmxQYH5iN+5kwKXHXj\nsuHBrW02Oj/GQFh3Xj6JQi3mzTWYhHwhA4pdaQtNYqTaz9Ic/O1VNPic2ovtg+cd\n7sh86qdQ4QZYhN3RT4oX///u6+UK90llh9hEBo3GuZ4X47tuByNtD4SFAlULrkSm\nfW4XaC3gIwKBgGil6HfCDx65F00UnVlKVicPQEf8ivVz5rwjPIJQ1nZ0PYuxVtIH\ntl7PspJJKra5pb7/957vM2fqlOFsIrZCvmS75p3VP7qUyzYeIdzLwgmBwTxRrrP/\nn3kmGx9LtJM29nKuySNIrb3uS5hi6PhCeUYn0cHC13fSKuCvjOOPIXMVAoGBAJg+\nCPdR0tUs8Byq+yH0sIQe1m+5wAG50zJYtUPxD6AnDpO8kQ8A1f19o/JsXJ3rPp+K\nFfVh8LdfhIs8e+H+DLztkizftqXtoLzJTQuc46QsDurJszsVisNnTI1BAvWEpWct\n0+BUXDZ0NuhgNUIb+rygh/v2gjYgCddlfqKlqwntAoGBAM5Kpp5R0G0ioAuqGqfZ\nsHEdLqJMSepgc6c7RC+3G/svtS2IqCfyNfVMM3qV5MY3J7KnAVjGOw2oJbXcPLXa\nuutsVVmPx2d/x2LZdc8dYYcdOQZvrUhmALhAPXM4SRujakxh+Uxi1VOiW+fZL8aW\nuu1pxuWD0gTJxFkp6u4YIAhw\n-----END PRIVATE KEY-----\n", - "SIMPAYEE_JWS_PUB_KEY": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzLtduponsAlAk+3+PQdE\nsgjxRs5qhkrPa0z25NbHvgQYan4bH5GY+nEUX65YN65nusHtCG9gBeU0C56EgZQw\nIpkHDTh166qQGPwdJf5oMlMJn79DSd1I2bghbsNx0a1P6ElH16AyEwvgYtdtMOBW\nNgf7z5/tYgv7bGgmsp3qGlf0nnaux/frJhJ0Hxpd6eUCafwdlrNwc9R6iCKMSxGj\nvVTHgx0D7zSZ/+4PXq6gObyIZoC0uOsKKzlY3USx9khAh+96qfFoNKyfGHltpEPJ\nLmOLh3BtzDuna2KwtNdVNGcjPdCle3b9mNIdhR5aZ/bP6Zm+t9JuRC6ZwU/6WEy3\nFwIDAQAB\n-----END PUBLIC KEY-----\n", - "SIMPAYEE_MSISDN": "17039811902", - "SIMPAYEE_NAME": "payeefsp", - "SIMPAYER_CURRENCY": "USD", - "SIMPAYER_JWS_PRIVATE_KEY": "-----BEGIN PRIVATE KEY-----\nMIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCg9eU66hg4ZAE6\njM4U8ylXQwUz9cdmzS3JyW+1bbgv77peMKSU/wFsi4QRwmbrYze9baFnGCKnS75E\nvCchib5vJxp3MDWzi/TGxmzgWdJRzkyCiI5C6dCgVL71MjsFgN3TN63wEf5sEU2I\neoJ8yXJM0pUG9f9NO7p/IGliDmt6C7EA7D9kQWigufmX0ZTVNKI07fKwC/AEKLp7\nkx99pvsCq8m184EEL15Q/NhA7R/5zKoHvmJa6Jd7tM0i0xn8IKOkNVFu3YIafAEC\nQWQwRbanFEeRc3tH3bEoYM8c74r+W+YxCG7nUf16XCk132XVffbHVl+wFgo18YB/\nsAJmcbePAgMBAAECggEAGQGKnsf+gkg7DqMQYx3Rxt5BISzmURjAK9CxG6ETk9Lt\nA7QP5ZvmVzwnhPDMN3Z/Et1EzXTo8U+pnBkVBTdWkAMlr+2b8ixklzr9cC9UJuRj\na4YWf9u+TyJLVmF63OSD0cwdKCZLffOENZc+zW8oZDn08BNomdGVLCnXZWXzGY8X\nKaJTJr29jEgkKOqFXdAHrsmj7TBtqSLZKx2IHdCmi05+5JCxVLPgnDiCicZ9zEii\nyWw57Q1migFIcw6ZQP4RyjgH1o70B+zo3OL7IQEirE17GUgK16XD8xi8hWCYTj5n\nxOz9yfVfPuYom/9Xbm5kYJZKE2HOZ3Lg8pUnWncuNQKBgQDbaOoACQPhVxQK1qYR\nRbW0I5Rn0EDxzsFPEpu3eXHoIYGXi8u/ew9AzFmGu+tKYJV5V4BCXo5x2ddE+B8B\ndXhyHLGfeV8tWKYKBpatolVxxKDL/9fnxoGIAO9cc91ieOm5JxmKscCVP1UnOXHZ\nuomSfAbGQwYDtMd2bJKkE1z0qwKBgQC7zacuv1PMaDFksHuNNRG+aZ74pJ77msht\nvJoKyaQcktD0xmIXhFfJvK4cclzG7s5jxCsu2ejimgmfVzgXlLEMrJFvSdFkD2SS\ngGqoxq5c9g8ssvt7xwr7aJ+VYYWTWRzJrOUny+99UbwHedu0EHL1BYILwy67Lium\nsgUeeCEgrQKBgGv+7f7qcRB/jgvvr3oc990dDjUzGmRrQlcrb54Vlu2NYH45fyZW\n6iEY9JAO+zd25tv9J9KDPFXpxb3a61gKfCie2wcF9MUbN08EAzKgDrKa+BKxcZJR\n8PwCic7V8QhBP7m09yt/Zq2PqNhPvCxRVtnVVnhMES/N0cgGlP9R0JVVAoGAHU2/\nkmnEN5bibiWjgasQM7fjWETHkdbbA1R0bM59zv+Rnz/9OlIqKI5KVKH7nAbTKXoI\niuzxi7ohWj2PwQ4wehvLLaRFCenk9X8YJXGq71Jtl7ntx6iNLCFtFS/8WbuD5GwX\n7ZfCrLk+L6RyBayzY0wSuKch+Y8AvKf2aISyFpkCgYEAjSfEjz9Cn+27HdiMoBwa\n+fyyoosci/6OBxj/WTKvV6KUYLBfFoAYpb9rqrbvnfyyc0UiAYQeMJAOWQ1kkzY4\nzXs63iPQi2UeGPJZ7RsT+31DSaG9YiQdrInsUrlm8hi1C7Pg/NNt6Y1G0WhWYrvF\niNK0yCENMhSoOTtbT9tmGi0=\n-----END PRIVATE KEY-----\n", - "SIMPAYER_MSISDN": "17039811901", - "SIMPAYER_NAME": "payerfsp", - "SIMPLE_ROUTING_MODE_ENABLED": true, - "TESTFSP1_BACKEND_TESTAPI_URL": "http://dev1-sim-testfsp1-backend:3003", - "TESTFSP1_CALLBACK_URL": "http://dev1-sim-testfsp1-scheme-adapter:4000", - "TESTFSP1_JWS_PUB_KEY": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2R3IuEDpqDtsS96emI0v\ndCJpeb/lnCxR2Nw5x6Z3GjC9PRFCJ2gsS2Zq70NaUQ5yWrrrZ9DZ8PjgCXqftUKG\n42uFsibLFpN09IjQuZCDuAkCdEjMgm+xies47ajRzl6evOc0ClkQBZVGybl9RAr6\nNRTFOYkYjJ0xS0MNkfRkDiOEu5BA/XKb5oLbyVMjGyvLgyS1g41x4fA+Ccb5PENa\nh9dqkFJ3j218Rs+bGytrVqrrCCjV1FiI+Y9YjKuTRRo7U/jcGHLfEc7YRcP2U9os\nxQxFvhHxR7W0e74fAU8B8YIJzwjaQvrEh9SJRc2IZsh6EdBAXXmbk4sHKyhoX0by\nUQIDAQAB\n-----END PUBLIC KEY-----\n", - "TESTFSP1_SDK_TESTAPI_URL": "http://dev1-sim-testfsp1-scheme-adapter:4002", - "TESTFSP1_SDK_TESTAPI_WS_URL": "ws://dev1-sim-testfsp1-scheme-adapter:4002", - "TESTFSP2_BACKEND_TESTAPI_URL": "http://dev1-sim-testfsp2-backend:3003", - "TESTFSP2_CALLBACK_URL": "http://dev1-sim-testfsp2-scheme-adapter:4000", - "TESTFSP2_JWS_PUB_KEY": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAv7k0Mqy0jSXFpHD9/a+Y\nl5djXq6HdyC+BsSA/sRKczEBKQyW8mEJVILAKkOibWzK7e+SJjQPbFjgqiUZvRI5\n+ggHkSJXEV28Bi2sF58A15sQjwaSkE2vBwLAL5GftSmao0QSozSfQ+RFw2N+loRG\nYedXZpRMsYFr1uA1qavcBjoj7JqPpID7UaTgXwwHWbV+j2uhQfotqRvOQ5KTmx5H\nJa+VjPu+xAC7mmcL+dxmeBpbJJD5Li8B8ggJXGJUk+En6XSIgZkQ6vKvC9HyasE6\nWZLXU+JJoCp2wkCPNTRxzPE2PGnlI0a4ZP2/y/2yacc4HQGBhEMc+SVT/VSZaMS+\nAQIDAQAB\n-----END PUBLIC KEY-----", - "TESTFSP2_SDK_TESTAPI_URL": "http://dev1-sim-testfsp2-scheme-adapter:4002", - "TESTFSP2_SDK_TESTAPI_WS_URL": "ws://dev1-sim-testfsp2-scheme-adapter:4002", - "TEST_NOTIFICATIONS": true, - "TTKFSP_JWS_KEY": "-----BEGIN PRIVATE KEY-----\n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\nDktFAP1w3ruycnE/t+/H8rDVJGPTHc8=\n-----END PRIVATE KEY-----\n", - "WS_ASSERTION_TIMEOUT": 5000, - "accept": "application/vnd.interoperability.parties+json;version=1.0", - "acceptParticipants": "application/vnd.interoperability.participants+json;version=1.0", - "acceptQuotes": "application/vnd.interoperability.quotes+json;version=1.0", - "acceptTransfers": "application/vnd.interoperability.transfers+json;version=1.0", - "accountId": "6", - "amount": "100", - "batchToIdValue1": "27713803066", - "batchToIdValue2": "27713803067", - "condition": "n2cwS3w4ekGlvNYoXg2uBAqssu3FCoXjADE2mziU5jU", - "contentTransfers": "application/vnd.interoperability.transfers+json;version=1.0", - "contentType": "application/vnd.interoperability.parties+json;version=1.0", - "contentTypeParticipants": "application/vnd.interoperability.participants+json;version=1.0", - "contentTypeQuotes": "application/vnd.interoperability.quotes+json;version=1.0", - "currency": "USD", - "currency2": "BGN", - "expectedAuthorizationsVersion": "1.0", - "expectedParticipantsVersion": "1.0", - "expectedPartiesVersion": "1.0", - "expectedQuotesVersion": "1.0", - "expectedTransactionRequestsVersion": "1.0", - "expectedTransfersVersion": "1.0", - "fromDOB": "1984-01-01", - "fromFirstName": "Firstname-Test", - "fromFspId": "testingtoolkitdfsp", - "fromIdType": "MSISDN", - "fromIdValue": "44123456789", - "fromLastName": "Lastname-Test", - "fromSubIdValue": "30", - "fspiopSignature": "{\"signature\":\"iU4GBXSfY8twZMj1zXX1CTe3LDO8Zvgui53icrriBxCUF_wltQmnjgWLWI4ZUEueVeOeTbDPBZazpBWYvBYpl5WJSUoXi14nVlangcsmu2vYkQUPmHtjOW-yb2ng6_aPfwd7oHLWrWzcsjTF-S4dW7GZRPHEbY_qCOhEwmmMOnE1FWF1OLvP0dM0r4y7FlnrZNhmuVIFhk_pMbEC44rtQmMFv4pm4EVGqmIm3eyXz0GkX8q_O1kGBoyIeV_P6RRcZ0nL6YUVMhPFSLJo6CIhL2zPm54Qdl2nVzDFWn_shVyV0Cl5vpcMJxJ--O_Zcbmpv6lxqDdygTC782Ob3CNMvg\\\",\\\"protectedHeader\\\":\\\"eyJhbGciOiJSUzI1NiIsIkZTUElPUC1VUkkiOiIvdHJhbnNmZXJzIiwiRlNQSU9QLUhUVFAtTWV0aG9kIjoiUE9TVCIsIkZTUElPUC1Tb3VyY2UiOiJPTUwiLCJGU1BJT1AtRGVzdGluYXRpb24iOiJNVE5Nb2JpbGVNb25leSIsIkRhdGUiOiIifQ\"}", - "fundsInPrepareAmount": "", - "fundsInPrepareTransferId": "", - "homeTransactionId": "123ABC", - "hubEmail": "some.email@gmail.com", - "hub_operator": "NOT_APPLICABLE", - "ilpPacket": "AYIDBQAAAAAAACcQJGcucGF5ZWVmc3AubXNpc2RuLnt7cmVjZWl2ZXJtc2lzZG59fYIC1GV5SjBjbUZ1YzJGamRHbHZia2xrSWpvaVptVXhNREU0Wm1NdE1EaGxZeTAwWWpJM0xUbGpZalF0TnpjMk9URTFNR00zT1dKaklpd2ljWFZ2ZEdWSlpDSTZJbVpsTVRBeE9HWmpMVEE0WldNdE5HSXlOeTA1WTJJMExUYzNOamt4TlRCak56bGlZeUlzSW5CaGVXVmxJanA3SW5CaGNuUjVTV1JKYm1adklqcDdJbkJoY25SNVNXUlVlWEJsSWpvaVRWTkpVMFJPSWl3aWNHRnlkSGxKWkdWdWRHbG1hV1Z5SWpvaWUzdHlaV05sYVhabGNrMVRTVk5FVG4xOUlpd2labk53U1dRaU9pSndZWGxsWldaemNDSjlmU3dpY0dGNVpYSWlPbnNpY0dGeWRIbEpaRWx1Wm04aU9uc2ljR0Z5ZEhsSlpGUjVjR1VpT2lKTlUwbFRSRTRpTENKd1lYSjBlVWxrWlc1MGFXWnBaWElpT2lJeU56Y3hNemd3TXprd05TSXNJbVp6Y0Vsa0lqb2ljR0Y1WlhKbWMzQWlmU3dpY0dWeWMyOXVZV3hKYm1adklqcDdJbU52YlhCc1pYaE9ZVzFsSWpwN0ltWnBjbk4wVG1GdFpTSTZJazFoZEhNaUxDSnNZWE4wVG1GdFpTSTZJa2hoWjIxaGJpSjlMQ0prWVhSbFQyWkNhWEowYUNJNklqRTVPRE10TVRBdE1qVWlmWDBzSW1GdGIzVnVkQ0k2ZXlKaGJXOTFiblFpT2lJeE1EQWlMQ0pqZFhKeVpXNWplU0k2SWxWVFJDSjlMQ0owY21GdWMyRmpkR2x2YmxSNWNHVWlPbnNpYzJObGJtRnlhVzhpT2lKVVVrRk9VMFpGVWlJc0ltbHVhWFJwWVhSdmNpSTZJbEJCV1VWU0lpd2lhVzVwZEdsaGRHOXlWSGx3WlNJNklrTlBUbE5WVFVWU0luMTkA", - "invalidFulfillment": "_3cco-YN5OGpRKVWV3n6x6uNpBTH9tYUdOYmHA-----", - "invalidToIdType": "ACCOUNT_ID", - "invalidToIdValue": "27713803099", - "mobileSimPayeeFsp": "greenbankfsp", - "mobileSimPayerFsp": "pinkbankfsp", - "note": "test", - "payeeIdType": "MSISDN", - "payeeIdentifier": "17039811902", - "payeefsp": "payeefsp", - "payeefspEmail": "some.email@gmail.com", - "payerIdType": "MSISDN", - "payerIdentifier": "17039811901", - "payerfsp": "testingtoolkitdfsp", - "payerfspEmail": "some.email@gmail.com", - "payerfspSettlementAccountBalanceAfterFundsIn": "", - "payerfspSettlementAccountBalanceBeforeFundsIn": "", - "payerfspSettlementAccountId": "", - "receiverMSISDN": "27713803912", - "testfsp1Email": "some.email@gmail.com", - "testfsp1IdType": "MSISDN", - "testfsp1Identifier": "17039811903", - "testfsp1MSISDN": "17039811903", - "testfsp2Email": "some.email@gmail.com", - "testfsp2IdType": "MSISDN", - "testfsp2Identifier": "17039811904", - "testfsp2MSISDN": "17039811904", - "toFspId": "payeefsp", - "toIdType": "MSISDN", - "toIdValue": "27713803912", - "toIdValueDelete": "27713803913", - "toSubIdValue": "30", - "validCondition": "GRzLaTP7DJ9t4P-a_BA0WA9wzzlsugf00-Tn6kESAfM", - "validCondition2": "kPLCKM62VY2jbekuw3apCTBg5zk_mVs9DD8-XpljQms", - "validFulfillment": "UNlJ98hZTY_dsw0cAqw4i_UN3v4utt7CZFB4yfLbVFA", - "validIlpPacket2": "AYIC9AAAAAAAABdwHWcucGF5ZWVmc3AubXNpc2RuLjIyNTU2OTk5MTI1ggLKZXlKMGNtRnVjMkZqZEdsdmJrbGtJam9pWmpRMFltUmtOV010WXpreE1DMDBZVGt3TFRoa05qa3RaR0ppWVRaaVl6aGxZVFpqSWl3aWNYVnZkR1ZKWkNJNklqVTBaRFZtTURsaUxXRTBOMlF0TkRCa05pMWhZVEEzTFdFNVkyWXpZbUl5TkRsaFpDSXNJbkJoZVdWbElqcDdJbkJoY25SNVNXUkpibVp2SWpwN0luQmhjblI1U1dSVWVYQmxJam9pVFZOSlUwUk9JaXdpY0dGeWRIbEpaR1Z1ZEdsbWFXVnlJam9pTWpJMU5UWTVPVGt4TWpVaUxDSm1jM0JKWkNJNkluQmhlV1ZsWm5Od0luMTlMQ0p3WVhsbGNpSTZleUp3WVhKMGVVbGtTVzVtYnlJNmV5SndZWEowZVVsa1ZIbHdaU0k2SWsxVFNWTkVUaUlzSW5CaGNuUjVTV1JsYm5ScFptbGxjaUk2SWpJeU5UQTNNREE0TVRneElpd2labk53U1dRaU9pSndZWGxsY21aemNDSjlMQ0p3WlhKemIyNWhiRWx1Wm04aU9uc2lZMjl0Y0d4bGVFNWhiV1VpT25zaVptbHljM1JPWVcxbElqb2lUV0YwY3lJc0lteGhjM1JPWVcxbElqb2lTR0ZuYldGdUluMHNJbVJoZEdWUFprSnBjblJvSWpvaU1UazRNeTB4TUMweU5TSjlmU3dpWVcxdmRXNTBJanA3SW1GdGIzVnVkQ0k2SWpZd0lpd2lZM1Z5Y21WdVkza2lPaUpWVTBRaWZTd2lkSEpoYm5OaFkzUnBiMjVVZVhCbElqcDdJbk5qWlc1aGNtbHZJam9pVkZKQlRsTkdSVklpTENKcGJtbDBhV0YwYjNJaU9pSlFRVmxGVWlJc0ltbHVhWFJwWVhSdmNsUjVjR1VpT2lKRFQwNVRWVTFGVWlKOWZRAA" - } -} \ No newline at end of file From ecc2e7715b88c6b71a38868518eb734644bac724 Mon Sep 17 00:00:00 2001 From: vgenev Date: Fri, 25 Jun 2021 16:13:04 +0300 Subject: [PATCH 5/7] updated mixed settlement collection --- .../mixed_settlement_model.json | 81 +++++++++++-------- 1 file changed, 47 insertions(+), 34 deletions(-) diff --git a/collections/hub/golden_path/settlement_management/mixed_settlement_model.json b/collections/hub/golden_path/settlement_management/mixed_settlement_model.json index 4e62acff..9af3af09 100644 --- a/collections/hub/golden_path/settlement_management/mixed_settlement_model.json +++ b/collections/hub/golden_path/settlement_management/mixed_settlement_model.json @@ -776,6 +776,50 @@ } } }, + { + "id": 13, + "description": "get settlements models", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/settlementModels", + "path": "/settlementModels", + "method": "get", + "scriptingEngine": "javascript", + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "status code is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + } + ] + }, + "scripts": { + "postRequest": { + "exec": [ + "var jsonData = response.body;", + "environment.settlementModels = { deferred: {}}", + "for (const sm of jsonData) {", + " if (sm.settlementDelay === 'DEFERRED') {", + " if (sm.currency === null) {", + " environment.settlementModels.deferred.default = sm.name", + " } else {", + " environment.settlementModels.deferred[sm.currency] = sm.name", + " }", + " }", + "}", + "", + "console.log(environment.settlementModels)" + ] + } + } + }, { "id": 3, "description": "Create Settlement for Closed Window in deferred settlement model for currency", @@ -878,7 +922,9 @@ "", "requestVariables.settlementModel = environment.settlementModels.deferred[environment.currency]", "", - "console.log(requestVariables.settlementModel)" + "// console.log(requestVariables.settlementModel)", + "", + "console.log(environment.settlementModels.deferred[environment.currency])" ] } } @@ -1724,39 +1770,6 @@ ] } } - }, - { - "id": 13, - "description": "get settlements models", - "apiVersion": { - "minorVersion": 3, - "majorVersion": 9, - "type": "central_admin" - }, - "operationPath": "/settlementModels", - "path": "/settlementModels", - "method": "get", - "scriptingEngine": "javascript", - "url": "{$inputs.HOST_CENTRAL_LEDGER}", - "scripts": { - "postRequest": { - "exec": [ - "var jsonData = response.body;", - "environment.settlementModels = { deferred: {}}", - "for (const sm of jsonData) {", - " if (sm.settlementDelay === 'DEFERRED') {", - " if (sm.currency === null) {", - " environment.settlementModels.deferred.default = sm.name", - " } else {", - " environment.settlementModels.deferred[sm.currency] = sm.name", - " }", - " }", - "}", - "", - "console.log(environment.settlementModels)" - ] - } - } } ] }, From 1043099d6cc0331a2a39c88608c8728315f162c4 Mon Sep 17 00:00:00 2001 From: vgenev Date: Fri, 25 Jun 2021 16:43:03 +0300 Subject: [PATCH 6/7] renamed few things --- .../mixed_settlement_model.json | 102 +++++++++--------- 1 file changed, 51 insertions(+), 51 deletions(-) diff --git a/collections/hub/golden_path/settlement_management/mixed_settlement_model.json b/collections/hub/golden_path/settlement_management/mixed_settlement_model.json index 9af3af09..c2da0800 100644 --- a/collections/hub/golden_path/settlement_management/mixed_settlement_model.json +++ b/collections/hub/golden_path/settlement_management/mixed_settlement_model.json @@ -3,7 +3,7 @@ "test_cases": [ { "id": 1, - "name": "Settlement_management", + "name": "Pre-settlement account activation per participant and currency", "requests": [ { "id": 3, @@ -776,50 +776,6 @@ } } }, - { - "id": 13, - "description": "get settlements models", - "apiVersion": { - "minorVersion": 3, - "majorVersion": 9, - "type": "central_admin" - }, - "operationPath": "/settlementModels", - "path": "/settlementModels", - "method": "get", - "scriptingEngine": "javascript", - "url": "{$inputs.HOST_CENTRAL_LEDGER}", - "tests": { - "assertions": [ - { - "id": 1, - "description": "status code is 200", - "exec": [ - "expect(response.status).to.equal(200)" - ] - } - ] - }, - "scripts": { - "postRequest": { - "exec": [ - "var jsonData = response.body;", - "environment.settlementModels = { deferred: {}}", - "for (const sm of jsonData) {", - " if (sm.settlementDelay === 'DEFERRED') {", - " if (sm.currency === null) {", - " environment.settlementModels.deferred.default = sm.name", - " } else {", - " environment.settlementModels.deferred[sm.currency] = sm.name", - " }", - " }", - "}", - "", - "console.log(environment.settlementModels)" - ] - } - } - }, { "id": 3, "description": "Create Settlement for Closed Window in deferred settlement model for currency", @@ -1770,6 +1726,50 @@ ] } } + }, + { + "id": 13, + "description": "get settlements models", + "apiVersion": { + "minorVersion": 3, + "majorVersion": 9, + "type": "central_admin" + }, + "operationPath": "/settlementModels", + "path": "/settlementModels", + "method": "get", + "scriptingEngine": "javascript", + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "status code is 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + } + ] + }, + "scripts": { + "postRequest": { + "exec": [ + "var jsonData = response.body;", + "environment.settlementModels = { deferred: {}}", + "for (const sm of jsonData) {", + " if (sm.settlementDelay === 'DEFERRED') {", + " if (sm.currency === null) {", + " environment.settlementModels.deferred.default = sm.name", + " } else {", + " environment.settlementModels.deferred[sm.currency] = sm.name", + " }", + " }", + "}", + "", + "console.log(environment.settlementModels)" + ] + } + } } ] }, @@ -2077,7 +2077,7 @@ }, { "id": 4, - "name": "SIM1 to SIM2", + "name": "Send transfer $currency from SIM1 to SIM2", "requests": [ { "id": 3, @@ -2374,7 +2374,7 @@ }, { "id": 5, - "name": "SIM1 to PAYEEFSP", + "name": "Send transfer $currency2 from SIM1 to PAYEEFSP", "requests": [ { "id": 3, @@ -2667,7 +2667,7 @@ }, { "id": 6, - "name": "PAYERFSP to SIM1", + "name": "Send transfer $currency from PAYERFSP to SIM1", "requests": [ { "id": 3, @@ -2960,7 +2960,7 @@ }, { "id": 7, - "name": "SIM2 to PAYERFSP", + "name": "Send transfer $currency2 from SIM2 to PAYERFSP", "requests": [ { "id": 3, @@ -3252,7 +3252,7 @@ }, { "id": 8, - "name": "PAYEEFSP to SIM2", + "name": "Send transfer $currency from PAYEEFSP to SIM2", "requests": [ { "id": 3, @@ -3545,7 +3545,7 @@ }, { "id": 9, - "name": "PAYEEFSP to PAYERFSP", + "name": "Send transfer $currency2 from PAYEEFSP to PAYERFSP", "requests": [ { "id": 3, From 1b44a9726b4d4f76f23bfd3a1deedc8d82779eac Mon Sep 17 00:00:00 2001 From: vgenev Date: Fri, 25 Jun 2021 16:54:35 +0300 Subject: [PATCH 7/7] renamed few more things --- ...ettlement-management-primary-currency-test.json | 14 +++++++------- ...Settlement-management-second-currency-test.json | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/collections/hub/golden_path/settlement_management/Settlement-management-primary-currency-test.json b/collections/hub/golden_path/settlement_management/Settlement-management-primary-currency-test.json index bff6c6d0..7827f592 100644 --- a/collections/hub/golden_path/settlement_management/Settlement-management-primary-currency-test.json +++ b/collections/hub/golden_path/settlement_management/Settlement-management-primary-currency-test.json @@ -3,7 +3,7 @@ "test_cases": [ { "id": 1, - "name": "Settlement_management", + "name": "Pre-settlement account activation per participant for $currency", "requests": [ { "id": 3, @@ -1299,7 +1299,7 @@ }, { "id": 4, - "name": "SIM1 to SIM2", + "name": "Send transfer in $currency from SIM1 to SIM2", "requests": [ { "id": 3, @@ -1596,7 +1596,7 @@ }, { "id": 5, - "name": "SIM1 to PAYEEFSP", + "name": "Send transfer in $currency from SIM1 to PAYEEFSP", "requests": [ { "id": 3, @@ -1889,7 +1889,7 @@ }, { "id": 6, - "name": "PAYERFSP to SIM1", + "name": "Send transfer in $currency from PAYERFSP to SIM1", "requests": [ { "id": 3, @@ -2182,7 +2182,7 @@ }, { "id": 7, - "name": "SIM2 to PAYERFSP", + "name": "Send transfer in $currency from SIM2 to PAYERFSP", "requests": [ { "id": 3, @@ -2474,7 +2474,7 @@ }, { "id": 8, - "name": "PAYEEFSP to SIM2", + "name": "Send transfer in $currency from PAYEEFSP to SIM2", "requests": [ { "id": 3, @@ -2767,7 +2767,7 @@ }, { "id": 9, - "name": "PAYEEFSP to PAYERFSP", + "name": "Send transfer in $currency from PAYEEFSP to PAYERFSP", "requests": [ { "id": 3, diff --git a/collections/hub/golden_path/settlement_management/Settlement-management-second-currency-test.json b/collections/hub/golden_path/settlement_management/Settlement-management-second-currency-test.json index 4bdd7c69..c568d958 100644 --- a/collections/hub/golden_path/settlement_management/Settlement-management-second-currency-test.json +++ b/collections/hub/golden_path/settlement_management/Settlement-management-second-currency-test.json @@ -3,7 +3,7 @@ "test_cases": [ { "id": 1, - "name": "Settlement_management", + "name": "Pre-settlement account activation per participant for $currency2", "requests": [ { "id": 3, @@ -1299,7 +1299,7 @@ }, { "id": 4, - "name": "SIM1 to SIM2", + "name": "Send transfer from SIM1 to SIM2 in $currency2", "requests": [ { "id": 3, @@ -1596,7 +1596,7 @@ }, { "id": 5, - "name": "SIM1 to PAYEEFSP", + "name": "Send transfer from SIM1 to PAYEEFSP in $currency2", "requests": [ { "id": 3, @@ -1889,7 +1889,7 @@ }, { "id": 6, - "name": "PAYERFSP to SIM1", + "name": "Send transfer from PAYERFSP to SIM1 in $currency2", "requests": [ { "id": 3, @@ -2182,7 +2182,7 @@ }, { "id": 7, - "name": "SIM2 to PAYERFSP", + "name": "Send transfer from SIM2 to PAYERFSP in $currency2", "requests": [ { "id": 3, @@ -2474,7 +2474,7 @@ }, { "id": 8, - "name": "PAYEEFSP to SIM2", + "name": "Send transfer from PAYEEFSP to SIM2 in $currency2", "requests": [ { "id": 3, @@ -2767,7 +2767,7 @@ }, { "id": 9, - "name": "PAYEEFSP to PAYERFSP", + "name": "Send transfer from PAYEEFSP to PAYERFSP in $currency2", "requests": [ { "id": 3,