diff --git a/LICENSE.md b/LICENSE.md index 40350591..ea7dac99 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,6 @@ # LICENSE -Copyright © 2020 Mojaloop Foundation +Copyright © 2021 Mojaloop Foundation The Mojaloop files are made available by the Mojaloop Foundation under the Apache License, Version 2.0 (the "License") and you may not use these files except in compliance with the [License](http://www.apache.org/licenses/LICENSE-2.0). diff --git a/README.md b/README.md index 35cc270b..0ff602d3 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,8 @@ This repository is a collection of tests for the Mojaloop testing toolkit - [Provisioning collection](#provisioning-collection) - [Golden Path collection](#golden-path-collection) - [Sequence Diagram test collection](#sequence-diagram-test-collection) + - [Third Party Provisioning collectionn](#third-party-provisioning-collection) + - [Third Party test collection](#third-party-test-collection) - [For Mojaloop **FSP** Implementations](#for-mojaloop-fsp-implementations) - [Provisioning collection for Mojaloop Simulator](#provisioning-collection-for-mojaloop-simulator) - [DFSP Golden Path collection](#dfsp-golden-path-collection) @@ -56,6 +58,37 @@ Please follow the below standards for naming conventions and structure: * The name of the collection should be a description of the sequence diagram as well as the file name such as [Create Quote [seq-quote-1.0.0]](collections/hub/sequence/quoting-service/Create%20Quote%20%5Bseq-quote-1.0.0%5D.json) * If the sequence diagram has alt's in it then the description of the sequence diagram should contain the title of the alt eg. *Create quote - quote invalid - Missing Date Header - [seq-quote-1.0.0]* + +### Third Party Provisioning Collection + +``` +collections/hub/provisioning_thirdparty +``` + +This collection adds the necessary participants and parties to +make the Third Party Tests run. + +See [collections/hub/provisioning_thirdparty](./collections/hub/provisioning_thirdparty) +for more information. + +### Third Party Test Collection + +``` +collections/hub/thirdparty +``` + +This collection tests the optional Third Party features that +enable 3rd Party Payment Initiation (3PPI). + +The tests are executed from the perspective of a PISP with a +participantId of `pisp`, and use the [outbound thirdparty sdk](https://github.com/mojaloop/thirdparty-sdk) +API. + +The following scenarios are currently included: +- Account Linking (WEB) +- Account Linking (OTP) +- 3rd Party Transaction Request + ## For Mojaloop FSP Implementations ### Provisioning collection for Mojaloop Simulator: diff --git a/collections/hub/provisioning_thirdparty/README.md b/collections/hub/provisioning_thirdparty/README.md new file mode 100644 index 00000000..bdf154cc --- /dev/null +++ b/collections/hub/provisioning_thirdparty/README.md @@ -0,0 +1,13 @@ +# provisioning_thirdparty + +This collection configures the following participants: + +- `pispa` - a Payment Initiation Service Provider (PISP) +- `dfspa` - a DFSP that supports PISP account linking +- `dfpsb` - an ordinary DFSP that does not support account linking + +And the following parties: + +- dfpspa: `MSISDN/589408120` - Paolo Fernandez +- dfpspb: `MSISDN/329294234` - Daniel Rizal +- dfpspb: `MSISDN/32929124` - Alejandro Leon \ No newline at end of file diff --git a/collections/hub/provisioning_thirdparty/centralauth.json b/collections/hub/provisioning_thirdparty/centralauth.json new file mode 100644 index 00000000..3aa376f5 --- /dev/null +++ b/collections/hub/provisioning_thirdparty/centralauth.json @@ -0,0 +1,671 @@ +{ + "name": "centralauth-provisioning", + "test_cases": [ + { + "id": 1, + "name": "centralauth account", + "meta": { + "info": "centralauth account" + }, + "requests": [ + { + "id": 1, + "meta": { + "info": "Add centralauth" + }, + "description": "Add centralauth", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants", + "path": "/participants", + "method": "post", + "body": { + "name": "{$inputs.CENTRALAUTH_NAME}", + "currency": "{$inputs.currency}" + }, + "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": 6, + "meta": { + "info": "Add centralauth with different currency for default settlement case" + }, + "description": "Add centralauth with different currency for default settlement case", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants", + "path": "/participants", + "method": "post", + "body": { + "name": "{$inputs.CENTRALAUTH_NAME}", + "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": 2, + "name": "centralauth callbacks", + "meta": { + "info": "centralauth callbacks" + }, + "requests": [ + { + "id": 1, + "meta": { + "info": "Add centralauth callback - TP_CB_URL_TRANSACTION_REQUEST_VERIFY_POST" + }, + "description": "Add centralauth callback - TP_CB_URL_TRANSACTION_REQUEST_VERIFY_POST", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.CENTRALAUTH_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.CENTRALAUTH_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "TP_CB_URL_TRANSACTION_REQUEST_VERIFY_POST", + "value": "{$inputs.CENTRALAUTH_CB_FSPIOP}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 2, + "meta": { + "info": "Add centralauth callback - TP_CB_URL_TRANSACTION_REQUEST_VERIFY_PUT" + }, + "description": "Add centralauth callback - TP_CB_URL_TRANSACTION_REQUEST_VERIFY_PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.CENTRALAUTH_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.CENTRALAUTH_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "TP_CB_URL_TRANSACTION_REQUEST_VERIFY_PUT", + "value": "{$inputs.CENTRALAUTH_CB_FSPIOP}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 3, + "meta": { + "info": "Add centralauth callback - TP_CB_URL_TRANSACTION_REQUEST_VERIFY_PUT_ERROR" + }, + "description": "Add centralauth callback - TP_CB_URL_TRANSACTION_REQUEST_VERIFY_PUT_ERROR", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.CENTRALAUTH_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.CENTRALAUTH_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "TP_CB_URL_TRANSACTION_REQUEST_VERIFY_PUT_ERROR", + "value": "{$inputs.CENTRALAUTH_CB_FSPIOP}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 10, + "meta": { + "info": "Add centralauth callback - TP_CB_URL_CONSENT_POST" + }, + "description": "Add centralauth callback - TP_CB_URL_CONSENT_POST", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.CENTRALAUTH_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.CENTRALAUTH_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "TP_CB_URL_CONSENT_POST", + "value": "{$inputs.CENTRALAUTH_CB_FSPIOP}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 11, + "meta": { + "info": "Add centralauth callback - TP_CB_URL_CONSENT_GET" + }, + "description": "Add centralauth callback - TP_CB_URL_CONSENT_GET", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.CENTRALAUTH_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.CENTRALAUTH_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "TP_CB_URL_CONSENT_GET", + "value": "{$inputs.CENTRALAUTH_CB_FSPIOP}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 12, + "meta": { + "info": "Add centralauth callback - TP_CB_URL_CONSENT_PUT" + }, + "description": "Add centralauth callback - TP_CB_URL_CONSENT_PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.CENTRALAUTH_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.CENTRALAUTH_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "TP_CB_URL_CONSENT_PUT", + "value": "{$inputs.CENTRALAUTH_CB_FSPIOP}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 13, + "meta": { + "info": "Add centralauth callback - TP_CB_URL_CONSENT_PUT_ERROR" + }, + "description": "Add centralauth callback - TP_CB_URL_CONSENT_PUT_ERROR", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.CENTRALAUTH_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.CENTRALAUTH_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "TP_CB_URL_CONSENT_PUT_ERROR", + "value": "{$inputs.CENTRALAUTH_CB_FSPIOP}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 17, + "meta": { + "info": "Add centralauth callback - TP_CB_URL_CONSENT_PATCH" + }, + "description": "Add centralauth callback - TP_CB_URL_CONSENT_PATCH", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.CENTRALAUTH_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.CENTRALAUTH_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "TP_CB_URL_CONSENT_PATCH", + "value": "{$inputs.CENTRALAUTH_CB_FSPIOP}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 18, + "meta": { + "info": "Add centralauth callback - FSPIOP_CALLBACK_URL_PARTICIPANT_PUT" + }, + "description": "Add centralauth callback - FSPIOP_CALLBACK_URL_PARTICIPANT_PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.CENTRALAUTH_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.CENTRALAUTH_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_PUT", + "value": "{$inputs.CENTRALAUTH_CB_FSPIOP}/participants/{{partyIdType}}/{{partyIdentifier}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 19, + "meta": { + "info": "Add centralauth callback - FSPIOP_CALLBACK_URL_PARTICIPANT_PUT_ERROR" + }, + "description": "Add centralauth callback - FSPIOP_CALLBACK_URL_PARTICIPANT_PUT_ERROR", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.CENTRALAUTH_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.CENTRALAUTH_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_PUT_ERROR", + "value": "{$inputs.CENTRALAUTH_CB_FSPIOP}/participants/{{partyIdType}}/{{partyIdentifier}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 20, + "meta": { + "info": "Add centralauth callback - FSPIOP_CALLBACK_URL_PARTICIPANT_BATCH_PUT" + }, + "description": "Add centralauth callback - FSPIOP_CALLBACK_URL_PARTICIPANT_BATCH_PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.CENTRALAUTH_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.CENTRALAUTH_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_BATCH_PUT", + "value": "{$inputs.CENTRALAUTH_CB_FSPIOP}/participants/{{requestId}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 21, + "meta": { + "info": "Add centralauth callback - FSPIOP_CALLBACK_URL_PARTICIPANT_BATCH_PUT_ERROR" + }, + "description": "Add centralauth callback - FSPIOP_CALLBACK_URL_PARTICIPANT_BATCH_PUT_ERROR", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.CENTRALAUTH_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.CENTRALAUTH_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_BATCH_PUT_ERROR", + "value": "{$inputs.CENTRALAUTH_CB_FSPIOP}/participants/{{requestId}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 22, + "meta": { + "info": "Add centralauth callback - FSPIOP_CALLBACK_URL_PARTICIPANT_SUB_ID_DELETE" + }, + "description": "Add centralauth callback - FSPIOP_CALLBACK_URL_PARTICIPANT_SUB_ID_DELETE", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.CENTRALAUTH_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.CENTRALAUTH_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_SUB_ID_DELETE", + "value": "{$inputs.CENTRALAUTH_CB_FSPIOP}/participants/{{partyIdType}}/{{partyIdentifier}}/{{partySubIdOrType}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 23, + "meta": { + "info": "Add centralauth callback - FSPIOP_CALLBACK_URL_PARTICIPANT_SUB_ID_PUT" + }, + "description": "Add centralauth callback - FSPIOP_CALLBACK_URL_PARTICIPANT_SUB_ID_PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.CENTRALAUTH_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.CENTRALAUTH_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_SUB_ID_PUT", + "value": "{$inputs.CENTRALAUTH_CB_FSPIOP}/participants/{{partyIdType}}/{{partyIdentifier}}/{{partySubIdOrType}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 24, + "meta": { + "info": "Add centralauth callback - FSPIOP_CALLBACK_URL_PARTICIPANT_SUB_ID_PUT_ERROR" + }, + "description": "Add centralauth callback - FSPIOP_CALLBACK_URL_PARTICIPANT_SUB_ID_PUT_ERROR", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.CENTRALAUTH_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.CENTRALAUTH_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_SUB_ID_PUT_ERROR", + "value": "{$inputs.CENTRALAUTH_CB_FSPIOP}/participants/{{partyIdType}}/{{partyIdentifier}}/{{partySubIdOrType}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + } + ] + } + ] +} \ No newline at end of file diff --git a/collections/hub/provisioning_thirdparty/dfspa.json b/collections/hub/provisioning_thirdparty/dfspa.json new file mode 100644 index 00000000..06512453 --- /dev/null +++ b/collections/hub/provisioning_thirdparty/dfspa.json @@ -0,0 +1,1816 @@ +{ + "name": "dfspa-provisioning", + "test_cases": [ + { + "id": 1, + "name": "dfspa account", + "meta": { + "info": "dfspa account" + }, + "requests": [ + { + "id": 1, + "meta": { + "info": "Add dfspa" + }, + "description": "Add dfspa", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants", + "path": "/participants", + "method": "post", + "body": { + "name": "{$inputs.DFSPA_NAME}", + "currency": "{$inputs.currency}" + }, + "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": 2, + "meta": { + "info": "Add initial position and limits - dfspa" + }, + "description": "Add initial position and limits - dfspa", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/initialPositionAndLimits", + "path": "/participants/{$inputs.DFSPA_NAME}/initialPositionAndLimits", + "method": "post", + "params": { + "name": "{$inputs.DFSPA_NAME}" + }, + "body": { + "currency": "{$inputs.currency}", + "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)", + "}" + ] + } + ] + } + }, + { + "id": 3, + "meta": { + "info": "dfspa Get Status Request before deposit" + }, + "description": "dfspa Get Status Request before deposit", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.DFSPA_NAME}/accounts", + "method": "get", + "params": { + "name": "{$inputs.DFSPA_NAME}" + }, + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "status to be 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + } + ] + }, + "scripts": { + "postRequest": { + "exec": [ + "const jsonData = pm.response.body", + "console.log(jsonData)", + "for(var i in jsonData) {", + " if(jsonData[i].ledgerAccountType === 'SETTLEMENT') {", + " pm.environment.set(\"dfspaSettlementAccountId\", jsonData[i].id)", + " pm.environment.set(\"dfspaSettlementAccountBalanceBeforeFundsIn\", jsonData[i].value)", + " }", + "}" + ] + } + } + }, + { + "id": 4, + "meta": { + "info": "Deposit Funds in Settlement Account - dfspa" + }, + "description": "Deposit Funds in Settlement Account - dfspa", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts/{id}", + "path": "/participants/{$inputs.DFSPA_NAME}/accounts/{$environment.dfspaSettlementAccountId}", + "method": "post", + "params": { + "name": "{$inputs.DFSPA_NAME}", + "id": "{$environment.dfspaSettlementAccountId}" + }, + "body": { + "transferId": "{$environment.dfspafundsInPrepareTransferId}", + "externalReference": "string", + "action": "recordFundsIn", + "reason": "string", + "amount": { + "amount": "{$environment.dfspafundsInPrepareAmount}", + "currency": "{$inputs.currency}" + }, + "extensionList": { + "extension": [ + { + "key": "string", + "value": "string" + } + ] + } + }, + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + } + ] + }, + "scripts": { + "preRequest": { + "exec": [ + "var uuid = require('uuid');", + "pm.environment.set('dfspafundsInPrepareTransferId', uuid.v4())", + "pm.environment.set('dfspafundsInPrepareAmount', 5000);" + ] + } + } + }, + { + "id": 5, + "meta": { + "info": "dfspa Get Status Request after deposit" + }, + "description": "dfspa Get Status Request after deposit", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.DFSPA_NAME}/accounts", + "method": "get", + "params": { + "name": "{$inputs.DFSPA_NAME}" + }, + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "status to be 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "dfspa Settlement Account Balance After FundsIn should be equal to the balance before plus the transfer amount", + "exec": [ + "expect(+environment.dfspaSettlementAccountBalanceAfterFundsIn).to.equal(+environment.dfspaSettlementAccountBalanceBeforeFundsIn - +environment.dfspafundsInPrepareAmount)" + ] + } + ] + }, + "scripts": { + "postRequest": { + "exec": [ + "const jsonData = pm.response.body", + "console.log(jsonData)", + "for(var i in jsonData) {", + " if(jsonData[i].ledgerAccountType === 'SETTLEMENT') {", + " pm.environment.set(\"dfspaSettlementAccountBalanceAfterFundsIn\", jsonData[i].value)", + " }", + "}" + ] + } + }, + "delay": "500" + }, + { + "id": 6, + "meta": { + "info": "Add dfspa with different currency for default settlement case" + }, + "description": "Add dfspa with different currency for default settlement case", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants", + "path": "/participants", + "method": "post", + "body": { + "name": "{$inputs.DFSPA_NAME}", + "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, + "meta": { + "info": "Add initial position and limits with different currency - dfspa" + }, + "description": "Add initial position and limits with different currency - dfspa", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/initialPositionAndLimits", + "path": "/participants/{$inputs.DFSPA_NAME}/initialPositionAndLimits", + "method": "post", + "params": { + "name": "{$inputs.DFSPA_NAME}" + }, + "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)", + "}" + ] + } + ] + } + } + ] + }, + { + "id": 2, + "name": "dfspa callbacks", + "meta": { + "info": "dfspa callbacks" + }, + "requests": [ + { + "id": 1, + "meta": { + "info": "Add dfspa callback - AUTHORIZATIONS" + }, + "description": "Add dfspa callback - AUTHORIZATIONS", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSPA_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSPA_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_AUTHORIZATIONS", + "value": "{$inputs.DFSPA_CB_FSPIOP}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 2, + "meta": { + "info": "Add dfspa callback - PARTICIPANT PUT" + }, + "description": "Add dfspa callback - PARTICIPANT PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSPA_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSPA_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_PUT", + "value": "{$inputs.DFSPA_CB_FSPIOP}/participants/{{partyIdType}}/{{partyIdentifier}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 3, + "meta": { + "info": "Add dfspa callback - PARTICIPANT PUT Error" + }, + "description": "Add dfspa callback - PARTICIPANT PUT Error", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSPA_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSPA_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_PUT_ERROR", + "value": "{$inputs.DFSPA_CB_FSPIOP}/participants/{{partyIdType}}/{{partyIdentifier}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 4, + "meta": { + "info": "Add dfspa callback - PARTICIPANT PUT Batch" + }, + "description": "Add dfspa callback - PARTICIPANT PUT Batch", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSPA_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSPA_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_BATCH_PUT", + "value": "{$inputs.DFSPA_CB_FSPIOP}/participants/{{requestId}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 5, + "meta": { + "info": "Add dfspa callback - PARTICIPANT PUT Batch Error" + }, + "description": "Add dfspa callback - PARTICIPANT PUT Batch Error", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSPA_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSPA_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_BATCH_PUT_ERROR", + "value": "{$inputs.DFSPA_CB_FSPIOP}/participants/{{requestId}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 6, + "meta": { + "info": "Add dfspa callback - PARTIES GET" + }, + "description": "Add dfspa callback - PARTIES GET", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSPA_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSPA_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTIES_GET", + "value": "{$inputs.DFSPA_CB_FSPIOP}/parties/{{partyIdType}}/{{partyIdentifier}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 7, + "meta": { + "info": "Add dfspa callback - PARTIES PUT" + }, + "description": "Add dfspa callback - PARTIES PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSPA_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSPA_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTIES_PUT", + "value": "{$inputs.DFSPA_CB_FSPIOP}/parties/{{partyIdType}}/{{partyIdentifier}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 8, + "meta": { + "info": "Add dfspa callback - PARTIES PUT Error" + }, + "description": "Add dfspa callback - PARTIES PUT Error", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSPA_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSPA_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTIES_PUT_ERROR", + "value": "{$inputs.DFSPA_CB_FSPIOP}/parties/{{partyIdType}}/{{partyIdentifier}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 9, + "meta": { + "info": "Add dfspa callback - QUOTES" + }, + "description": "Add dfspa callback - QUOTES", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSPA_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSPA_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_QUOTES", + "value": "{$inputs.DFSPA_CB_FSPIOP}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 10, + "meta": { + "info": "Add dfspa callback - TXN REQUEST" + }, + "description": "Add dfspa callback - TXN REQUEST", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSPA_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSPA_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_TRX_REQ_SERVICE", + "value": "{$inputs.DFSPA_CB_FSPIOP}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 11, + "meta": { + "info": "Add dfspa callback - TRANSFERS POST" + }, + "description": "Add dfspa callback - TRANSFERS POST", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSPA_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSPA_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_TRANSFER_POST", + "value": "{$inputs.DFSPA_CB_FSPIOP}/transfers" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 12, + "meta": { + "info": "Add dfspa callback - TRANSFERS PUT" + }, + "description": "Add dfspa callback - TRANSFERS PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSPA_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSPA_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_TRANSFER_PUT", + "value": "{$inputs.DFSPA_CB_FSPIOP}/transfers/{{transferId}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 13, + "meta": { + "info": "Add dfspa callback - TRANSFERS ERROR" + }, + "description": "Add dfspa callback - TRANSFERS ERROR", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSPA_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSPA_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_TRANSFER_ERROR", + "value": "{$inputs.DFSPA_CB_FSPIOP}/transfers/{{transferId}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 14, + "meta": { + "info": "Add dfspa callback - BULK-TRANSFER POST" + }, + "description": "Add dfspa callback - BULK-TRANSFER POST", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSPA_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSPA_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_BULK_TRANSFER_POST", + "value": "{$inputs.DFSPA_CB_FSPIOP}/bulkTransfers" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 15, + "meta": { + "info": "Add dfspa callback - BULK-TRANSFER PUT" + }, + "description": "Add dfspa callback - BULK-TRANSFER PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSPA_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSPA_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_BULK_TRANSFER_PUT", + "value": "{$inputs.DFSPA_CB_FSPIOP}/bulkTransfers/{{id}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 16, + "meta": { + "info": "Add dfspa callback - BULK-TRANSFER ERROR" + }, + "description": "Add dfspa callback - BULK-TRANSFER ERROR", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSPA_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSPA_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_BULK_TRANSFER_ERROR", + "value": "{$inputs.DFSPA_CB_FSPIOP}/bulkTransfers/{{id}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 21, + "meta": { + "info": "Add callback - PARTICIPANT SUB-ID PUT" + }, + "description": "Add callback - PARTICIPANT SUB-ID PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSPA_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSPA_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_SUB_ID_PUT", + "value": "{$inputs.DFSPA_CB_FSPIOP}/participants/{{partyIdType}}/{{partyIdentifier}}/{{partySubIdOrType}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 22, + "meta": { + "info": "Add callback - PARTICIPANT SUB-ID PUT Error" + }, + "description": "Add callback - PARTICIPANT SUB-ID PUT Error", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSPA_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSPA_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_SUB_ID_PUT_ERROR", + "value": "{$inputs.DFSPA_CB_FSPIOP}/participants/{{partyIdType}}/{{partyIdentifier}}/{{partySubIdOrType}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 23, + "meta": { + "info": "Add callback - PARTICIPANT SUB-ID DELETE" + }, + "description": "Add callback - PARTICIPANT SUB-ID DELETE", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSPA_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSPA_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_SUB_ID_DELETE", + "value": "{$inputs.DFSPA_CB_FSPIOP}/participants/{{partyIdType}}/{{partyIdentifier}}/{{partySubIdOrType}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 24, + "meta": { + "info": "Add callback - PARTIES SUB-ID GET" + }, + "description": "Add callback - PARTIES SUB-ID GET", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSPA_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSPA_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTIES_SUB_ID_GET", + "value": "{$inputs.DFSPA_CB_FSPIOP}/parties/{{partyIdType}}/{{partyIdentifier}}/{{partySubIdOrType}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 25, + "meta": { + "info": "Add callback - PARTIES SUB-ID PUT" + }, + "description": "Add callback - PARTIES SUB-ID PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSPA_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSPA_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTIES_SUB_ID_PUT", + "value": "{$inputs.DFSPA_CB_FSPIOP}/parties/{{partyIdType}}/{{partyIdentifier}}/{{partySubIdOrType}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 26, + "meta": { + "info": "Add callback - PARTIES SUB-ID ERROR PUT" + }, + "description": "Add callback - PARTIES SUB-ID ERROR PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSPA_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSPA_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTIES_SUB_ID_PUT_ERROR", + "value": "{$inputs.DFSPA_CB_FSPIOP}/parties/{{partyIdType}}/{{partyIdentifier}}/{{partySubIdOrType}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 27, + "meta": { + "info": "Add callback - TP_CB_URL_ACCOUNTS_GET" + }, + "description": "Add callback - TP_CB_URL_ACCOUNTS_GET", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSPA_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSPA_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "TP_CB_URL_ACCOUNTS_GET", + "value": "{$inputs.DFSPA_CB_THIRDPARTY}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 28, + "meta": { + "info": "Add callback - TP_CB_URL_TRANSACTION_REQUEST_POST" + }, + "description": "Add callback - TP_CB_URL_TRANSACTION_REQUEST_POST", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSPA_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSPA_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "TP_CB_URL_TRANSACTION_REQUEST_POST", + "value": "{$inputs.DFSPA_CB_THIRDPARTY}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 29, + "meta": { + "info": "Add callback - TP_CB_URL_TRANSACTION_REQUEST_AUTH_POST" + }, + "description": "Add callback - TP_CB_URL_TRANSACTION_REQUEST_AUTH_POST", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSPA_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSPA_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "TP_CB_URL_TRANSACTION_REQUEST_AUTH_POST", + "value": "{$inputs.DFSPA_CB_THIRDPARTY}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 30, + "meta": { + "info": "Add callback - TP_CB_URL_CONSENT_REQUEST_POST" + }, + "description": "Add callback - TP_CB_URL_CONSENT_REQUEST_POST", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSPA_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSPA_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "TP_CB_URL_CONSENT_REQUEST_POST", + "value": "{$inputs.DFSPA_CB_THIRDPARTY}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 31, + "meta": { + "info": "Add callback - TP_CB_URL_CONSENT_REQUEST_PATCH" + }, + "description": "Add callback - TP_CB_URL_CONSENT_REQUEST_PATCH", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSPA_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSPA_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "TP_CB_URL_CONSENT_REQUEST_PATCH", + "value": "{$inputs.DFSPA_CB_THIRDPARTY}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 32, + "meta": { + "info": "Add callback - TP_CB_URL_CONSENT_PUT" + }, + "description": "Add callback - TP_CB_URL_CONSENT_PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSPA_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSPA_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "TP_CB_URL_CONSENT_PUT", + "value": "{$inputs.DFSPA_CB_THIRDPARTY}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 33, + "meta": { + "info": "Add callback - TP_CB_URL_CONSENT_POST" + }, + "description": "Add callback - TP_CB_URL_CONSENT_POST", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSPA_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSPA_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "TP_CB_URL_CONSENT_POST", + "value": "{$inputs.DFSPA_CB_THIRDPARTY}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 34, + "meta": { + "info": "Add callback - TP_CB_URL_CONSENT_PUT_ERROR" + }, + "description": "Add callback - TP_CB_URL_CONSENT_PUT_ERROR", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSPA_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSPA_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "TP_CB_URL_CONSENT_PUT_ERROR", + "value": "{$inputs.DFSPA_CB_THIRDPARTY}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 35, + "meta": { + "info": "Add callback - TP_CB_URL_TRANSACTION_REQUEST_POST" + }, + "description": "Add callback - TP_CB_URL_TRANSACTION_REQUEST_POST", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSPA_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSPA_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "TP_CB_URL_TRANSACTION_REQUEST_POST", + "value": "{$inputs.DFSPA_CB_THIRDPARTY}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 36, + "meta": { + "info": "Add callback - TP_CB_URL_TRANSACTION_REQUEST_PUT_ERROR" + }, + "description": "Add callback - TP_CB_URL_TRANSACTION_REQUEST_PUT_ERROR", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSPA_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSPA_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "TP_CB_URL_TRANSACTION_REQUEST_PUT_ERROR", + "value": "{$inputs.DFSPA_CB_THIRDPARTY}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 37, + "meta": { + "info": "Add callback - TP_CB_URL_TRANSACTION_REQUEST_AUTH_PUT" + }, + "description": "Add callback - TP_CB_URL_TRANSACTION_REQUEST_AUTH_PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSPA_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSPA_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "TP_CB_URL_TRANSACTION_REQUEST_AUTH_PUT", + "value": "{$inputs.DFSPA_CB_THIRDPARTY}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 38, + "meta": { + "info": "Add callback - TP_CB_URL_TRANSACTION_REQUEST_AUTH_PUT_ERROR" + }, + "description": "Add callback - TP_CB_URL_TRANSACTION_REQUEST_AUTH_PUT_ERROR", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSPA_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSPA_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "TP_CB_URL_TRANSACTION_REQUEST_AUTH_PUT_ERROR", + "value": "{$inputs.DFSPA_CB_THIRDPARTY}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 39, + "meta": { + "info": "Add callback - TP_CB_URL_TRANSACTION_REQUEST_VERIFY_POST" + }, + "description": "Add callback - TP_CB_URL_TRANSACTION_REQUEST_VERIFY_POST", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSPA_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSPA_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "TP_CB_URL_TRANSACTION_REQUEST_VERIFY_POST", + "value": "{$inputs.DFSPA_CB_THIRDPARTY}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 40, + "meta": { + "info": "Add callback - TP_CB_URL_TRANSACTION_REQUEST_VERIFY_PUT" + }, + "description": "Add callback - TP_CB_URL_TRANSACTION_REQUEST_VERIFY_PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSPA_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSPA_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "TP_CB_URL_TRANSACTION_REQUEST_VERIFY_PUT", + "value": "{$inputs.DFSPA_CB_THIRDPARTY}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 41, + "meta": { + "info": "Add callback - TP_CB_URL_TRANSACTION_REQUEST_VERIFY_PUT_ERROR" + }, + "description": "Add callback - TP_CB_URL_TRANSACTION_REQUEST_VERIFY_PUT_ERROR", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSPA_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSPA_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "TP_CB_URL_TRANSACTION_REQUEST_VERIFY_PUT_ERROR", + "value": "{$inputs.DFSPA_CB_THIRDPARTY}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + } + ] + }, + { + "id": 3, + "name": "dfspa oracle_registration", + "meta": { + "info": "dfspa oracle_registration" + }, + "requests": [ + { + "id": 1, + "meta": { + "info": "Add 589408120 in payeeIdType Oracle" + }, + "description": "Add 589408120 in payeeIdType Oracle", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "operationPath": "/participants/{Type}/{ID}", + "path": "/participants/{$inputs.payeeIdType}/589408120", + "method": "post", + "params": { + "Type": "{$inputs.payeeIdType}", + "ID": "589408120" + }, + "url": "{$inputs.HOST_ACCOUNT_LOOKUP_SERVICE}", + "headers": { + "Content-Type": "application/vnd.interoperability.participants+json;version=1.0", + "Accept": "application/vnd.interoperability.participants+json;version=1", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.DFSPA_NAME}" + }, + "body": { + "fspId": "{$inputs.DFSPA_NAME}", + "currency": "{$inputs.currency}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + } + ] + }, + "ignoreCallbacks": true, + "scripts": { + "preRequest": { + "exec": [ + "const testApiAddParty = {\r", + " url: pm.environment.get(\"DFSPA_BACKEND_TESTAPI_URL\") + '/repository/parties',\r", + " method: 'POST',\r", + " header: {\r", + " 'Content-Type': 'application/json'\r", + " },\r", + " body: {\r", + " mode: 'raw',\r", + " raw: JSON.stringify({\r", + " \"displayName\": \"Alice Alpaca\",\r", + " \"firstName\": \"Alice\",\r", + " \"middleName\": \"K\",\r", + " \"lastName\": \"Alpaca\",\r", + " \"dateOfBirth\": \"1970-01-01\",\r", + " \"idType\": pm.environment.get(\"payeeIdType\"),\r", + " \"idValue\": \"589408120\"\r", + " })\r", + " }\r", + "}\r", + " \r", + "pm.sendRequest(testApiAddParty, function (err, response) {\r", + " console.log('testApiAddParty: ', JSON.stringify(response.json()))\r", + "});" + ] + } + } + } + ] + } + ] +} \ No newline at end of file diff --git a/collections/hub/provisioning_thirdparty/dfspb.json b/collections/hub/provisioning_thirdparty/dfspb.json new file mode 100644 index 00000000..495b6ddd --- /dev/null +++ b/collections/hub/provisioning_thirdparty/dfspb.json @@ -0,0 +1,1342 @@ +{ + "name": "dfspb-provisioning", + "test_cases": [ + { + "id": 1, + "name": "dfspb account", + "meta": { + "info": "dfspb account" + }, + "requests": [ + { + "id": 1, + "meta": { + "info": "Add dfspb" + }, + "description": "Add dfspb", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants", + "path": "/participants", + "method": "post", + "body": { + "name": "{$inputs.DFSPB_NAME}", + "currency": "{$inputs.currency}" + }, + "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": 2, + "meta": { + "info": "Add initial position and limits - dfspb" + }, + "description": "Add initial position and limits - dfspb", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/initialPositionAndLimits", + "path": "/participants/{$inputs.DFSPB_NAME}/initialPositionAndLimits", + "method": "post", + "params": { + "name": "{$inputs.DFSPB_NAME}" + }, + "body": { + "currency": "{$inputs.currency}", + "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)", + "}" + ] + } + ] + } + }, + { + "id": 3, + "meta": { + "info": "dfspb Get Status Request before deposit" + }, + "description": "dfspb Get Status Request before deposit", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.DFSPB_NAME}/accounts", + "method": "get", + "params": { + "name": "{$inputs.DFSPB_NAME}" + }, + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "status to be 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + } + ] + }, + "scripts": { + "postRequest": { + "exec": [ + "const jsonData = pm.response.body", + "console.log(jsonData)", + "for(var i in jsonData) {", + " if(jsonData[i].ledgerAccountType === 'SETTLEMENT') {", + " pm.environment.set(\"dfspbSettlementAccountId\", jsonData[i].id)", + " pm.environment.set(\"dfspbSettlementAccountBalanceBeforeFundsIn\", jsonData[i].value)", + " }", + "}" + ] + } + } + }, + { + "id": 4, + "meta": { + "info": "Deposit Funds in Settlement Account - dfspb" + }, + "description": "Deposit Funds in Settlement Account - dfspb", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts/{id}", + "path": "/participants/{$inputs.DFSPB_NAME}/accounts/{$environment.dfspbSettlementAccountId}", + "method": "post", + "params": { + "name": "{$inputs.DFSPB_NAME}", + "id": "{$environment.dfspbSettlementAccountId}" + }, + "body": { + "transferId": "{$environment.dfspbfundsInPrepareTransferId}", + "externalReference": "string", + "action": "recordFundsIn", + "reason": "string", + "amount": { + "amount": "{$environment.dfspbfundsInPrepareAmount}", + "currency": "{$inputs.currency}" + }, + "extensionList": { + "extension": [ + { + "key": "string", + "value": "string" + } + ] + } + }, + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "status to be 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + } + ] + }, + "scripts": { + "preRequest": { + "exec": [ + "var uuid = require('uuid');", + "pm.environment.set('dfspbfundsInPrepareTransferId', uuid.v4())", + "pm.environment.set('dfspbfundsInPrepareAmount', 5000);" + ] + } + } + }, + { + "id": 5, + "meta": { + "info": "dfspb Get Status Request after deposit" + }, + "description": "dfspb Get Status Request after deposit", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/{$inputs.DFSPB_NAME}/accounts", + "method": "get", + "params": { + "name": "{$inputs.DFSPB_NAME}" + }, + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "status to be 200", + "exec": [ + "expect(response.status).to.equal(200)" + ] + }, + { + "id": 2, + "description": "dfspb Settlement Account Balance After FundsIn should be equal to the balance before plus the transfer amount", + "exec": [ + "expect(+environment.dfspbSettlementAccountBalanceAfterFundsIn).to.equal(+environment.dfspbSettlementAccountBalanceBeforeFundsIn - +environment.dfspbfundsInPrepareAmount)" + ] + } + ] + }, + "scripts": { + "postRequest": { + "exec": [ + "const jsonData = pm.response.body", + "console.log(jsonData)", + "for(var i in jsonData) {", + " if(jsonData[i].ledgerAccountType === 'SETTLEMENT') {", + " pm.environment.set(\"dfspbSettlementAccountBalanceAfterFundsIn\", jsonData[i].value)", + " }", + "}" + ] + } + }, + "delay": "500" + }, + { + "id": 6, + "meta": { + "info": "Add dfspb with different currency for default settlement case" + }, + "description": "Add dfspb with different currency for default settlement case", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants", + "path": "/participants", + "method": "post", + "body": { + "name": "{$inputs.DFSPB_NAME}", + "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, + "meta": { + "info": "Add initial position and limits with different currency - dfspb" + }, + "description": "Add initial position and limits with different currency - dfspb", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/initialPositionAndLimits", + "path": "/participants/{$inputs.DFSPB_NAME}/initialPositionAndLimits", + "method": "post", + "params": { + "name": "{$inputs.DFSPB_NAME}" + }, + "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)", + "}" + ] + } + ] + } + } + ] + }, + { + "id": 2, + "name": "dfspb callbacks", + "meta": { + "info": "dfspb callbacks" + }, + "requests": [ + { + "id": 1, + "meta": { + "info": "Add dfspb callback - AUTHORIZATIONS" + }, + "description": "Add dfspb callback - AUTHORIZATIONS", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSPB_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSPB_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_AUTHORIZATIONS", + "value": "{$inputs.DFSPB_CB_FSPIOP}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 2, + "meta": { + "info": "Add dfspb callback - PARTICIPANT PUT" + }, + "description": "Add dfspb callback - PARTICIPANT PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSPB_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSPB_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_PUT", + "value": "{$inputs.DFSPB_CB_FSPIOP}/participants/{{partyIdType}}/{{partyIdentifier}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 3, + "meta": { + "info": "Add dfspb callback - PARTICIPANT PUT Error" + }, + "description": "Add dfspb callback - PARTICIPANT PUT Error", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSPB_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSPB_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_PUT_ERROR", + "value": "{$inputs.DFSPB_CB_FSPIOP}/participants/{{partyIdType}}/{{partyIdentifier}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 4, + "meta": { + "info": "Add dfspb callback - PARTICIPANT PUT Batch" + }, + "description": "Add dfspb callback - PARTICIPANT PUT Batch", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSPB_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSPB_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_BATCH_PUT", + "value": "{$inputs.DFSPB_CB_FSPIOP}/participants/{{requestId}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 5, + "meta": { + "info": "Add dfspb callback - PARTICIPANT PUT Batch Error" + }, + "description": "Add dfspb callback - PARTICIPANT PUT Batch Error", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSPB_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSPB_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_BATCH_PUT_ERROR", + "value": "{$inputs.DFSPB_CB_FSPIOP}/participants/{{requestId}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 6, + "meta": { + "info": "Add dfspb callback - PARTIES GET" + }, + "description": "Add dfspb callback - PARTIES GET", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSPB_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSPB_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTIES_GET", + "value": "{$inputs.DFSPB_CB_FSPIOP}/parties/{{partyIdType}}/{{partyIdentifier}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 7, + "meta": { + "info": "Add dfspb callback - PARTIES PUT" + }, + "description": "Add dfspb callback - PARTIES PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSPB_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSPB_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTIES_PUT", + "value": "{$inputs.DFSPB_CB_FSPIOP}/parties/{{partyIdType}}/{{partyIdentifier}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 8, + "meta": { + "info": "Add dfspb callback - PARTIES PUT Error" + }, + "description": "Add dfspb callback - PARTIES PUT Error", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSPB_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSPB_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTIES_PUT_ERROR", + "value": "{$inputs.DFSPB_CB_FSPIOP}/parties/{{partyIdType}}/{{partyIdentifier}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 9, + "meta": { + "info": "Add dfspb callback - QUOTES" + }, + "description": "Add dfspb callback - QUOTES", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSPB_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSPB_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_QUOTES", + "value": "{$inputs.DFSPB_CB_FSPIOP}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 10, + "meta": { + "info": "Add dfspb callback - TXN REQUEST" + }, + "description": "Add dfspb callback - TXN REQUEST", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSPB_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSPB_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_TRX_REQ_SERVICE", + "value": "{$inputs.DFSPB_CB_FSPIOP}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 11, + "meta": { + "info": "Add dfspb callback - TRANSFERS POST" + }, + "description": "Add dfspb callback - TRANSFERS POST", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSPB_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSPB_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_TRANSFER_POST", + "value": "{$inputs.DFSPB_CB_FSPIOP}/transfers" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 12, + "meta": { + "info": "Add dfspb callback - TRANSFERS PUT" + }, + "description": "Add dfspb callback - TRANSFERS PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSPB_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSPB_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_TRANSFER_PUT", + "value": "{$inputs.DFSPB_CB_FSPIOP}/transfers/{{transferId}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 13, + "meta": { + "info": "Add dfspb callback - TRANSFERS ERROR" + }, + "description": "Add dfspb callback - TRANSFERS ERROR", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSPB_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSPB_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_TRANSFER_ERROR", + "value": "{$inputs.DFSPB_CB_FSPIOP}/transfers/{{transferId}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 14, + "meta": { + "info": "Add dfspb callback - BULK-TRANSFER POST" + }, + "description": "Add dfspb callback - BULK-TRANSFER POST", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSPB_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSPB_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_BULK_TRANSFER_POST", + "value": "{$inputs.DFSPB_CB_FSPIOP}/bulkTransfers" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 15, + "meta": { + "info": "Add dfspb callback - BULK-TRANSFER PUT" + }, + "description": "Add dfspb callback - BULK-TRANSFER PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSPB_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSPB_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_BULK_TRANSFER_PUT", + "value": "{$inputs.DFSPB_CB_FSPIOP}/bulkTransfers/{{id}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 16, + "meta": { + "info": "Add dfspb callback - BULK-TRANSFER ERROR" + }, + "description": "Add dfspb callback - BULK-TRANSFER ERROR", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSPB_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSPB_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_BULK_TRANSFER_ERROR", + "value": "{$inputs.DFSPB_CB_FSPIOP}/bulkTransfers/{{id}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 21, + "meta": { + "info": "Add callback - PARTICIPANT SUB-ID PUT" + }, + "description": "Add callback - PARTICIPANT SUB-ID PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSPB_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSPB_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_SUB_ID_PUT", + "value": "{$inputs.DFSPB_CB_FSPIOP}/participants/{{partyIdType}}/{{partyIdentifier}}/{{partySubIdOrType}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 22, + "meta": { + "info": "Add callback - PARTICIPANT SUB-ID PUT Error" + }, + "description": "Add callback - PARTICIPANT SUB-ID PUT Error", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSPB_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSPB_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_SUB_ID_PUT_ERROR", + "value": "{$inputs.DFSPB_CB_FSPIOP}/participants/{{partyIdType}}/{{partyIdentifier}}/{{partySubIdOrType}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 23, + "meta": { + "info": "Add callback - PARTICIPANT SUB-ID DELETE" + }, + "description": "Add callback - PARTICIPANT SUB-ID DELETE", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSPB_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSPB_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTICIPANT_SUB_ID_DELETE", + "value": "{$inputs.DFSPB_CB_FSPIOP}/participants/{{partyIdType}}/{{partyIdentifier}}/{{partySubIdOrType}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 24, + "meta": { + "info": "Add callback - PARTIES SUB-ID GET" + }, + "description": "Add callback - PARTIES SUB-ID GET", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSPB_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSPB_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTIES_SUB_ID_GET", + "value": "{$inputs.DFSPB_CB_FSPIOP}/parties/{{partyIdType}}/{{partyIdentifier}}/{{partySubIdOrType}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 25, + "meta": { + "info": "Add callback - PARTIES SUB-ID PUT" + }, + "description": "Add callback - PARTIES SUB-ID PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSPB_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSPB_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTIES_SUB_ID_PUT", + "value": "{$inputs.DFSPB_CB_FSPIOP}/parties/{{partyIdType}}/{{partyIdentifier}}/{{partySubIdOrType}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 26, + "meta": { + "info": "Add callback - PARTIES SUB-ID ERROR PUT" + }, + "description": "Add callback - PARTIES SUB-ID ERROR PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.DFSPB_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.DFSPB_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTIES_SUB_ID_PUT_ERROR", + "value": "{$inputs.DFSPB_CB_FSPIOP}/parties/{{partyIdType}}/{{partyIdentifier}}/{{partySubIdOrType}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + } + ] + }, + { + "id": 3, + "name": "dfspb oracle_registration", + "meta": { + "info": "dfspb oracle_registration" + }, + "requests": [ + { + "id": 1, + "meta": { + "info": "Add 329294234 in payeeIdType Oracle" + }, + "description": "Add 329294234 in payeeIdType Oracle", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "operationPath": "/participants/{Type}/{ID}", + "path": "/participants/{$inputs.payeeIdType}/329294234", + "method": "post", + "params": { + "Type": "{$inputs.payeeIdType}", + "ID": "329294234" + }, + "url": "{$inputs.HOST_ACCOUNT_LOOKUP_SERVICE}", + "headers": { + "Content-Type": "application/vnd.interoperability.participants+json;version=1.0", + "Accept": "application/vnd.interoperability.participants+json;version=1", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.DFSPB_NAME}" + }, + "body": { + "fspId": "{$inputs.DFSPB_NAME}", + "currency": "{$inputs.currency}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + } + ] + }, + "ignoreCallbacks": true, + "scripts": { + "preRequest": { + "exec": [ + "const testApiAddParty = {\r", + " url: pm.environment.get(\"DFSPB_BACKEND_TESTAPI_URL\") + '/repository/parties',\r", + " method: 'POST',\r", + " header: {\r", + " 'Content-Type': 'application/json'\r", + " },\r", + " body: {\r", + " mode: 'raw',\r", + " raw: JSON.stringify({\r", + " \"displayName\": \"Bob Babirusa\",\r", + " \"firstName\": \"Bob\",\r", + " \"middleName\": \"O\",\r", + " \"lastName\": \"Babirusa\",\r", + " \"dateOfBirth\": \"1970-01-01\",\r", + " \"idType\": pm.environment.get(\"payeeIdType\"),\r", + " \"idValue\": \"329294234\"\r", + " })\r", + " }\r", + "}\r", + " \r", + "pm.sendRequest(testApiAddParty, function (err, response) {\r", + " console.log('testApiAddParty: ', JSON.stringify(response.json()))\r", + "});" + ] + } + } + } + ] + }, + { + "id": 4, + "name": "dfspb oracle_registration", + "meta": { + "info": "dfspb oracle_registration" + }, + "requests": [ + { + "id": 1, + "meta": { + "info": "Add 910498498 in payeeIdType Oracle" + }, + "description": "Add 910498498 in payeeIdType Oracle", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "operationPath": "/participants/{Type}/{ID}", + "path": "/participants/{$inputs.payeeIdType}/910498498", + "method": "post", + "params": { + "Type": "{$inputs.payeeIdType}", + "ID": "910498498" + }, + "url": "{$inputs.HOST_ACCOUNT_LOOKUP_SERVICE}", + "headers": { + "Content-Type": "application/vnd.interoperability.participants+json;version=1.0", + "Accept": "application/vnd.interoperability.participants+json;version=1", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.DFSPB_NAME}" + }, + "body": { + "fspId": "{$inputs.DFSPB_NAME}", + "currency": "{$inputs.currency}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 202", + "exec": [ + "expect(response.status).to.equal(202)" + ] + } + ] + }, + "ignoreCallbacks": true, + "scripts": { + "preRequest": { + "exec": [ + "const testApiAddParty = {\r", + " url: pm.environment.get(\"DFSPB_BACKEND_TESTAPI_URL\") + '/repository/parties',\r", + " method: 'POST',\r", + " header: {\r", + " 'Content-Type': 'application/json'\r", + " },\r", + " body: {\r", + " mode: 'raw',\r", + " raw: JSON.stringify({\r", + " \"displayName\": \"Billy Bairus\",\r", + " \"firstName\": \"Bob\",\r", + " \"middleName\": \"O\",\r", + " \"lastName\": \"Babirusa\",\r", + " \"dateOfBirth\": \"1970-01-01\",\r", + " \"idType\": pm.environment.get(\"payeeIdType\"),\r", + " \"idValue\": \"910498498\"\r", + " })\r", + " }\r", + "}\r", + " \r", + "pm.sendRequest(testApiAddParty, function (err, response) {\r", + " console.log('testApiAddParty: ', JSON.stringify(response.json()))\r", + "});" + ] + } + } + } + ] + } + ] +} \ No newline at end of file diff --git a/collections/hub/provisioning_thirdparty/hub.json b/collections/hub/provisioning_thirdparty/hub.json new file mode 100644 index 00000000..0608f7fb --- /dev/null +++ b/collections/hub/provisioning_thirdparty/hub.json @@ -0,0 +1,581 @@ +{ + "name": "Hub-account-provisioning", + "test_cases": [ + { + "id": 1, + "name": "Hub Account", + "meta": { + "info": "Hub Account" + }, + "requests": [ + { + "id": 1, + "meta": { + "info": "Add Hub Account-HUB_MULTILATERAL_SETTLEMENT" + }, + "description": "Add Hub Account-HUB_MULTILATERAL_SETTLEMENT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/Hub/accounts", + "method": "post", + "params": { + "name": "Hub" + }, + "body": { + "type": "HUB_MULTILATERAL_SETTLEMENT", + "currency": "{$inputs.currency}" + }, + "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": 2, + "meta": { + "info": "Add Hub Account-HUB_RECONCILIATION" + }, + "description": "Add Hub Account-HUB_RECONCILIATION", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/accounts", + "path": "/participants/Hub/accounts", + "method": "post", + "params": { + "name": "Hub" + }, + "body": { + "type": "HUB_RECONCILIATION", + "currency": "{$inputs.currency}" + }, + "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": 3, + "meta": { + "info": "Hub Set Email-SETTLEMENT_TRANSFER_POSITION_CHANGE_EMAIL" + }, + "description": "Hub Set Email-SETTLEMENT_TRANSFER_POSITION_CHANGE_EMAIL", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/Hub/endpoints", + "method": "post", + "params": { + "name": "Hub" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "hub_operator" + }, + "body": { + "type": "SETTLEMENT_TRANSFER_POSITION_CHANGE_EMAIL", + "value": "{$inputs.hubEmail}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 4, + "meta": { + "info": "Hub Set Email-NET_DEBIT_CAP_ADJUSTMENT_EMAIL" + }, + "description": "Hub Set Email-NET_DEBIT_CAP_ADJUSTMENT_EMAIL", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/Hub/endpoints", + "method": "post", + "params": { + "name": "Hub" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "hub_operator" + }, + "body": { + "type": "NET_DEBIT_CAP_ADJUSTMENT_EMAIL", + "value": "{$inputs.hubEmail}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 5, + "meta": { + "info": "Hub Set Email-NET_DEBIT_CAP_THRESHOLD_BREACH_EMAIL" + }, + "description": "Hub Set Email-NET_DEBIT_CAP_THRESHOLD_BREACH_EMAIL", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/Hub/endpoints", + "method": "post", + "params": { + "name": "Hub" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "hub_operator" + }, + "body": { + "type": "NET_DEBIT_CAP_THRESHOLD_BREACH_EMAIL", + "value": "{$inputs.hubEmail}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 6, + "meta": { + "info": "Add Hub Account-HUB_MULTILATERAL_SETTLEMENT Second Currency" + }, + "description": "Add Hub Account-HUB_MULTILATERAL_SETTLEMENT Second Currency", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "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, + "meta": { + "info": "Add Hub Account-HUB_RECONCILIATION Second Currency" + }, + "description": "Add Hub Account-HUB_RECONCILIATION Second Currency", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "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)", + "}" + ] + } + ] + } + } + ] + }, + { + "id": 2, + "type": "Settlement Models", + "requests": [ + { + "id": 2, + "meta": { + "info": "Create settlement model DEFERRED NET USD" + }, + "description": "Create settlement model DEFERRED NET USD", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/settlementModels", + "path": "/settlementModels", + "method": "post", + "body": { + "name": "DEFERREDNET{$inputs.currency}", + "settlementGranularity": "NET", + "settlementInterchange": "MULTILATERAL", + "settlementDelay": "DEFERRED", + "requireLiquidityCheck": true, + "ledgerAccountType": "POSITION", + "autoPositionReset": true, + "currency": "{$inputs.currency}", + "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)", + "}" + ] + } + ] + } + }, + { + "id": 3, + "meta": { + "info": "Create settlement model DEFAULT DEFERRED NET" + }, + "description": "Create settlement model DEFAULT DEFERRED NET", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "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" + }, + { + "id": 3, + "type": "Oracle Onboarding", + "requests": [ + { + "id": 1, + "meta": { + "info": "Register MSISDN Oracle" + }, + "description": "Register MSISDN Oracle", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "als_admin" + }, + "operationPath": "/oracles", + "path": "/oracles", + "method": "post", + "body": { + "oracleIdType": "MSISDN", + "endpoint": { + "value": "{$inputs.HOST_SIMULATOR}/oracle", + "endpointType": "URL" + }, + "currency": "{$inputs.currency}", + "isDefault": true + }, + "headers": { + "Content-Type": "application/vnd.interoperability.participants+json;version=1.0", + "Accept": "application/vnd.interoperability.participants+json;version=1", + "Date": "{$function.generic.curDate}" + }, + "url": "{$inputs.HOST_ACCOUNT_LOOKUP_ADMIN}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "status to be 201 or errorCode 2001 already exists", + "exec": [ + "if (response.body.errorInformation) {", + " expect(response.body.errorInformation.errorCode).to.equal(\"2001\")", + "} else {", + " expect(response.status).to.equal(201)", + "}" + ] + } + ] + } + }, + { + "id": 2, + "meta": { + "info": "Register BUSINESS Oracle" + }, + "description": "Register BUSINESS Oracle", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "als_admin" + }, + "operationPath": "/oracles", + "path": "/oracles", + "method": "post", + "body": { + "oracleIdType": "BUSINESS", + "endpoint": { + "value": "{$inputs.HOST_SIMULATOR}/oracle", + "endpointType": "URL" + }, + "currency": "{$inputs.currency}", + "isDefault": true + }, + "headers": { + "Content-Type": "application/vnd.interoperability.participants+json;version=1.0", + "Accept": "application/vnd.interoperability.participants+json;version=1", + "Date": "{$function.generic.curDate}" + }, + "url": "{$inputs.HOST_ACCOUNT_LOOKUP_ADMIN}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "status to be 201 or errorCode 2001 already exists", + "exec": [ + "if (response.body.errorInformation) {", + " expect(response.body.errorInformation.errorCode).to.equal(\"2001\")", + "} else {", + " expect(response.status).to.equal(201)", + "}" + ] + } + ] + } + }, + { + "id": 3, + "meta": { + "info": "Register ALIAS Oracle" + }, + "description": "Register ALIAS Oracle", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "als_admin" + }, + "operationPath": "/oracles", + "path": "/oracles", + "method": "post", + "body": { + "oracleIdType": "ALIAS", + "endpoint": { + "value": "{$inputs.HOST_SIMULATOR}/oracle", + "endpointType": "URL" + }, + "currency": "{$inputs.currency}", + "isDefault": true + }, + "headers": { + "Content-Type": "application/vnd.interoperability.participants+json;version=1.0", + "Accept": "application/vnd.interoperability.participants+json;version=1", + "Date": "{$function.generic.curDate}" + }, + "url": "{$inputs.HOST_ACCOUNT_LOOKUP_ADMIN}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "status to be 201 or errorCode 2001 already exists", + "exec": [ + "if (response.body.errorInformation) {", + " expect(response.body.errorInformation.errorCode).to.equal(\"2001\")", + "} else {", + " expect(response.status).to.equal(201)", + "}" + ] + } + ] + } + }, + { + "id": 4, + "meta": { + "info": "Register CONSENT Oracle" + }, + "description": "Register CONSENT Oracle", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "als_admin" + }, + "operationPath": "/oracles", + "path": "/oracles", + "method": "post", + "body": { + "oracleIdType": "CONSENT", + "endpoint": { + "value": "{$inputs.HOST_ORACLE_CONSENT}", + "endpointType": "URL" + }, + "currency": "{$inputs.currency}", + "isDefault": true + }, + "headers": { + "Content-Type": "application/vnd.interoperability.participants+json;version=1.0", + "Accept": "application/vnd.interoperability.participants+json;version=1", + "Date": "{$function.generic.curDate}" + }, + "url": "{$inputs.HOST_ACCOUNT_LOOKUP_ADMIN}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "status to be 201 or errorCode 2001 already exists", + "exec": [ + "if (response.body.errorInformation) {", + " expect(response.body.errorInformation.errorCode).to.equal(\"2001\")", + "} else {", + " expect(response.status).to.equal(201)", + "}" + ] + } + ] + } + } + ], + "name": "Oracle Onboarding" + } + ] +} \ No newline at end of file diff --git a/collections/hub/provisioning_thirdparty/master.json b/collections/hub/provisioning_thirdparty/master.json new file mode 100644 index 00000000..54547053 --- /dev/null +++ b/collections/hub/provisioning_thirdparty/master.json @@ -0,0 +1,24 @@ +{ + "order": [ + { + "name": "hub.json", + "type": "file" + }, + { + "name": "dfspa.json", + "type": "file" + }, + { + "name": "dfspb.json", + "type": "file" + }, + { + "name": "pisp.json", + "type": "file" + }, + { + "name": "centralauth.json", + "type": "file" + } + ] +} \ No newline at end of file diff --git a/collections/hub/provisioning_thirdparty/pisp.json b/collections/hub/provisioning_thirdparty/pisp.json new file mode 100644 index 00000000..f74d60d7 --- /dev/null +++ b/collections/hub/provisioning_thirdparty/pisp.json @@ -0,0 +1,1089 @@ +{ + "name": "pisp-provisioning", + "test_cases": [ + { + "id": 1, + "name": "pisp account", + "meta": { + "info": "pisp account" + }, + "requests": [ + { + "id": 1, + "meta": { + "info": "Add pisp" + }, + "description": "Add pisp", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants", + "path": "/participants", + "method": "post", + "body": { + "name": "{$inputs.PISP_NAME}", + "currency": "{$inputs.currency}" + }, + "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": 6, + "meta": { + "info": "Add pisp with different currency for default settlement case" + }, + "description": "Add pisp with different currency for default settlement case", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants", + "path": "/participants", + "method": "post", + "body": { + "name": "{$inputs.PISP_NAME}", + "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": 2, + "name": "pisp callbacks", + "meta": { + "info": "pisp callbacks" + }, + "requests": [ + { + "id": 1, + "meta": { + "info": "Add pisp callback - TP_CB_URL_TRANSACTION_REQUEST_PATCH" + }, + "description": "Add pisp callback - TP_CB_URL_TRANSACTION_REQUEST_PATCH", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PISP_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PISP_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "TP_CB_URL_TRANSACTION_REQUEST_PATCH", + "value": "{$inputs.PISP_CB_THIRDPARTY}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 2, + "meta": { + "info": "Add pisp callback - TP_CB_URL_TRANSACTION_REQUEST_POST" + }, + "description": "Add pisp callback - TP_CB_URL_TRANSACTION_REQUEST_POST", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PISP_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PISP_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "TP_CB_URL_TRANSACTION_REQUEST_POST", + "value": "{$inputs.PISP_CB_THIRDPARTY}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 3, + "meta": { + "info": "Add pisp callback - TP_CB_URL_TRANSACTION_REQUEST_AUTH_POST" + }, + "description": "Add pisp callback - TP_CB_URL_TRANSACTION_REQUEST_AUTH_POST", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PISP_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PISP_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "TP_CB_URL_TRANSACTION_REQUEST_AUTH_POST", + "value": "{$inputs.PISP_CB_THIRDPARTY}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 4, + "meta": { + "info": "Add pisp callback - FSPIOP_CALLBACK_URL_AUTHORIZATIONS" + }, + "description": "Add pisp callback - FSPIOP_CALLBACK_URL_AUTHORIZATIONS", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PISP_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PISP_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_AUTHORIZATIONS", + "value": "{$inputs.PISP_CB_THIRDPARTY}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 5, + "meta": { + "info": "Add pisp callback - TP_CB_URL_ACCOUNTS_PUT" + }, + "description": "Add pisp callback - TP_CB_URL_ACCOUNTS_PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PISP_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PISP_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "TP_CB_URL_ACCOUNTS_PUT", + "value": "{$inputs.PISP_CB_THIRDPARTY}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 6, + "meta": { + "info": "Add pisp callback - TP_CB_URL_ACCOUNTS_PUT_ERROR" + }, + "description": "Add pisp callback - TP_CB_URL_ACCOUNTS_PUT_ERROR", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PISP_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PISP_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "TP_CB_URL_ACCOUNTS_PUT_ERROR", + "value": "{$inputs.PISP_CB_THIRDPARTY}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 7, + "meta": { + "info": "Add pisp callback - TP_CB_URL_CONSENT_REQUEST_PUT" + }, + "description": "Add pisp callback - TP_CB_URL_CONSENT_REQUEST_PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PISP_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PISP_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "TP_CB_URL_CONSENT_REQUEST_PUT", + "value": "{$inputs.PISP_CB_THIRDPARTY}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 8, + "meta": { + "info": "Add pisp callback - TP_CB_URL_CONSENT_REQUEST_PUT_ERROR" + }, + "description": "Add pisp callback - TP_CB_URL_CONSENT_REQUEST_PUT_ERROR", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PISP_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PISP_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "TP_CB_URL_CONSENT_REQUEST_PUT_ERROR", + "value": "{$inputs.PISP_CB_THIRDPARTY}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 9, + "meta": { + "info": "Add pisp callback - TP_CB_URL_CREATE_CREDENTIAL_POST" + }, + "description": "Add pisp callback - TP_CB_URL_CREATE_CREDENTIAL_POST", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PISP_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PISP_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "TP_CB_URL_CREATE_CREDENTIAL_POST", + "value": "{$inputs.PISP_CB_THIRDPARTY}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 10, + "meta": { + "info": "Add pisp callback - TP_CB_URL_CONSENT_POST" + }, + "description": "Add pisp callback - TP_CB_URL_CONSENT_POST", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PISP_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PISP_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "TP_CB_URL_CONSENT_POST", + "value": "{$inputs.PISP_CB_THIRDPARTY}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 11, + "meta": { + "info": "Add pisp callback - TP_CB_URL_CONSENT_GET" + }, + "description": "Add pisp callback - TP_CB_URL_CONSENT_GET", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PISP_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PISP_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "TP_CB_URL_CONSENT_GET", + "value": "{$inputs.PISP_CB_THIRDPARTY}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 12, + "meta": { + "info": "Add pisp callback - TP_CB_URL_CONSENT_PUT" + }, + "description": "Add pisp callback - TP_CB_URL_CONSENT_PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PISP_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PISP_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "TP_CB_URL_CONSENT_PUT", + "value": "{$inputs.PISP_CB_THIRDPARTY}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 13, + "meta": { + "info": "Add pisp callback - TP_CB_URL_CONSENT_PUT_ERROR" + }, + "description": "Add pisp callback - TP_CB_URL_CONSENT_PUT_ERROR", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PISP_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PISP_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "TP_CB_URL_CONSENT_PUT_ERROR", + "value": "{$inputs.PISP_CB_THIRDPARTY}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 14, + "meta": { + "info": "Add pisp callback - TP_CB_URL_SERVICES_PUT" + }, + "description": "Add pisp callback - TP_CB_URL_SERVICES_PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PISP_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PISP_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "TP_CB_URL_SERVICES_PUT", + "value": "{$inputs.PISP_CB_THIRDPARTY}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 15, + "meta": { + "info": "Add pisp callback - TP_CB_URL_SERVICES_PUT_ERROR" + }, + "description": "Add pisp callback - TP_CB_URL_SERVICES_PUT_ERROR", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PISP_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PISP_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "TP_CB_URL_SERVICES_PUT_ERROR", + "value": "{$inputs.PISP_CB_THIRDPARTY}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 16, + "meta": { + "info": "Add pisp callback - TP_CB_URL_CONSENT_PUT" + }, + "description": "Add pisp callback - TP_CB_URL_CONSENT_PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PISP_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PISP_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "TP_CB_URL_CONSENT_PUT", + "value": "{$inputs.PISP_CB_THIRDPARTY}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 17, + "meta": { + "info": "Add pisp callback - TP_CB_URL_CONSENT_PATCH" + }, + "description": "Add pisp callback - TP_CB_URL_CONSENT_PATCH", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PISP_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PISP_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "TP_CB_URL_CONSENT_PATCH", + "value": "{$inputs.PISP_CB_THIRDPARTY}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 18, + "meta": { + "info": "Add pisp callback - TP_CB_URL_ACCOUNTS_PUT_ERROR" + }, + "description": "Add pisp callback - TP_CB_URL_ACCOUNTS_PUT_ERROR", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PISP_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PISP_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "TP_CB_URL_ACCOUNTS_PUT_ERROR", + "value": "{$inputs.PISP_CB_THIRDPARTY}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 19, + "meta": { + "info": "Add pisp callback - TP_CB_URL_TRANSACTION_REQUEST_POST" + }, + "description": "Add pisp callback - TP_CB_URL_TRANSACTION_REQUEST_POST", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PISP_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PISP_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "TP_CB_URL_TRANSACTION_REQUEST_POST", + "value": "{$inputs.PISP_CB_THIRDPARTY}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 20, + "meta": { + "info": "Add pisp callback - TP_CB_URL_TRANSACTION_REQUEST_PUT" + }, + "description": "Add pisp callback - TP_CB_URL_TRANSACTION_REQUEST_PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PISP_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PISP_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "TP_CB_URL_TRANSACTION_REQUEST_PUT", + "value": "{$inputs.PISP_CB_THIRDPARTY}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 21, + "meta": { + "info": "Add pisp callback - TP_CB_URL_TRANSACTION_REQUEST_PUT_ERROR" + }, + "description": "Add pisp callback - TP_CB_URL_TRANSACTION_REQUEST_PUT_ERROR", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PISP_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PISP_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "TP_CB_URL_TRANSACTION_REQUEST_PUT_ERROR", + "value": "{$inputs.PISP_CB_THIRDPARTY}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 22, + "meta": { + "info": "Add pisp callback - TP_CB_URL_TRANSACTION_REQUEST_AUTH_PUT" + }, + "description": "Add pisp callback - TP_CB_URL_TRANSACTION_REQUEST_AUTH_PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PISP_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PISP_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "TP_CB_URL_TRANSACTION_REQUEST_AUTH_PUT", + "value": "{$inputs.PISP_CB_THIRDPARTY}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 23, + "meta": { + "info": "Add pisp callback - TP_CB_URL_TRANSACTION_REQUEST_AUTH_PUT_ERROR" + }, + "description": "Add pisp callback - TP_CB_URL_TRANSACTION_REQUEST_AUTH_PUT_ERROR", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PISP_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PISP_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "TP_CB_URL_TRANSACTION_REQUEST_AUTH_PUT_ERROR", + "value": "{$inputs.PISP_CB_THIRDPARTY}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 24, + "meta": { + "info": "Add pisp callback - FSPIOP_CALLBACK_URL_PARTIES_GET" + }, + "description": "Add pisp callback - FSPIOP_CALLBACK_URL_PARTIES_GET", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PISP_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PISP_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTIES_GET", + "value": "{$inputs.PISP_CB_FSPIOP}/parties/{{partyIdType}}/{{partyIdentifier}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 25, + "meta": { + "info": "Add pisp callback - FSPIOP_CALLBACK_URL_PARTIES_PUT" + }, + "description": "Add pisp callback - FSPIOP_CALLBACK_URL_PARTIES_PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PISP_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PISP_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTIES_PUT", + "value": "{$inputs.PISP_CB_FSPIOP}/parties/{{partyIdType}}/{{partyIdentifier}}" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + }, + { + "id": 26, + "meta": { + "info": "Add pisp callback - FSPIOP_CALLBACK_URL_PARTIES_PUT" + }, + "description": "Add pisp callback - FSPIOP_CALLBACK_URL_PARTIES_PUT", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "central_admin" + }, + "operationPath": "/participants/{name}/endpoints", + "path": "/participants/{$inputs.PISP_NAME}/endpoints", + "method": "post", + "params": { + "name": "{$inputs.PISP_NAME}" + }, + "url": "{$inputs.HOST_CENTRAL_LEDGER}", + "headers": { + "Content-Type": "application/json", + "FSPIOP-Source": "{$inputs.hub_operator}" + }, + "body": { + "type": "FSPIOP_CALLBACK_URL_PARTIES_PUT_ERROR", + "value": "{$inputs.PISP_CB_FSPIOP}/parties/{{partyIdType}}/{{partyIdentifier}}/error" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "Status code is 201", + "exec": [ + "expect(response.status).to.equal(201)" + ] + } + ] + } + } + ] + } + ] +} \ No newline at end of file diff --git a/collections/hub/thirdparty/collection.json b/collections/hub/thirdparty/collection.json new file mode 100644 index 00000000..9fb0582d --- /dev/null +++ b/collections/hub/thirdparty/collection.json @@ -0,0 +1,1105 @@ +{ + "name": "multi", + "test_cases": [ + { + "id": 1, + "name": "Account Linking: Prelinking", + "requests": [ + { + "id": 1, + "description": "GET /linking/providers", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 0, + "type": "thirdparty_sdk_outbound" + }, + "operationPath": "/linking/providers", + "path": "/linking/providers", + "method": "get", + "tests": { + "assertions": [ + { + "id": 1, + "description": "response state", + "exec": [ + "const expected = {", + " currentState: 'providersLookupSuccess',", + " providers: ['dfspa', 'dfspb']", + " }", + "expect(response.body).to.deep.equal(expected)" + ] + } + ] + }, + "url": "{$inputs.PISP_THIRDPARTY_SDK_OUTBOUND_URL}" + } + ] + }, + { + "id": 2, + "name": "Account Linking: Discovery", + "requests": [ + { + "id": 1, + "description": "GET /linking/accounts/{fspId}/{userId}", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 0, + "type": "thirdparty_sdk_outbound" + }, + "operationPath": "/linking/accounts/{fspId}/{userId}", + "path": "/linking/accounts/dfspa/username1234", + "method": "get", + "params": { + "fspId": "dfspa", + "userId": "username1234" + }, + "url": "{$inputs.PISP_THIRDPARTY_SDK_OUTBOUND_URL}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "expected response", + "exec": [ + "const expected = {", + " accounts: [", + " {", + " accountNickname: 'dfspa.user.nickname1',", + " id: 'dfspa.username.1234',", + " currency: 'ZAR'", + " },", + " {", + " accountNickname: 'dfspa.user.nickname2',", + " id: 'dfspa.username.5678',", + " currency: 'USD'", + " }", + "],", + " currentState: 'COMPLETED'", + "}", + "", + "expect(response.body).to.deep.equal(expected)" + ] + } + ] + } + } + ] + }, + { + "id": 3, + "name": "Account Linking - Happy Path WEB", + "requests": [ + { + "id": 1, + "description": "POST /linking/request-consent", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 0, + "type": "thirdparty_sdk_outbound" + }, + "operationPath": "/linking/request-consent", + "path": "/linking/request-consent", + "method": "post", + "body": { + "toParticipantId": "dfspa", + "userId": "dfspa.username", + "consentRequestId": "b51ec534-ee48-4575-b6a9-ead2955b8069", + "authChannels": [ + "WEB", + "OTP" + ], + "accounts": [ + { + "accountNickname": "SpeXXXXXXXXnt", + "id": "dfspa.username.5678", + "currency": "USD" + } + ], + "actions": [ + "accounts.transfer" + ], + "callbackUri": "pisp-app://callback.com" + }, + "url": "{$inputs.PISP_THIRDPARTY_SDK_OUTBOUND_URL}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "response", + "exec": [ + "const expected = {", + " channelResponse: {", + " scopes: [", + " {", + " accountId: 'dfspa.username.5678',", + " actions: [", + " 'accounts.transfer'", + " ]", + " }", + " ],", + " callbackUri: 'pisp-app://callback.com',", + " authChannels: ['WEB'],", + " consentRequestId: 'b51ec534-ee48-4575-b6a9-ead2955b8069',", + " authUri: 'http://localhost:6060/admin/dfsp/authorize?consentRequestId=b51ec534-ee48-4575-b6a9-ead2955b8069&callbackUri=http://localhost:42181/flutter-web-auth.html'", + " },", + " currentState: 'WebAuthenticationChannelResponseRecieved'", + "}", + "", + "expect(response.body).to.deep.equal(expected)" + ] + } + ] + } + }, + { + "id": 2, + "description": "PATCH /linking/request-consent/{ID}/authenticate", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 0, + "type": "thirdparty_sdk_outbound" + }, + "operationPath": "/linking/request-consent/{ID}/authenticate", + "path": "/linking/request-consent/b51ec534-ee48-4575-b6a9-ead2955b8069/authenticate", + "method": "patch", + "params": { + "ID": "b51ec534-ee48-4575-b6a9-ead2955b8069" + }, + "body": { + "authToken": "123456" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "response", + "exec": [ + "const expectedScopes = [{", + " accountId: 'dfspa.username.5678',", + " actions: [ 'accounts.transfer' ]", + "}]", + "", + "", + "expect(response.body.consent.consentId).to.be.a('string')", + "expect(response.body.consent.consentRequestId).to.equal('b51ec534-ee48-4575-b6a9-ead2955b8069')", + "expect(response.body.consent.scopes).to.deep.equal(expectedScopes)", + "expect(response.body.currentState).to.equal('consentReceivedAwaitingCredential')" + ] + } + ] + }, + "url": "{$inputs.PISP_THIRDPARTY_SDK_OUTBOUND_URL}" + }, + { + "id": 3, + "description": "POST //linking/request-consent/{ID}/pass-credential", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 0, + "type": "thirdparty_sdk_outbound" + }, + "operationPath": "/linking/request-consent/{ID}/pass-credential", + "path": "/linking/request-consent/b51ec534-ee48-4575-b6a9-ead2955b8069/pass-credential", + "method": "post", + "params": { + "ID": "b51ec534-ee48-4575-b6a9-ead2955b8069" + }, + "url": "{$inputs.PISP_THIRDPARTY_SDK_OUTBOUND_URL}", + "body": { + "credential": { + "payload": { + "id": "HskU2gw4np09IUtYNHnxMM696jJHqvccUdBmd0xP6XEWwH0xLei1PUzDJCM19SZ3A2Ex0fNLw0nc2hrIlFnAtw", + "rawId": "HskU2gw4np09IUtYNHnxMM696jJHqvccUdBmd0xP6XEWwH0xLei1PUzDJCM19SZ3A2Ex0fNLw0nc2hrIlFnAtw==", + "response": { + "clientDataJSON": "eyJ0eXBlIjoid2ViYXV0aG4uY3JlYXRlIiwiY2hhbGxlbmdlIjoiWXpSaFpHRmlZak16WlRrek1EWmlNRE00TURnNE1UTXlZV1ptWTJSbE5UVTJZelV3WkRneVpqWXdNMlkwTnpjeE1XRTVOVEV3WW1ZelltVmxaalprTmciLCJvcmlnaW4iOiJodHRwOi8vbG9jYWxob3N0OjQyMTgxIiwiY3Jvc3NPcmlnaW4iOmZhbHNlfQ==", + "attestationObject": "o2NmbXRmcGFja2VkZ2F0dFN0bXSjY2FsZyZjc2lnWEcwRQIhAN2JDPPTse/45EHSqSpEJiiok5sns+HqdJch3+gsL09VAiAh7W7ZhQC8gMIkgwcA+S4rQkaHoHnP9AkkohaKCuuA62N4NWOBWQLBMIICvTCCAaWgAwIBAgIECwXNUzANBgkqhkiG9w0BAQsFADAuMSwwKgYDVQQDEyNZdWJpY28gVTJGIFJvb3QgQ0EgU2VyaWFsIDQ1NzIwMDYzMTAgFw0xNDA4MDEwMDAwMDBaGA8yMDUwMDkwNDAwMDAwMFowbjELMAkGA1UEBhMCU0UxEjAQBgNVBAoMCVl1YmljbyBBQjEiMCAGA1UECwwZQXV0aGVudGljYXRvciBBdHRlc3RhdGlvbjEnMCUGA1UEAwweWXViaWNvIFUyRiBFRSBTZXJpYWwgMTg0OTI5NjE5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEIRpvsbWJJcsKwRhffCrjqLSIEBR5sR7/9VXgfZdRvSsXaiUt7lns44WZIFuz6ii/j9f8fadcBUJyrkhY5ZH8WqNsMGowIgYJKwYBBAGCxAoCBBUxLjMuNi4xLjQuMS40MTQ4Mi4xLjEwEwYLKwYBBAGC5RwCAQEEBAMCBDAwIQYLKwYBBAGC5RwBAQQEEgQQFJogIY72QTOWuIH41bfx9TAMBgNVHRMBAf8EAjAAMA0GCSqGSIb3DQEBCwUAA4IBAQA+/qPfPSrgclePfgTQ3VpLaNsBr+hjLhi04LhzQxiRGWwYS+vB1TOiPXeLsQQIwbmqQU51doVbCTaXGLNIr1zvbLAwhnLWH7i9m4ahCqaCzowtTvCQ7VBUGP5T1M4eYnoo83IDCVjQj/pZG8QYgOGOigztGoWAf5CWcUF6C0UyFbONwUcqJEl2QLToa/7E8VRjm4W46IAUljYkODVZASv8h3wLROx9p5TSBlSymtwdulxQe/DKbfNSvM3edA0up+EIJKLOOU+QTR2ZQV46fEW1/ih6m8vcaY6L3NW0eYpc7TXeijUJAgoUtya/vzmnRAecuY9bncoJt8PrvL2ir2kDaGF1dGhEYXRhWMRJlg3liA6MaHQ0Fw9kdmBbj+SuuaKGMseZXPO6gx2XY0EAAAAEFJogIY72QTOWuIH41bfx9QBAHskU2gw4np09IUtYNHnxMM696jJHqvccUdBmd0xP6XEWwH0xLei1PUzDJCM19SZ3A2Ex0fNLw0nc2hrIlFnAt6UBAgMmIAEhWCBYz+SV6fSy7ZjFzdj+SWxaMbfaw4ZT+wYgClN3v93kVSJYIGSzY41DNLrh1jXp4J53qCnq4+b9HYXud/0UEsZquDeV" + }, + "type": "public-key" + } + } + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "response", + "exec": [ + "const expected = {", + " credential: {", + " status: 'VERIFIED'", + " },", + " currentState: 'accountsLinked'", + "}", + "", + "expect(response.body).to.deep.equal(expected)" + ] + } + ] + } + } + ] + }, + { + "id": 4, + "name": "Account Linking - Happy Path OTP", + "requests": [ + { + "id": 1, + "description": "POST /linking/request-consent", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 0, + "type": "thirdparty_sdk_outbound" + }, + "operationPath": "/linking/request-consent", + "path": "/linking/request-consent", + "method": "post", + "body": { + "toParticipantId": "dfspa", + "userId": "dfspa.username", + "consentRequestId": "c51ec534-ee48-4575-b6a9-ead2955b8069", + "authChannels": [ + "WEB", + "OTP" + ], + "accounts": [ + { + "accountNickname": "SpeXXXXXXXXnt", + "id": "dfspa.username.5678", + "currency": "USD" + } + ], + "actions": [ + "accounts.transfer" + ], + "callbackUri": "pisp-app://callback.com" + }, + "url": "{$inputs.PISP_THIRDPARTY_SDK_OUTBOUND_URL}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "response", + "exec": [ + "const expected = {", + "channelResponse: {", + "scopes: [", + "{", + " accountId: 'dfspa.username.5678',", + " actions: [", + " 'accounts.transfer'", + " ]", + "}", + "],", + "callbackUri: 'pisp-app://callback.com',", + "authChannels: ['OTP'],", + "consentRequestId: 'c51ec534-ee48-4575-b6a9-ead2955b8069',", + "},", + "currentState: 'OTPAuthenticationChannelResponseRecieved'", + "}", + "", + "expect(response.body).to.deep.equal(expected)" + ] + } + ] + } + }, + { + "id": 2, + "description": "PATCH /linking/request-consent/{ID}/authenticate", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 0, + "type": "thirdparty_sdk_outbound" + }, + "operationPath": "/linking/request-consent/{ID}/authenticate", + "path": "/linking/request-consent/c51ec534-ee48-4575-b6a9-ead2955b8069/authenticate", + "method": "patch", + "params": { + "ID": "c51ec534-ee48-4575-b6a9-ead2955b8069" + }, + "body": { + "authToken": "123456" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "response", + "exec": [ + "const expectedScopes = [{", + " accountId: 'dfspa.username.5678',", + " actions: [ 'accounts.transfer' ]", + "}]", + "", + "", + "expect(response.body.consent.consentId).to.be.a('string')", + "expect(response.body.consent.consentRequestId).to.equal('c51ec534-ee48-4575-b6a9-ead2955b8069')", + "expect(response.body.consent.scopes).to.deep.equal(expectedScopes)", + "expect(response.body.currentState).to.equal('consentReceivedAwaitingCredential')" + ] + } + ] + }, + "url": "{$inputs.PISP_THIRDPARTY_SDK_OUTBOUND_URL}" + }, + { + "id": 3, + "description": "POST //linking/request-consent/{ID}/pass-credential", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 0, + "type": "thirdparty_sdk_outbound" + }, + "operationPath": "/linking/request-consent/{ID}/pass-credential", + "path": "/linking/request-consent/c51ec534-ee48-4575-b6a9-ead2955b8069/pass-credential", + "method": "post", + "params": { + "ID": "c51ec534-ee48-4575-b6a9-ead2955b8069" + }, + "url": "{$inputs.PISP_THIRDPARTY_SDK_OUTBOUND_URL}", + "body": { + "credential": { + "payload": { + "id": "UMyM71BqZ5G-NWnD1k3RtR6Ry_zQPLEh_ntU3zOO_3dur80eHxDOqJSvc83FnDczRTdv6hVCZ86Kuynrz5OKrw", + "rawId": "UMyM71BqZ5G+NWnD1k3RtR6Ry/zQPLEh/ntU3zOO/3dur80eHxDOqJSvc83FnDczRTdv6hVCZ86Kuynrz5OKrw==", + "response": { + "attestationObject": "o2NmbXRoZmlkby11MmZnYXR0U3RtdKJjc2lnWEgwRgIhALlL18WMrdV+eVDKRoNgb3iTDNxANrbC93w/sG6BDcWEAiEA1WGNy/sZPJcboqHD8YgqXjxZni9ZT4M1EL+O+gRFWSxjeDVjgVkCwTCCAr0wggGloAMCAQICBAsFzVMwDQYJKoZIhvcNAQELBQAwLjEsMCoGA1UEAxMjWXViaWNvIFUyRiBSb290IENBIFNlcmlhbCA0NTcyMDA2MzEwIBcNMTQwODAxMDAwMDAwWhgPMjA1MDA5MDQwMDAwMDBaMG4xCzAJBgNVBAYTAlNFMRIwEAYDVQQKDAlZdWJpY28gQUIxIjAgBgNVBAsMGUF1dGhlbnRpY2F0b3IgQXR0ZXN0YXRpb24xJzAlBgNVBAMMHll1YmljbyBVMkYgRUUgU2VyaWFsIDE4NDkyOTYxOTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABCEab7G1iSXLCsEYX3wq46i0iBAUebEe//VV4H2XUb0rF2olLe5Z7OOFmSBbs+oov4/X/H2nXAVCcq5IWOWR/FqjbDBqMCIGCSsGAQQBgsQKAgQVMS4zLjYuMS40LjEuNDE0ODIuMS4xMBMGCysGAQQBguUcAgEBBAQDAgQwMCEGCysGAQQBguUcAQEEBBIEEBSaICGO9kEzlriB+NW38fUwDAYDVR0TAQH/BAIwADANBgkqhkiG9w0BAQsFAAOCAQEAPv6j3z0q4HJXj34E0N1aS2jbAa/oYy4YtOC4c0MYkRlsGEvrwdUzoj13i7EECMG5qkFOdXaFWwk2lxizSK9c72ywMIZy1h+4vZuGoQqmgs6MLU7wkO1QVBj+U9TOHmJ6KPNyAwlY0I/6WRvEGIDhjooM7RqFgH+QlnFBegtFMhWzjcFHKiRJdkC06Gv+xPFUY5uFuOiAFJY2JDg1WQEr/Id8C0TsfaeU0gZUsprcHbpcUHvwym3zUrzN3nQNLqfhCCSizjlPkE0dmUFeOnxFtf4oepvL3GmOi9zVtHmKXO013oo1CQIKFLcmv785p0QHnLmPW53KCbfD67y9oq9pA2hhdXRoRGF0YVjESZYN5YgOjGh0NBcPZHZgW4/krrmihjLHmVzzuoMdl2NBAAAAAAAAAAAAAAAAAAAAAAAAAAAAQFDMjO9QameRvjVpw9ZN0bUekcv80DyxIf57VN8zjv93bq/NHh8QzqiUr3PNxZw3M0U3b+oVQmfOirsp68+Tiq+lAQIDJiABIVggy/NJCW5QMqfxRdvjCT6PeJMC/enM2b/83KeuHJAwENAiWCCLLEUZifuehFbVabqd/Cni7GvAEZikU3J6Q0+b+CXnqg==", + "clientDataJSON": "eyJjaGFsbGVuZ2UiOiJORGxqT1RjeFltWXdZVFExWm1Ka1pUa3pOek13Tm1SalpUazNZVFl6TURjM01HSmtZamMzWW1FellqWm1OemcwWkRJMU5HWTJPR0UwTm1Sa05EQmhNZyIsImNsaWVudEV4dGVuc2lvbnMiOnt9LCJoYXNoQWxnb3JpdGhtIjoiU0hBLTI1NiIsIm9yaWdpbiI6Imh0dHA6Ly9sb2NhbGhvc3Q6ODA4MCIsInR5cGUiOiJ3ZWJhdXRobi5jcmVhdGUifQ==" + }, + "type": "public-key" + } + } + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "response", + "exec": [ + "const expected = {", + " credential: {", + " status: 'VERIFIED'", + " },", + " currentState: 'accountsLinked'", + "}", + "", + "expect(response.body).to.deep.equal(expected)" + ] + } + ] + } + } + ] + }, + { + "id": 5, + "name": "Account Linking - Error @ consent request stage", + "requests": [ + { + "id": 1, + "description": "validateRequest should return an error", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 0, + "type": "thirdparty_sdk_outbound" + }, + "operationPath": "/linking/request-consent", + "path": "/linking/request-consent", + "method": "post", + "body": { + "toParticipantId": "dfspa", + "userId": "dfspa.username", + "consentRequestId": "d51ec534-ee48-4575-b6a9-ead2955b8069", + "authChannels": [ + "WEB", + "OTP" + ], + "accounts": [ + { + "accountNickname": "SpeXXXXXXXXnt", + "id": "dfspa.username.5678", + "currency": "USD" + } + ], + "actions": [ + "accounts.transfer" + ], + "callbackUri": "pisp-app://callback.com" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "response body", + "exec": [ + "const expected = {", + " errorInformation: {", + " errorCode: '7203',", + " errorDescription: 'FSP does not support any requested authentication channels'", + " },", + " currentState: 'errored'", + "}", + "", + "expect(response.body).to.deep.equal(expected)" + ] + } + ] + }, + "url": "{$inputs.PISP_THIRDPARTY_SDK_OUTBOUND_URL}" + } + ] + }, + { + "id": 6, + "name": "Account Linking - Error @ consent request authenticate stage", + "requests": [ + { + "id": 1, + "description": "POST /linking/request-consent", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 0, + "type": "thirdparty_sdk_outbound" + }, + "operationPath": "/linking/request-consent", + "path": "/linking/request-consent", + "method": "post", + "body": { + "toParticipantId": "dfspa", + "userId": "dfspa.username", + "consentRequestId": "b51ec534-ee48-4575-b6a9-ead2955b8069", + "authChannels": [ + "WEB", + "OTP" + ], + "accounts": [ + { + "accountNickname": "SpeXXXXXXXXnt", + "id": "dfspa.username.5678", + "currency": "USD" + } + ], + "actions": [ + "accounts.transfer" + ], + "callbackUri": "pisp-app://callback.com" + }, + "url": "{$inputs.PISP_THIRDPARTY_SDK_OUTBOUND_URL}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "response", + "exec": [ + "const expected = {", + "channelResponse: {", + "scopes: [", + "{", + " accountId: 'dfspa.username.5678',", + " actions: [", + " 'accounts.transfer'", + " ]", + "}", + "],", + "callbackUri: 'pisp-app://callback.com',", + "authChannels: ['WEB'],", + "authUri: \"http://localhost:6060/admin/dfsp/authorize?consentRequestId=b51ec534-ee48-4575-b6a9-ead2955b8069&callbackUri=http://localhost:42181/flutter-web-auth.html\",", + "consentRequestId: 'b51ec534-ee48-4575-b6a9-ead2955b8069',", + "},", + "currentState: 'WebAuthenticationChannelResponseRecieved'", + "}", + "", + "expect(response.body).to.deep.equal(expected)" + ] + } + ] + } + }, + { + "id": 2, + "description": "PATCH /linking/request-consent/{ID}/authenticate", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 0, + "type": "thirdparty_sdk_outbound" + }, + "operationPath": "/linking/request-consent/{ID}/authenticate", + "path": "/linking/request-consent/b51ec534-ee48-4575-b6a9-ead2955b8069/authenticate", + "method": "patch", + "params": { + "ID": "b51ec534-ee48-4575-b6a9-ead2955b8069" + }, + "body": { + "authToken": "654321" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "response", + "exec": [ + "const expected = {", + " errorInformation: {", + " errorCode: '7205',", + " errorDescription: 'OTP failed validation'", + " },", + " currentState: 'errored'", + "}", + "", + "expect(response.body).to.deep.equal(expected)", + "" + ] + } + ] + }, + "url": "{$inputs.PISP_THIRDPARTY_SDK_OUTBOUND_URL}" + } + ] + }, + { + "id": 7, + "name": "Account Linking - Error @ consent request register credential stage", + "requests": [ + { + "id": 1, + "description": "POST /linking/request-consent", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 0, + "type": "thirdparty_sdk_outbound" + }, + "operationPath": "/linking/request-consent", + "path": "/linking/request-consent", + "method": "post", + "body": { + "toParticipantId": "dfspa", + "userId": "dfspa.username", + "consentRequestId": "b51ec534-ee48-4575-b6a9-ead2955b8069", + "authChannels": [ + "WEB", + "OTP" + ], + "accounts": [ + { + "accountNickname": "SpeXXXXXXXXnt", + "id": "dfspa.username.5678", + "currency": "USD" + } + ], + "actions": [ + "accounts.transfer" + ], + "callbackUri": "pisp-app://callback.com" + }, + "url": "{$inputs.PISP_THIRDPARTY_SDK_OUTBOUND_URL}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "response", + "exec": [ + "const expected = {", + " channelResponse: {", + " scopes: [", + " {", + " accountId: 'dfspa.username.5678',", + " actions: [", + " 'accounts.transfer'", + " ]", + " }", + " ],", + " callbackUri: 'pisp-app://callback.com',", + " authChannels: ['WEB'],", + " consentRequestId: 'b51ec534-ee48-4575-b6a9-ead2955b8069',", + " authUri: 'http://localhost:6060/admin/dfsp/authorize?consentRequestId=b51ec534-ee48-4575-b6a9-ead2955b8069&callbackUri=http://localhost:42181/flutter-web-auth.html'", + " },", + " currentState: 'WebAuthenticationChannelResponseRecieved'", + "}", + "", + "expect(response.body).to.deep.equal(expected)" + ] + } + ] + } + }, + { + "id": 2, + "description": "PATCH /linking/request-consent/{ID}/authenticate", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 0, + "type": "thirdparty_sdk_outbound" + }, + "operationPath": "/linking/request-consent/{ID}/authenticate", + "path": "/linking/request-consent/b51ec534-ee48-4575-b6a9-ead2955b8069/authenticate", + "method": "patch", + "params": { + "ID": "b51ec534-ee48-4575-b6a9-ead2955b8069" + }, + "body": { + "authToken": "123456" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "response", + "exec": [ + "const expectedScopes = [{", + " accountId: 'dfspa.username.5678',", + " actions: [ 'accounts.transfer' ]", + "}]", + "", + "", + "expect(response.body.consent.consentId).to.be.a('string')", + "expect(response.body.consent.consentRequestId).to.equal('b51ec534-ee48-4575-b6a9-ead2955b8069')", + "expect(response.body.consent.scopes).to.deep.equal(expectedScopes)", + "expect(response.body.currentState).to.equal('consentReceivedAwaitingCredential')" + ] + } + ] + }, + "url": "{$inputs.PISP_THIRDPARTY_SDK_OUTBOUND_URL}" + }, + { + "id": 3, + "description": "POST /linking/request-consent/{ID}/pass-credential", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 0, + "type": "thirdparty_sdk_outbound" + }, + "operationPath": "/linking/request-consent/{ID}/pass-credential", + "path": "/linking/request-consent/b51ec534-ee48-4575-b6a9-ead2955b8069/pass-credential", + "method": "post", + "params": { + "ID": "b51ec534-ee48-4575-b6a9-ead2955b8069" + }, + "url": "{$inputs.PISP_THIRDPARTY_SDK_OUTBOUND_URL}", + "body": { + "credential": { + "payload": { + "id": "DVFXZuLI5po4eDNPCH7Vtrjan5h+yGxeAUzS3QH3uMAP8O+7xg0AObz0mdTRy7veAflN201NlqoI+lByRug5ow==", + "rawId": "DVFXZuLI5po4eDNPCH7Vtrjan5h+yGxeAUzS3QH3uMAP8O+7xg0AObz0mdTRy7veAflN201NlqoI+lByRug5ow==", + "response": { + "clientDataJSON": "eyJjaGFsbGVuZ2UiOiJUMWRhYUZscVFYaGFWR04zV1dwVk5GbDZVbWhOZWxKdFQxZFJkMDU2UW0xYWFteHNXa1JHYVU1cVl6Sk9WMVpvVFhwQk1VNUhTVEZOVjFwcVdsUm9hbHBIUm1wT1JFVjVXa1JDYlU1dFRUSk5WMFpvVFZFIiwiY2xpZW50RXh0ZW5zaW9ucyI6e30sImhhc2hBbGdvcml0aG0iOiJTSEEtMjU2Iiwib3JpZ2luIjoiaHR0cHM6Ly9zYW5kYm94Lm1vamFsb29wLmlvIiwidHlwZSI6IndlYmF1dGhuLmdldCJ9", + "attestationObject": "o2NmbXRmcGFja2VkZ2F0dFN0bXSjY2FsZyZjc2lnWEcwRQIhAN2JDPPTse/45EHSqSpEJiiok5sns+HqdJch3+gsL09VAiAh7W7ZhQC8gMIkgwcA+S4rQkaHoHnP9AkkohaKCuuA62N4NWOBWQLBMIICvTCCAaWgAwIBAgIECwXNUzANBgkqhkiG9w0BAQsFADAuMSwwKgYDVQQDEyNZdWJpY28gVTJGIFJvb3QgQ0EgU2VyaWFsIDQ1NzIwMDYzMTAgFw0xNDA4MDEwMDAwMDBaGA8yMDUwMDkwNDAwMDAwMFowbjELMAkGA1UEBhMCU0UxEjAQBgNVBAoMCVl1YmljbyBBQjEiMCAGA1UECwwZQXV0aGVudGljYXRvciBBdHRlc3RhdGlvbjEnMCUGA1UEAwweWXViaWNvIFUyRiBFRSBTZXJpYWwgMTg0OTI5NjE5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEIRpvsbWJJcsKwRhffCrjqLSIEBR5sR7/9VXgfZdRvSsXaiUt7lns44WZIFuz6ii/j9f8fadcBUJyrkhY5ZH8WqNsMGowIgYJKwYBBAGCxAoCBBUxLjMuNi4xLjQuMS40MTQ4Mi4xLjEwEwYLKwYBBAGC5RwCAQEEBAMCBDAwIQYLKwYBBAGC5RwBAQQEEgQQFJogIY72QTOWuIH41bfx9TAMBgNVHRMBAf8EAjAAMA0GCSqGSIb3DQEBCwUAA4IBAQA+/qPfPSrgclePfgTQ3VpLaNsBr+hjLhi04LhzQxiRGWwYS+vB1TOiPXeLsQQIwbmqQU51doVbCTaXGLNIr1zvbLAwhnLWH7i9m4ahCqaCzowtTvCQ7VBUGP5T1M4eYnoo83IDCVjQj/pZG8QYgOGOigztGoWAf5CWcUF6C0UyFbONwUcqJEl2QLToa/7E8VRjm4W46IAUljYkODVZASv8h3wLROx9p5TSBlSymtwdulxQe/DKbfNSvM3edA0up+EIJKLOOU+QTR2ZQV46fEW1/ih6m8vcaY6L3NW0eYpc7TXeijUJAgoUtya/vzmnRAecuY9bncoJt8PrvL2ir2kDaGF1dGhEYXRhWMRJlg3liA6MaHQ0Fw9kdmBbj+SuuaKGMseZXPO6gx2XY0EAAAAEFJogIY72QTOWuIH41bfx9QBAHskU2gw4np09IUtYNHnxMM696jJHqvccUdBmd0xP6XEWwH0xLei1PUzDJCM19SZ3A2Ex0fNLw0nc2hrIlFnAt6UBAgMmIAEhWCBYz+SV6fSy7ZjFzdj+SWxaMbfaw4ZT+wYgClN3v93kVSJYIGSzY41DNLrh1jXp4J53qCnq4+b9HYXud/0UEsZquDeV" + }, + "type": "public-key" + } + } + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "response", + "exec": [ + "const expected = {", + " errorInformation: {", + " errorCode: '7213',", + " errorDescription: 'Consent is invalid'", + " },", + " currentState: 'errored'", + "}", + "", + "expect(response.body).to.deep.equal(expected)" + ] + } + ] + } + } + ] + }, + { + "id": 8, + "name": "Third Party Transaction Request - Happy Path", + "requests": [ + { + "id": 1, + "description": "POST /linking/request-consent", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 0, + "type": "thirdparty_sdk_outbound" + }, + "operationPath": "/linking/request-consent", + "path": "/linking/request-consent", + "method": "post", + "body": { + "toParticipantId": "dfspa", + "userId": "dfspa.username", + "consentRequestId": "b5d6206c-4f06-497d-af15-ed866ea6958f", + "authChannels": [ + "WEB", + "OTP" + ], + "accounts": [ + { + "accountNickname": "SpeXXXXXXXXnt", + "id": "244431e2-7a56-40c6-814c-932631760fa9", + "currency": "USD" + }, + { + "accountNickname": "SpeXXXXXXXXnt", + "id": "6b6e6d77-dbf4-423f-abd5-bc5854e4ab1c", + "currency": "USD" + } + ], + "actions": [ + "accounts.getBalance", + "accounts.transfer" + ], + "callbackUri": "pisp-app://callback.com" + }, + "url": "{$inputs.PISP_THIRDPARTY_SDK_OUTBOUND_URL}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "response", + "exec": [ + "const expected = {", + " channelResponse: {", + " consentRequestId: 'b5d6206c-4f06-497d-af15-ed866ea6958f',", + " scopes: [", + " {", + " accountId: '244431e2-7a56-40c6-814c-932631760fa9',", + " actions: ['accounts.getBalance', 'accounts.transfer'],", + " },", + " { ", + " accountId: '6b6e6d77-dbf4-423f-abd5-bc5854e4ab1c',", + " actions: ['accounts.getBalance', 'accounts.transfer']", + " }", + " ],", + " callbackUri: 'pisp-app://callback.com',", + " authChannels: ['OTP'],", + " },", + " currentState: 'OTPAuthenticationChannelResponseRecieved'", + "}", + "", + "expect(response.body).to.deep.equal(expected)" + ] + } + ] + } + }, + { + "id": 2, + "description": "PATCH /linking/request-consent/{ID}/authenticate", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 0, + "type": "thirdparty_sdk_outbound" + }, + "operationPath": "/linking/request-consent/{ID}/authenticate", + "path": "/linking/request-consent/b5d6206c-4f06-497d-af15-ed866ea6958f/authenticate", + "method": "patch", + "params": { + "ID": "b5d6206c-4f06-497d-af15-ed866ea6958f" + }, + "body": { + "authToken": "123456" + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "response", + "exec": [ + "const expected = {", + " consent: {", + " // this is configured in dfspa's thirdparty-sdk", + " consentId: \"2acf1dfa-ce45-486e-b19e-ae4ad9804a63\",", + " consentRequestId: 'b5d6206c-4f06-497d-af15-ed866ea6958f',", + " scopes: [", + " { actions: ['accounts.getBalance', 'accounts.transfer'], accountId: '244431e2-7a56-40c6-814c-932631760fa9' },", + " { actions: ['accounts.getBalance', 'accounts.transfer'], accountId: '6b6e6d77-dbf4-423f-abd5-bc5854e4ab1c' }", + " ]", + "", + " },", + " challenge: \"fc315dc625bb0bb00029e706de7f38eed98dc370cd386281de46a438b8080e57\",", + " currentState: 'consentReceivedAwaitingCredential'", + "}", + "", + "expect(response.body).to.deep.equal(expected)" + ] + } + ] + }, + "url": "{$inputs.PISP_THIRDPARTY_SDK_OUTBOUND_URL}" + }, + { + "id": 3, + "description": "POST /linking/request-consent/{ID}/pass-credential", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 0, + "type": "thirdparty_sdk_outbound" + }, + "operationPath": "/linking/request-consent/{ID}/pass-credential", + "path": "/linking/request-consent/b5d6206c-4f06-497d-af15-ed866ea6958f/pass-credential", + "method": "post", + "params": { + "ID": "b5d6206c-4f06-497d-af15-ed866ea6958f" + }, + "url": "{$inputs.PISP_THIRDPARTY_SDK_OUTBOUND_URL}", + "body": { + "credential": { + "payload": { + "id": "DVFXZuLI5po4eDNPCH7Vtrjan5h-yGxeAUzS3QH3uMAP8O-7xg0AObz0mdTRy7veAflN201NlqoI-lByRug5ow", + "rawId": "DVFXZuLI5po4eDNPCH7Vtrjan5h+yGxeAUzS3QH3uMAP8O+7xg0AObz0mdTRy7veAflN201NlqoI+lByRug5ow==", + "response": { + "attestationObject": "o2NmbXRoZmlkby11MmZnYXR0U3RtdKJjc2lnWEcwRQIhAJ/3xIiXAdSa6Dhl5Jx85u1sg7Sfy9Qz//PcuNKa80d2AiBPB+UCpuhM+Lt4AhvYyXpMKAcoyGSPIfUfCMqwkFj6wGN4NWOBWQLBMIICvTCCAaWgAwIBAgIECwXNUzANBgkqhkiG9w0BAQsFADAuMSwwKgYDVQQDEyNZdWJpY28gVTJGIFJvb3QgQ0EgU2VyaWFsIDQ1NzIwMDYzMTAgFw0xNDA4MDEwMDAwMDBaGA8yMDUwMDkwNDAwMDAwMFowbjELMAkGA1UEBhMCU0UxEjAQBgNVBAoMCVl1YmljbyBBQjEiMCAGA1UECwwZQXV0aGVudGljYXRvciBBdHRlc3RhdGlvbjEnMCUGA1UEAwweWXViaWNvIFUyRiBFRSBTZXJpYWwgMTg0OTI5NjE5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEIRpvsbWJJcsKwRhffCrjqLSIEBR5sR7/9VXgfZdRvSsXaiUt7lns44WZIFuz6ii/j9f8fadcBUJyrkhY5ZH8WqNsMGowIgYJKwYBBAGCxAoCBBUxLjMuNi4xLjQuMS40MTQ4Mi4xLjEwEwYLKwYBBAGC5RwCAQEEBAMCBDAwIQYLKwYBBAGC5RwBAQQEEgQQFJogIY72QTOWuIH41bfx9TAMBgNVHRMBAf8EAjAAMA0GCSqGSIb3DQEBCwUAA4IBAQA+/qPfPSrgclePfgTQ3VpLaNsBr+hjLhi04LhzQxiRGWwYS+vB1TOiPXeLsQQIwbmqQU51doVbCTaXGLNIr1zvbLAwhnLWH7i9m4ahCqaCzowtTvCQ7VBUGP5T1M4eYnoo83IDCVjQj/pZG8QYgOGOigztGoWAf5CWcUF6C0UyFbONwUcqJEl2QLToa/7E8VRjm4W46IAUljYkODVZASv8h3wLROx9p5TSBlSymtwdulxQe/DKbfNSvM3edA0up+EIJKLOOU+QTR2ZQV46fEW1/ih6m8vcaY6L3NW0eYpc7TXeijUJAgoUtya/vzmnRAecuY9bncoJt8PrvL2ir2kDaGF1dGhEYXRhWMTLX5kZhaUsGGUVJvPd6efRKHVvWMqnrf4u23AvlzDddEEAAAAAAAAAAAAAAAAAAAAAAAAAAABADVFXZuLI5po4eDNPCH7Vtrjan5h+yGxeAUzS3QH3uMAP8O+7xg0AObz0mdTRy7veAflN201NlqoI+lByRug5o6UBAgMmIAEhWCDD5L66Sy7QEkshHkp0OFDNNd7Yj3VcW9iULwYva/VlVCJYIFk/fr99IJ2zL1dYGgTvNpF/3daUxWYBMr556Dc7K4i1", + "clientDataJSON": "eyJjaGFsbGVuZ2UiOiJabU16TVRWa1l6WXlOV0ppTUdKaU1EQXdNamxsTnpBMlpHVTNaak00WldWa09UaGtZek0zTUdOa016ZzJNamd4WkdVME5tRTBNemhpT0RBNE1HVTFOdyIsImNsaWVudEV4dGVuc2lvbnMiOnt9LCJoYXNoQWxnb3JpdGhtIjoiU0hBLTI1NiIsIm9yaWdpbiI6Imh0dHBzOi8vc2FuZGJveC5tb2phbG9vcC5pbyIsInR5cGUiOiJ3ZWJhdXRobi5jcmVhdGUifQ==" + }, + "type": "public-key" + } + } + }, + "tests": { + "assertions": [ + { + "id": 1, + "description": "response", + "exec": [ + "const expected = {", + " credential: {", + " status: 'VERIFIED'", + " },", + " currentState: 'accountsLinked'", + " }", + "", + "expect(response.body).to.deep.equal(expected)" + ] + } + ] + } + }, + { + "id": 4, + "description": "party lookup", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 0, + "type": "thirdparty_sdk_outbound" + }, + "operationPath": "/thirdpartyTransaction/partyLookup", + "path": "/thirdpartyTransaction/partyLookup", + "method": "post", + "body": { + "payee": { + "partyIdType": "MSISDN", + "partyIdentifier": "329294234" + }, + "transactionRequestId": "c2470148-1be2-4c0b-aece-aa8dcb92a6cc" + }, + "url": "{$inputs.PISP_THIRDPARTY_SDK_OUTBOUND_URL}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "response", + "exec": [ + "const expected = {", + " \"party\": {", + " \"partyIdInfo\": {", + " \"partyIdType\": \"MSISDN\",", + " \"partyIdentifier\": \"329294234\",", + " \"fspId\": \"dfspb\"", + " },", + " \"personalInfo\": {", + " \"complexName\": {", + " \"firstName\": \"Bob\",", + " \"middleName\": \"O\",", + " \"lastName\": \"Babirusa\"", + " },", + " \"dateOfBirth\": \"1970-01-01\"", + " },", + " \"name\": \"Bob Babirusa\"", + " },", + " \"currentState\": \"partyLookupSuccess\"", + "}", + "", + "expect(response.body).to.deep.equal(expected)" + ] + } + ] + } + }, + { + "id": 5, + "description": "initiate third party transaction request", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 0, + "type": "thirdparty_sdk_outbound" + }, + "operationPath": "/thirdpartyTransaction/{ID}/initiate", + "path": "/thirdpartyTransaction/c2470148-1be2-4c0b-aece-aa8dcb92a6cc/initiate", + "method": "post", + "params": { + "ID": "c2470148-1be2-4c0b-aece-aa8dcb92a6cc" + }, + "body": { + "consentId": "2acf1dfa-ce45-486e-b19e-ae4ad9804a63", + "payee": { + "partyIdInfo": { + "partyIdType": "MSISDN", + "partyIdentifier": "329294234", + "fspId": "dfspb" + } + }, + "payer": { + "partyIdType": "THIRD_PARTY_LINK", + "partyIdentifier": "244431e2-7a56-40c6-814c-932631760fa9", + "fspId": "dfspa" + }, + "amountType": "SEND", + "amount": { + "amount": "100", + "currency": "USD" + }, + "transactionType": { + "scenario": "TRANSFER", + "initiator": "PAYER", + "initiatorType": "CONSUMER" + }, + "expiration": "{$requestVariables.expiration}" + }, + "url": "{$inputs.PISP_THIRDPARTY_SDK_OUTBOUND_URL}", + "tests": { + "assertions": [ + { + "id": 2, + "description": "dynamic fields", + "exec": [ + "expect(response.body.authorization.expiration).to.match(/[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{3}Z/)", + "", + "expect(response.body.authorization.authorizationRequestId).to.match(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}$/)" + ] + }, + { + "id": 1, + "description": "response body", + "exec": [ + "const expected = {", + " \"authorization\": {", + " \"transactionRequestId\": \"c2470148-1be2-4c0b-aece-aa8dcb92a6cc\",", + " \"transferAmount\": {", + " \"amount\": \"100\",", + " \"currency\": \"USD\"", + " },", + " \"payeeReceiveAmount\": {", + " \"amount\": \"100\",", + " \"currency\": \"USD\"", + " },", + " \"fees\": {", + " \"amount\": \"0\",", + " \"currency\": \"USD\"", + " },", + " \"payer\": {", + " \"partyIdType\": \"THIRD_PARTY_LINK\",", + " \"partyIdentifier\": \"244431e2-7a56-40c6-814c-932631760fa9\",", + " \"fspId\": \"dfspa\"", + " },", + " \"payee\": {", + " \"partyIdInfo\": {", + " \"partyIdType\": \"MSISDN\",", + " \"partyIdentifier\": \"329294234\",", + " \"fspId\": \"dfspb\"", + " }", + " },", + " \"transactionType\": {", + " \"scenario\": \"TRANSFER\",", + " \"initiator\": \"PAYER\",", + " \"initiatorType\": \"CONSUMER\"", + " },", + " \"challenge\": \"OWZhYjAxZTcwYjU4YzRhMzRmOWQwNzBmZjllZDFiNjc2NWVhMzA1NGI1MWZjZThjZGFjNDEyZDBmNmM2MWFhMQ\"", + " },", + " \"currentState\": \"authorizationReceived\"", + "}", + "", + "// Test these dynamic variables separately", + "delete response.body.authorization.authorizationRequestId", + "delete response.body.authorization.expiration", + "", + "", + "expect(response.body).to.deep.equal(expected)" + ] + } + ] + }, + "scriptingEngine": "javascript", + "scripts": { + "postRequest": { + "exec": [ + "" + ] + }, + "preRequest": { + "exec": [ + "const expirationDate = new Date();", + "expirationDate.setHours(expirationDate.getHours() + 5);", + "requestVariables.expiration = expirationDate.toISOString()" + ] + } + } + }, + { + "id": 6, + "description": "approve third party authorization request", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 0, + "type": "thirdparty_sdk_outbound" + }, + "operationPath": "/thirdpartyTransaction/{ID}/approve", + "path": "/thirdpartyTransaction/c2470148-1be2-4c0b-aece-aa8dcb92a6cc/approve", + "method": "post", + "params": { + "ID": "c2470148-1be2-4c0b-aece-aa8dcb92a6cc" + }, + "body": { + "authorizationResponse": { + "signedPayloadType": "FIDO", + "signedPayload": { + "id": "DVFXZuLI5po4eDNPCH7Vtrjan5h-yGxeAUzS3QH3uMAP8O-7xg0AObz0mdTRy7veAflN201NlqoI-lByRug5ow", + "rawId": "DVFXZuLI5po4eDNPCH7Vtrjan5h+yGxeAUzS3QH3uMAP8O+7xg0AObz0mdTRy7veAflN201NlqoI+lByRug5ow==", + "response": { + "authenticatorData": "y1+ZGYWlLBhlFSbz3enn0Sh1b1jKp63+LttwL5cw3XQBAAAAIw==", + "clientDataJSON": "eyJjaGFsbGVuZ2UiOiJUMWRhYUZscVFYaGFWR04zV1dwVk5GbDZVbWhOZWxKdFQxZFJkMDU2UW0xYWFteHNXa1JHYVU1cVl6Sk9WMVpvVFhwQk1VNUhTVEZOVjFwcVdsUm9hbHBIUm1wT1JFVjVXa1JDYlU1dFRUSk5WMFpvVFZFIiwiY2xpZW50RXh0ZW5zaW9ucyI6e30sImhhc2hBbGdvcml0aG0iOiJTSEEtMjU2Iiwib3JpZ2luIjoiaHR0cHM6Ly9zYW5kYm94Lm1vamFsb29wLmlvIiwidHlwZSI6IndlYmF1dGhuLmdldCJ9", + "signature": "MEQCIEonIaMwgHySe/1apQScRxp8GjFNwy9Ajykus3pVWX15AiAUIywSDZWWACclQ0ue47QbkTPb62zg1sR8uY9pNHG6jA==" + }, + "type": "public-key" + } + } + }, + "url": "{$inputs.PISP_THIRDPARTY_SDK_OUTBOUND_URL}", + "tests": { + "assertions": [ + { + "id": 1, + "description": "response", + "exec": [ + "delete response.body.transactionStatus.transactionId", + "", + "const expected = {", + " \"transactionStatus\": {", + " \"transactionRequestState\": \"ACCEPTED\",", + " \"transactionState\": \"COMPLETED\"", + " },", + " \"currentState\": \"transactionStatusReceived\"", + "}", + "", + "expect(response.body).to.deep.equal(expected)" + ] + } + ] + } + } + ] + } + ] +} \ No newline at end of file diff --git a/environments/hub.json b/environments/hub.json index 9814d958..feaa4f03 100644 --- a/environments/hub.json +++ b/environments/hub.json @@ -13,6 +13,8 @@ "HOST_QUOTING_SERVICE": "http://quoting-service", "HOST_SIMULATOR": "http://simulator", "HOST_TRANSACTION_REQUESTS_SERVICE": "http://transaction-requests-service", + "HOST_THIRDPARTY_API_SVC": "http://thirdparty-api-svc", + "HOST_ORACLE_CONSENT": "http://als-consent-oracle", "PAYEEFSP_BACKEND_TESTAPI_URL": "http://sim-payeefsp-backend:3003", "PAYEEFSP_CALLBACK_URL": "http://sim-payeefsp-scheme-adapter:4000", "PAYEEFSP_SDK_TESTAPI_URL": "http://sim-payeefsp-scheme-adapter:4002", @@ -29,6 +31,19 @@ "TESTFSP2_CALLBACK_URL": "http://sim-testfsp2-scheme-adapter:4000", "TESTFSP2_SDK_TESTAPI_URL": "http://sim-testfsp2-scheme-adapter:4002", "TESTFSP2_SDK_TESTAPI_WS_URL": "ws://sim-testfsp2-scheme-adapter:4002", + "PISP_THIRDPARTY_SDK_OUTBOUND_URL": "http://pisp-thirdparty-scheme-adapter-outbound:4006", + "DFSPA_NAME": "dfspa", + "DFSPA_CB_FSPIOP": "http://dfspa-sdk-scheme-adapter:4000", + "DFSPA_CB_THIRDPARTY": "http://dfspa-thirdparty-scheme-adapter-inbound:4005", + "DFSPA_BACKEND_TESTAPI_URL": "http://dfspa-backend:3003", + "DFSPB_NAME": "dfspb", + "DFSPB_CB_FSPIOP": "http://dfspb-sdk-scheme-adapter:4000", + "DFSPB_BACKEND_TESTAPI_URL": "http://dfspb-backend:3003", + "PISP_NAME": "pisp", + "PISP_CB_FSPIOP": "http://pisp-sdk-scheme-adapter:4000", + "PISP_CB_THIRDPARTY": "http://pisp-thirdparty-scheme-adapter-inbound:4005", + "CENTRALAUTH_NAME": "centralauth", + "CENTRALAUTH_CB_FSPIOP": "http://auth-service:4004", "ENABLE_JWS_SIGNING": true, "ENABLE_JWS_VALIDATION": false, "ENABLE_PROTECTED_HEADERS_VALIDATION": true,