diff --git a/OSS-API-Tests-New.postman_collection.json b/OSS-API-Tests-New.postman_collection.json new file mode 100644 index 0000000..0794e99 --- /dev/null +++ b/OSS-API-Tests-New.postman_collection.json @@ -0,0 +1,3332 @@ +{ + "info": { + "_postman_id": "c64ff7af-c8ae-4b79-8242-358d5306358d", + "name": "OSS-API-Tests-New", + "description": "##Author - Sridevi Miriyala\n\n##Description:\nThis section includes testing of the behavior of the API end points including Headers and body params testing for positive and negative paths.\n\nBased on API Definition.docx updated on 2018-03-13 Version 1.0. Note - The API supports a maximum size of 65536 bytes (64 Kilobytes) in the HTTP header.", + "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" + }, + "item": [ + { + "name": "Mojaloop-API", + "item": [ + { + "name": "participants", + "item": [ + { + "name": "/MSISDN/ID", + "item": [ + { + "name": "GET - ParticipantsByTypeAndID", + "item": [ + { + "name": "202", + "item": [ + { + "name": "202 - Accepted - BUG", + "event": [ + { + "listen": "test", + "script": { + "id": "df53ac68-44bc-4b61-9296-8857e0fe7c8d", + "exec": [ + "pm.test(\"Status code is 202\", function () {", + " pm.response.to.have.status(202);", + "});", + "", + "", + "//Check data on payer side", + "// setTimeout(function () {", + "// pm.sendRequest(pm.environment.get(\"HOST_SIMULATOR\")+\"/payerfsp/callbacks/\"+pm.variables.get(\"pathfinderMSISDN\"), function (err, response) {", + " ", + "// if(response.responseSize !== 0) { ", + " ", + "// //Checking headers", + "// var headers = response.json().headers;", + "// pm.test(\"payerfsp fspiop-source is switch\", function () {", + "// pm.expect(headers['fspiop-source']).to.eql('switch');", + "// });", + " ", + "// pm.test(\"payerfsp fspiop-destination is payerfsp\", function () {", + "// pm.expect(headers['fspiop-destination']).to.eql('payerfsp');", + "// });", + " ", + "// pm.test(\"payerfsp content-type should be application/vnd.interoperability.participants+json;version=1.0\", function () {", + "// pm.expect(headers['content-type']).to.eql('application/vnd.interoperability.participants+json;version=1.0');", + "// });", + " ", + "// pm.test(\"payerfsp accept is empty\", function () {", + "// pm.expect(headers['accept']).to.eql(undefined);", + "// });", + " ", + " ", + " ", + "// // //Validate protected header inside Signature", + "// // var {signature,protectedHeader} = JSON.parse(headers['fspiop-signature'])", + "// // var decodedProtectedHeaders = JSON.parse(atob(protectedHeader))", + "// // console.log('decodedProtectedHeaders:',decodedProtectedHeaders)", + " ", + "// // // pm.test(\"FSPIOP-Signature signature is returned\", function () {", + "// // // pm.expect(signature).to.eql(pm.environment.get(\"payeefsp-signature\"));", + "// // // });", + " ", + "// // pm.test(\"FSPIOP-Signature Protected Header alg to be RS256\", function () {", + "// // pm.expect(decodedProtectedHeaders['alg']).to.eql('RS256');", + "// // });", + "// // pm.test(\"FSPIOP-Signature Protected Header FSPIOP-URI to be /participants/MSISDN/\"+pm.environment.get(\"pathfinderMSISDN\"), function () {", + "// // pm.expect(decodedProtectedHeaders['FSPIOP-URI']).to.eql('/participants/MSISDN/'+pm.environment.get(\"pathfinderMSISDN\"));", + "// // });", + " ", + "", + "// // pm.test(\"FSPIOP-Signature Protected Header FSPIOP-HTTP-Method to be PUT\", function () {", + "// // pm.expect(decodedProtectedHeaders['FSPIOP-HTTP-Method']).to.eql('PUT');", + "// // });", + "// // pm.test(\"FSPIOP-Signature Protected Header FSPIOP-Source to be switch\", function () {", + "// // pm.expect(decodedProtectedHeaders['FSPIOP-Source']).to.eql('switch');", + "// // });", + "// // pm.test(\"FSPIOP-Signature Protected Header FSPIOP-Destination to be payerfsp\", function () {", + "// // pm.expect(decodedProtectedHeaders['FSPIOP-Destination']).to.eql('payerfsp');", + "// // });", + "// // pm.test(\"FSPIOP-Signature Protected Header Date is present\", function () {", + "// // pm.expect(decodedProtectedHeaders['Date']).to.not.eql(undefined);", + "// // });", + " ", + "// pm.test(\"payerfsp fspiop-uri to be /parties/MSISDN/\"+pm.environment.get(\"pathfinderMSISDN\"), function () {", + "// pm.expect(headers['fspiop-uri']).to.eql('/parties/MSISDN/'+pm.environment.get(\"pathfinderMSISDN\"));", + "// });", + " ", + "// pm.test(\"payerfsp fspiop-http-method is PUT\", function () {", + "// pm.expect(headers['fspiop-http-method']).to.eql('PUT');", + "// });", + " ", + "// //Checking data", + "// var jsonData = response.json().data;", + "// pm.test(\"Expected fspid is payeefsp \", function () {", + "// pm.expect(jsonData.fspId).to.eql(pm.variables.get(\"payeefsp\"));", + "// });", + " ", + " ", + "// } else {", + "// pm.test(\"Parties FAILED - payerFSP\", function () {", + "// throw new Error('Did not receive response');", + "// });", + " ", + "// }", + " ", + "// });", + "// }, 4000)", + "", + "" + ], + "type": "text/javascript" + } + }, + { + "listen": "prerequest", + "script": { + "id": "0cb60963-9178-4069-9360-82a0664a0db8", + "exec": [ + "pm.variables.set('expectedFspId', 'payeefsp');", + "", + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "accept", + "value": "application/vnd.interoperability.participants+json;version=1", + "type": "text" + }, + { + "key": "content-type", + "value": "application/vnd.interoperability.participants+json;version=1.0", + "type": "text" + }, + { + "key": "date", + "value": "{{dateHeader}}", + "type": "text" + }, + { + "key": "fspiop-source", + "value": "{{payerfsp}}", + "type": "text" + }, + { + "key": "x-forwarded-for", + "value": "", + "type": "text", + "disabled": true + }, + { + "key": "fspiop-destination", + "value": "", + "type": "text", + "disabled": true + }, + { + "key": "fspiop-encryption", + "value": "", + "type": "text", + "disabled": true + }, + { + "key": "fspiop-signature", + "value": "{{fspiop-signature}}", + "type": "text" + }, + { + "key": "fspiop-uri", + "value": "/participants/MSISDN/{{pathfinderMSISDN}}", + "type": "text" + }, + { + "key": "fspiop-http-method", + "value": "GET", + "type": "text" + }, + { + "key": "content-length", + "value": "", + "type": "text", + "disabled": true + } + ], + "url": { + "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/participants/MSISDN/{{pathfinderMSISDN}}", + "host": [ + "{{HOST_ACCOUNT_LOOKUP_SERVICE}}" + ], + "path": [ + "participants", + "MSISDN", + "{{pathfinderMSISDN}}" + ] + }, + "description": "Author: Sridevi Miriyala\n\nURI param: MSISDN\n" + }, + "response": [] + }, + { + "name": "202 - Accepted - Ignore query Parameter", + "event": [ + { + "listen": "test", + "script": { + "id": "df53ac68-44bc-4b61-9296-8857e0fe7c8d", + "exec": [ + "pm.test(\"Status code is 202\", function () {", + " pm.response.to.have.status(202);", + "});" + ], + "type": "text/javascript" + } + }, + { + "listen": "prerequest", + "script": { + "id": "0cb60963-9178-4069-9360-82a0664a0db8", + "exec": [ + "pm.variables.set('expectedFspId', 'payeefsp');", + "", + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "accept", + "value": "application/vnd.interoperability.participants+json;version=1", + "type": "text" + }, + { + "key": "content-type", + "value": "application/vnd.interoperability.participants+json;version=1.0", + "type": "text" + }, + { + "key": "date", + "value": "{{dateHeader}}", + "type": "text" + }, + { + "key": "fspiop-source", + "value": "{{payerfsp}}", + "type": "text" + }, + { + "key": "x-forwarded-for", + "value": "", + "type": "text", + "disabled": true + }, + { + "key": "fspiop-destination", + "value": "", + "type": "text", + "disabled": true + }, + { + "key": "fspiop-encryption", + "value": "", + "type": "text", + "disabled": true + }, + { + "key": "fspiop-signature", + "value": "{{fspiop-signature}}", + "type": "text" + }, + { + "key": "fspiop-uri", + "value": "/participants/MSISDN/{{pathfinderMSISDN}}", + "type": "text" + }, + { + "key": "fspiop-http-method", + "value": "GET", + "type": "text" + }, + { + "key": "content-length", + "value": "", + "type": "text", + "disabled": true + } + ], + "url": { + "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/participants/MSISDN/{{pathfinderMSISDN}}?xyz&amount&123", + "host": [ + "{{HOST_ACCOUNT_LOOKUP_SERVICE}}" + ], + "path": [ + "participants", + "MSISDN", + "{{pathfinderMSISDN}}" + ], + "query": [ + { + "key": "xyz", + "value": null + }, + { + "key": "amount", + "value": null + }, + { + "key": "123", + "value": null + } + ] + }, + "description": "Author: Sridevi Miriyala\n\nURI param: MSISDN\n" + }, + "response": [] + } + ], + "protocolProfileBehavior": {}, + "_postman_isSubFolder": true + }, + { + "name": "400", + "item": [ + { + "name": "400 - 3101 - Invalid Type - Path Parameter", + "event": [ + { + "listen": "prerequest", + "script": { + "id": "9cf7d011-ba2b-48b2-abf4-a2ed7ae0a6e8", + "exec": [ + "pm.environment.set('dateHeader', (new Date()).toUTCString());", + "" + ], + "type": "text/javascript" + } + }, + { + "listen": "test", + "script": { + "id": "3472322e-3146-4049-a128-f281e0be340e", + "exec": [ + "pm.test(\"Status code is 400\", function () {", + " pm.response.to.have.status(400);", + "});", + "", + "", + "var jsonData = pm.response.json();", + " ", + "pm.test(\"Check Malformed syntax - 'Type' URI path parameter\", function () {", + " pm.expect(jsonData.errorInformation.errorDescription).to.include('Malformed syntax - \\'Type\\' URI path parameter');", + "}); ", + " ", + "pm.test(\"Check Error code 3101\", function () {", + " pm.expect(jsonData.errorInformation.errorCode).to.eql('3101');", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "type": "text", + "value": "application/vnd.interoperability.participants+json;version=1" + }, + { + "key": "Date", + "type": "text", + "value": "{{dateHeader}}" + }, + { + "key": "FSPIOP-Source", + "type": "text", + "value": "{{payerfsp}}" + }, + { + "key": "Content-Type", + "value": "application/vnd.interoperability.participants+json;version=1.0", + "type": "text" + } + ], + "url": { + "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/participants/XYZ/{{pathfinderMSISDN}}", + "host": [ + "{{HOST_ACCOUNT_LOOKUP_SERVICE}}" + ], + "path": [ + "participants", + "XYZ", + "{{pathfinderMSISDN}}" + ] + } + }, + "response": [] + }, + { + "name": "400 - 3101 - Malformed Header - Invalid content type", + "event": [ + { + "listen": "prerequest", + "script": { + "id": "9cf7d011-ba2b-48b2-abf4-a2ed7ae0a6e8", + "exec": [ + "pm.environment.set('dateHeader', (new Date()).toUTCString());", + "" + ], + "type": "text/javascript" + } + }, + { + "listen": "test", + "script": { + "id": "3b65ac8a-b8ef-4fef-b3bb-9640778e4aa4", + "exec": [ + "pm.test(\"Status code is 400\", function () {", + " pm.response.to.have.status(400);", + "});", + "", + "var jsonData = pm.response.json();", + " ", + "pm.test(\"Check Malformed syntax - Invalid accept header\", function () {", + " pm.expect(jsonData.errorInformation.errorDescription).to.include('Malformed syntax - Invalid accept header');", + "}); ", + " ", + "pm.test(\"Check Error code 3101\", function () {", + " pm.expect(jsonData.errorInformation.errorCode).to.eql('3101');", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "xyz" + }, + { + "key": "Date", + "value": "{{dateHeader}}" + }, + { + "key": "FSPIOP-Source", + "value": "{{payerfsp}}" + }, + { + "key": "Content-Type", + "value": "application/vnd.interoperability.participants+json;version=1.0", + "type": "text" + } + ], + "url": { + "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/participants/MSISDN/{{pathfinderMSISDN}}", + "host": [ + "{{HOST_ACCOUNT_LOOKUP_SERVICE}}" + ], + "path": [ + "participants", + "MSISDN", + "{{pathfinderMSISDN}}" + ] + } + }, + "response": [] + }, + { + "name": "404 - 3002 - Missing Mandatory ID", + "event": [ + { + "listen": "test", + "script": { + "id": "df53ac68-44bc-4b61-9296-8857e0fe7c8d", + "exec": [ + "pm.test(\"Status code is 404\", function () {", + " pm.response.to.have.status(404);", + "});", + "", + "var jsonData = pm.response.json();", + " ", + "pm.test(\"Check Missing mandatory ID - Unknown URI - Not Found\", function () {", + " pm.expect(jsonData.errorInformation.errorDescription).to.include('Unknown URI - Not Found');", + "}); ", + " ", + "pm.test(\"Check Error code 3002\", function () {", + " pm.expect(jsonData.errorInformation.errorCode).to.eql('3002');", + "});" + ], + "type": "text/javascript" + } + }, + { + "listen": "prerequest", + "script": { + "id": "0cb60963-9178-4069-9360-82a0664a0db8", + "exec": [ + "pm.variables.set('expectedFspId', 'payeefsp');", + "pm.variables.set('participantDateHeader', (new Date()).toUTCString());", + "", + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/vnd.interoperability.participants+json;version=1" + }, + { + "key": "Content-Type", + "value": "application/vnd.interoperability.participants+json;version=1.0" + }, + { + "key": "FSPIOP-Source", + "value": "{{payerfsp}}" + }, + { + "key": "Date", + "value": "{{dateHeader}}" + } + ], + "url": { + "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/participants/MSISDN/", + "host": [ + "{{HOST_ACCOUNT_LOOKUP_SERVICE}}" + ], + "path": [ + "participants", + "MSISDN", + "" + ] + } + }, + "response": [] + }, + { + "name": "400 - 3102 - Missing Mandatory Headers", + "event": [ + { + "listen": "test", + "script": { + "id": "df53ac68-44bc-4b61-9296-8857e0fe7c8d", + "exec": [ + "pm.test(\"Status code is 400\", function () {", + " pm.response.to.have.status(400);", + "});", + "", + "var jsonData = pm.response.json();", + " ", + "pm.test(\"Check Missing mandatory element - date is required\", function () {", + " pm.expect(jsonData.errorInformation.errorDescription).to.include('Missing mandatory element - date is required');", + "}); ", + " ", + "pm.test(\"Check Error code 3102\", function () {", + " pm.expect(jsonData.errorInformation.errorCode).to.eql('3102');", + "});", + "" + ], + "type": "text/javascript" + } + }, + { + "listen": "prerequest", + "script": { + "id": "0cb60963-9178-4069-9360-82a0664a0db8", + "exec": [ + "pm.variables.set('expectedFspId', 'payeefsp');", + "pm.variables.set('participantDateHeader', (new Date()).toUTCString());", + "", + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/vnd.interoperability.participants+json;version=1" + }, + { + "key": "Content-Type", + "value": "application/vnd.interoperability.participants+json;version=1.0" + }, + { + "key": "FSPIOP-Source", + "value": "{{payerfsp}}" + }, + { + "key": "Date", + "value": "{{dateHeader}}", + "disabled": true + } + ], + "url": { + "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/participants/MSISDN/{{pathfinderMSISDN}}", + "host": [ + "{{HOST_ACCOUNT_LOOKUP_SERVICE}}" + ], + "path": [ + "participants", + "MSISDN", + "{{pathfinderMSISDN}}" + ] + } + }, + "response": [] + } + ], + "protocolProfileBehavior": {}, + "_postman_isSubFolder": true + } + ], + "protocolProfileBehavior": {}, + "_postman_isSubFolder": true + }, + { + "name": "POST - ParticipantsByTypeAndID", + "item": [ + { + "name": "202", + "item": [ + { + "name": "202 - Created", + "event": [ + { + "listen": "test", + "script": { + "id": "c11075ed-0aa5-4631-a8a4-5bbf1b7fbddb", + "exec": [ + "pm.test(\"Status code is 202\", function () {", + " pm.response.to.have.status(202);", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Accept", + "type": "text", + "value": "application/vnd.interoperability.participants+json;version=1" + }, + { + "key": "Date", + "type": "text", + "value": "{{dateHeader}}" + }, + { + "key": "FSPIOP-Source", + "type": "text", + "value": "{{payerfsp}}" + }, + { + "key": "Content-Type", + "type": "text", + "value": "application/vnd.interoperability.participants+json;version=1.0" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"fspId\": \"{{payeefsp}}\",\n\t\"currency\": \"{{currency}}\"\n}" + }, + "url": { + "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/participants/MSISDN/{{pathfinderMSISDN}}", + "host": [ + "{{HOST_ACCOUNT_LOOKUP_SERVICE}}" + ], + "path": [ + "participants", + "MSISDN", + "{{pathfinderMSISDN}}" + ] + } + }, + "response": [] + } + ], + "protocolProfileBehavior": {}, + "_postman_isSubFolder": true + }, + { + "name": "400", + "item": [ + { + "name": "400 - Missing Date header Missing - 3102", + "event": [ + { + "listen": "test", + "script": { + "id": "c11075ed-0aa5-4631-a8a4-5bbf1b7fbddb", + "exec": [ + "pm.test(\"Status code is 400\", function () {", + " pm.response.to.have.status(400);", + "});", + "", + "var jsonData = pm.response.json();", + " ", + "pm.test(\"Check Missing mandatory element - date is required\", function () {", + " pm.expect(jsonData.errorInformation.errorDescription).to.include('Missing mandatory element - date is required');", + "}); ", + " ", + "pm.test(\"Check Error code 3102\", function () {", + " pm.expect(jsonData.errorInformation.errorCode).to.eql('3102');", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Accept", + "value": "application/vnd.interoperability.participants+json;version=1", + "type": "text" + }, + { + "key": "Date", + "value": "{{dateHeader}}", + "type": "text", + "disabled": true + }, + { + "key": "FSPIOP-Source", + "value": "{{payerfsp}}", + "type": "text" + }, + { + "key": "Content-Type", + "value": "application/vnd.interoperability.participants+json;version=1.0", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"fspId\": \"{{payeefsp}}\",\n\t\"currency\": \"{{currency}}\"\n}" + }, + "url": { + "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/participants/MSISDN/{{pathfinderMSISDN}}", + "host": [ + "{{HOST_ACCOUNT_LOOKUP_SERVICE}}" + ], + "path": [ + "participants", + "MSISDN", + "{{pathfinderMSISDN}}" + ] + } + }, + "response": [] + }, + { + "name": "400 - Malformed Type - xyz - 3101", + "event": [ + { + "listen": "test", + "script": { + "id": "c11075ed-0aa5-4631-a8a4-5bbf1b7fbddb", + "exec": [ + "pm.test(\"Status code is 400\", function () {", + " pm.response.to.have.status(400);", + "});", + "", + "var jsonData = pm.response.json();", + " ", + "pm.test(\"Check Missing mandatory element - date is required\", function () {", + " pm.expect(jsonData.errorInformation.errorDescription).to.include('Malformed syntax - \\'Type\\' URI path parameter');", + "}); ", + " ", + "pm.test(\"Check Error code 3101\", function () {", + " pm.expect(jsonData.errorInformation.errorCode).to.eql('3101');", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Accept", + "value": "application/vnd.interoperability.participants+json;version=1", + "type": "text" + }, + { + "key": "Date", + "value": "{{dateHeader}}", + "type": "text" + }, + { + "key": "FSPIOP-Source", + "value": "{{payerfsp}}", + "type": "text" + }, + { + "key": "Content-Type", + "value": "application/vnd.interoperability.participants+json;version=1.0", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"fspId\": \"{{payeefsp}}\",\n\t\"currency\": \"{{currency}}\",\n\t\"currency1\": \"{{currency}}\"\n}" + }, + "url": { + "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/participants/xyz/{{pathfinderMSISDN}}", + "host": [ + "{{HOST_ACCOUNT_LOOKUP_SERVICE}}" + ], + "path": [ + "participants", + "xyz", + "{{pathfinderMSISDN}}" + ] + } + }, + "response": [] + }, + { + "name": "400 - fsiop header missing - 3102", + "event": [ + { + "listen": "test", + "script": { + "id": "c11075ed-0aa5-4631-a8a4-5bbf1b7fbddb", + "exec": [ + "pm.test(\"Status code is 400\", function () {", + " pm.response.to.have.status(400);", + "});", + "", + "var jsonData = pm.response.json();", + " ", + "pm.test(\"Check Missing mandatory element - fspiop-source is required\", function () {", + " pm.expect(jsonData.errorInformation.errorDescription).to.include('Missing mandatory element - fspiop-source is required');", + "}); ", + " ", + "pm.test(\"Check Error code 3102\", function () {", + " pm.expect(jsonData.errorInformation.errorCode).to.eql('3102');", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Accept", + "value": "application/vnd.interoperability.participants+json;version=1", + "type": "text" + }, + { + "key": "Date", + "value": "{{dateHeader}}", + "type": "text" + }, + { + "key": "FSPIOP-Source", + "value": "{{payerfsp}}", + "type": "text", + "disabled": true + }, + { + "key": "Content-Type", + "value": "application/vnd.interoperability.participants+json;version=1.0", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"fspId\": \"{{payeefsp}}\",\n\t\"currency\": \"{{currency}}\"\n}" + }, + "url": { + "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/participants/MSISDN/{{pathfinderMSISDN}}", + "host": [ + "{{HOST_ACCOUNT_LOOKUP_SERVICE}}" + ], + "path": [ + "participants", + "MSISDN", + "{{pathfinderMSISDN}}" + ] + } + }, + "response": [] + }, + { + "name": "400 - Missing content type - 3102", + "event": [ + { + "listen": "test", + "script": { + "id": "c11075ed-0aa5-4631-a8a4-5bbf1b7fbddb", + "exec": [ + "pm.test(\"Status code is 400\", function () {", + " pm.response.to.have.status(400);", + "});", + "", + "var jsonData = pm.response.json();", + " ", + "pm.test(\"Check Missing mandatory element - fspiop-source is required\", function () {", + " pm.expect(jsonData.errorInformation.errorDescription).to.include('Missing mandatory element - content-type is required');", + "}); ", + " ", + "pm.test(\"Check Error code 3102\", function () {", + " pm.expect(jsonData.errorInformation.errorCode).to.eql('3102');", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Accept", + "value": "application/vnd.interoperability.participants+json;version=1", + "type": "text" + }, + { + "key": "Date", + "value": "{{dateHeader}}", + "type": "text" + }, + { + "key": "FSPIOP-Source", + "value": "{{payerfsp}}", + "type": "text" + }, + { + "key": "Content-Type", + "value": "application/vnd.interoperability.participants+json;version=1.0", + "type": "text", + "disabled": true + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"fspId\": \"{{payeefsp}}\",\n\t\"currency\": \"{{currency}}\"\n}" + }, + "url": { + "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/participants/MSISDN/{{pathfinderMSISDN}}", + "host": [ + "{{HOST_ACCOUNT_LOOKUP_SERVICE}}" + ], + "path": [ + "participants", + "MSISDN", + "{{pathfinderMSISDN}}" + ] + } + }, + "response": [] + }, + { + "name": "400 - Malformed Syntax - accept header - 3101", + "event": [ + { + "listen": "test", + "script": { + "id": "c11075ed-0aa5-4631-a8a4-5bbf1b7fbddb", + "exec": [ + "pm.test(\"Status code is 400\", function () {", + " pm.response.to.have.status(400);", + "});", + "", + "", + "var jsonData = pm.response.json();", + " ", + "pm.test(\"Check Malformed syntax - Invalid accept header\", function () {", + " pm.expect(jsonData.errorInformation.errorDescription).to.include('Malformed syntax - Invalid accept header');", + "}); ", + " ", + "pm.test(\"Check Error code 3101\", function () {", + " pm.expect(jsonData.errorInformation.errorCode).to.eql('3101');", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Accept", + "value": "application/vnd.interoperability.participants+json;version=1", + "type": "text", + "disabled": true + }, + { + "key": "Date", + "value": "{{dateHeader}}", + "type": "text" + }, + { + "key": "FSPIOP-Source", + "value": "{{payerfsp}}", + "type": "text" + }, + { + "key": "Content-Type", + "value": "application/vnd.interoperability.participants+json;version=1.0", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"fspId\": \"{{payeefsp}}\",\n\t\"currency\": \"{{currency}}\"\n}" + }, + "url": { + "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/participants/MSISDN/{{pathfinderMSISDN}}", + "host": [ + "{{HOST_ACCOUNT_LOOKUP_SERVICE}}" + ], + "path": [ + "participants", + "MSISDN", + "{{pathfinderMSISDN}}" + ] + } + }, + "response": [] + }, + { + "name": "406 - Invalid content type - version -3001", + "event": [ + { + "listen": "test", + "script": { + "id": "c11075ed-0aa5-4631-a8a4-5bbf1b7fbddb", + "exec": [ + "pm.test(\"Status code is 406\", function () {", + " pm.response.to.have.status(406);", + "});", + "", + "var jsonData = pm.response.json();", + " ", + "pm.test(\"Check Unacceptable version requested\", function () {", + " pm.expect(jsonData.errorInformation.errorDescription).to.include('Unacceptable version requested');", + "}); ", + " ", + "pm.test(\"Check Error code 3001\", function () {", + " pm.expect(jsonData.errorInformation.errorCode).to.eql('3001');", + "});", + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Accept", + "value": "application/vnd.interoperability.participants+json;version=1", + "type": "text" + }, + { + "key": "Date", + "value": "{{dateHeader}}", + "type": "text" + }, + { + "key": "FSPIOP-Source", + "value": "{{payerfsp}}", + "type": "text" + }, + { + "key": "Content-Type", + "value": "application/vnd.interoperability.participants+json;version=1.1", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"fspId\": \"{{payeefsp}}\",\n\t\"currency\": \"{{currency}}\"\n}" + }, + "url": { + "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/participants/MSISDN/{{pathfinderMSISDN}}", + "host": [ + "{{HOST_ACCOUNT_LOOKUP_SERVICE}}" + ], + "path": [ + "participants", + "MSISDN", + "{{pathfinderMSISDN}}" + ] + } + }, + "response": [] + }, + { + "name": "400 - Malformed - 3101 - Invalid Accept Header", + "event": [ + { + "listen": "test", + "script": { + "id": "c11075ed-0aa5-4631-a8a4-5bbf1b7fbddb", + "exec": [ + "pm.test(\"Status code is 400\", function () {", + " pm.response.to.have.status(400);", + "});", + "", + "var jsonData = pm.response.json();", + " ", + "pm.test(\"Check Malformed syntax - Invalid accept header\", function () {", + " pm.expect(jsonData.errorInformation.errorDescription).to.include('Malformed syntax - Invalid accept header');", + "}); ", + " ", + "pm.test(\"Check Error code 3101\", function () {", + " pm.expect(jsonData.errorInformation.errorCode).to.eql('3101');", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Accept", + "value": "application/vnd.interoperability.participants+xml;version=1", + "type": "text" + }, + { + "key": "Date", + "value": "{{dateHeader}}", + "type": "text" + }, + { + "key": "FSPIOP-Source", + "value": "{{payerfsp}}", + "type": "text" + }, + { + "key": "Content-Type", + "value": "application/vnd.interoperability.participants+json;version=1.0", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"fspId\": \"{{payeefsp}}\",\n\t\"currency\": \"{{currency}}\"\n}" + }, + "url": { + "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/participants/MSISDN/{{pathfinderMSISDN}}", + "host": [ + "{{HOST_ACCOUNT_LOOKUP_SERVICE}}" + ], + "path": [ + "participants", + "MSISDN", + "{{pathfinderMSISDN}}" + ] + } + }, + "response": [] + }, + { + "name": "400 - Invalid content type - xml", + "event": [ + { + "listen": "test", + "script": { + "id": "c11075ed-0aa5-4631-a8a4-5bbf1b7fbddb", + "exec": [ + "pm.test(\"Status code is 400\", function () {", + " pm.response.to.have.status(400);", + "});", + "", + "var jsonData = pm.response.json();", + " ", + "pm.test(\"Check Malformed syntax - Invalid content-type header\", function () {", + " pm.expect(jsonData.errorInformation.errorDescription).to.include('Malformed syntax - Invalid content-type header');", + "}); ", + " ", + "pm.test(\"Check Error code 3101\", function () {", + " pm.expect(jsonData.errorInformation.errorCode).to.eql('3101');", + "});", + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Accept", + "value": "application/vnd.interoperability.participants+json;version=1", + "type": "text" + }, + { + "key": "Date", + "value": "{{dateHeader}}", + "type": "text" + }, + { + "key": "FSPIOP-Source", + "value": "{{payerfsp}}", + "type": "text" + }, + { + "key": "Content-Type", + "value": "application/vnd.interoperability.participants+xml;version=1.0", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"fspId\": \"{{payeefsp}}\",\n\t\"currency\": \"{{currency}}\"\n}" + }, + "url": { + "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/participants/MSISDN/{{pathfinderMSISDN}}", + "host": [ + "{{HOST_ACCOUNT_LOOKUP_SERVICE}}" + ], + "path": [ + "participants", + "MSISDN", + "{{pathfinderMSISDN}}" + ] + } + }, + "response": [] + }, + { + "name": "400 - Malformed - 3101 - Invalid FSPID > 32 char", + "event": [ + { + "listen": "test", + "script": { + "id": "c11075ed-0aa5-4631-a8a4-5bbf1b7fbddb", + "exec": [ + "pm.test(\"Status code is 400\", function () {", + " pm.response.to.have.status(400);", + "});", + "", + "var jsonData = pm.response.json();", + " ", + "pm.test(\"Check Malformed syntax - fspId length must be less than or equal to 32 characters long\", function () {", + " pm.expect(jsonData.errorInformation.errorDescription).to.include('Malformed syntax');", + "}); ", + " ", + "pm.test(\"Check Error code 3101\", function () {", + " pm.expect(jsonData.errorInformation.errorCode).to.eql('3101');", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Accept", + "value": "application/vnd.interoperability.participants+json;version=1", + "type": "text" + }, + { + "key": "Date", + "value": "{{dateHeader}}", + "type": "text" + }, + { + "key": "FSPIOP-Source", + "value": "{{payerfsp}}", + "type": "text" + }, + { + "key": "Content-Type", + "value": "application/vnd.interoperability.participants+json;version=1.0", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"fspId\": \"123456789012345678901234567890123\",\n\t\"currency\": \"{{currency}}\"\n}" + }, + "url": { + "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/participants/MSISDN/{{pathfinderMSISDN}}", + "host": [ + "{{HOST_ACCOUNT_LOOKUP_SERVICE}}" + ], + "path": [ + "participants", + "MSISDN", + "{{pathfinderMSISDN}}" + ] + } + }, + "response": [] + }, + { + "name": "400 - Malformed Type - 3101 - Invalid FSPID - 0 in data", + "event": [ + { + "listen": "test", + "script": { + "id": "c11075ed-0aa5-4631-a8a4-5bbf1b7fbddb", + "exec": [ + "pm.test(\"Status code is 400\", function () {", + " pm.response.to.have.status(400);", + "});", + "", + "var jsonData = pm.response.json();", + " ", + "pm.test(\"Check Missing mandatory element - fspId is not allowed to be empty\", function () {", + " pm.expect(jsonData.errorInformation.errorDescription).to.include('Missing mandatory element ');", + "}); ", + " ", + "pm.test(\"Check Error code 3102\", function () {", + " pm.expect(jsonData.errorInformation.errorCode).to.eql('3102');", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Accept", + "type": "text", + "value": "application/vnd.interoperability.participants+json;version=1" + }, + { + "key": "Date", + "type": "text", + "value": "{{dateHeader}}" + }, + { + "key": "FSPIOP-Source", + "type": "text", + "value": "{{payerfsp}}" + }, + { + "key": "Content-Type", + "type": "text", + "value": "application/vnd.interoperability.participants+json;version=1.0" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"fspId\": \"\",\n\t\"currency\": \"{{currency}}\"\n}" + }, + "url": { + "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/participants/MSISDN/{{pathfinderMSISDN}}", + "host": [ + "{{HOST_ACCOUNT_LOOKUP_SERVICE}}" + ], + "path": [ + "participants", + "MSISDN", + "{{pathfinderMSISDN}}" + ] + } + }, + "response": [] + }, + { + "name": "400 - Malformed Type - 3101/3 - extra elements in currency - BUG", + "event": [ + { + "listen": "test", + "script": { + "id": "c11075ed-0aa5-4631-a8a4-5bbf1b7fbddb", + "exec": [ + "pm.test(\"Status code is 400\", function () {", + " pm.response.to.have.status(400);", + "});", + "", + "var jsonData = pm.response.json();", + " ", + "pm.test(\"Check Malformed syntax - CurrencyEnum\", function () {", + " pm.expect(jsonData.errorInformation.errorDescription).to.include('Malformed syntax');", + "}); ", + " ", + "pm.test(\"Check Error code 3101\", function () {", + " pm.expect(jsonData.errorInformation.errorCode).to.eql('3101');", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Accept", + "value": "application/vnd.interoperability.participants+json;version=1", + "type": "text" + }, + { + "key": "Date", + "value": "{{dateHeader}}", + "type": "text" + }, + { + "key": "FSPIOP-Source", + "value": "{{payerfsp}}", + "type": "text" + }, + { + "key": "Content-Type", + "value": "application/vnd.interoperability.participants+json;version=1.0", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"fspId\": \"{{payeefsp}}\",\n\t\"currency\": \"{{currency}},GBP\"\n}" + }, + "url": { + "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/participants/MSISDN/{{pathfinderMSISDN}}", + "host": [ + "{{HOST_ACCOUNT_LOOKUP_SERVICE}}" + ], + "path": [ + "participants", + "MSISDN", + "{{pathfinderMSISDN}}" + ] + } + }, + "response": [] + } + ], + "protocolProfileBehavior": {}, + "_postman_isSubFolder": true + } + ], + "protocolProfileBehavior": {}, + "_postman_isSubFolder": true + } + ], + "protocolProfileBehavior": {}, + "_postman_isSubFolder": true + } + ], + "description": "Author: Sridevi Miriyala\n\nFolder for participants.\nParticipant is a FSP.\n", + "event": [ + { + "listen": "prerequest", + "script": { + "id": "5dfe9046-ff53-434f-aa92-89faa8d0fd87", + "type": "text/javascript", + "exec": [ + "" + ] + } + }, + { + "listen": "test", + "script": { + "id": "462ee703-cad7-4da9-a007-284fcb5927f4", + "type": "text/javascript", + "exec": [ + "" + ] + } + } + ], + "protocolProfileBehavior": {}, + "_postman_isSubFolder": true + }, + { + "name": "quotes", + "item": [ + { + "name": "GET", + "item": [ + { + "name": "Send Quote", + "event": [ + { + "listen": "prerequest", + "script": { + "id": "887e4721-3923-41bd-bf8a-3d0cd5eed8ee", + "exec": [ + " ", + " var uuid = require('uuid');", + " var generatedUUID = uuid.v4();", + " pm.environment.set('quoteId2', generatedUUID);", + "", + "", + " pm.environment.set('quoteDate', (new Date()).toUTCString());", + "" + ], + "type": "text/javascript" + } + }, + { + "listen": "test", + "script": { + "id": "095c973b-3b61-453c-992c-21a78b1066dc", + "exec": [ + "pm.test(\"Status code is 202\", function () {", + " pm.response.to.have.status(202);", + "});", + "", + "// pm.test(\"Check that Content-Type is present\", function () {", + "// pm.response.to.have.header(\"Content-Type\");", + "// pm.response.to.be.header(\"Content-Type\", \"application/vnd.interoperability.quotes+json;version=1.0\");", + "// });", + "", + "", + "setTimeout(function () {", + " pm.sendRequest(pm.environment.get(\"HOST_SIMULATOR\")+\"/payerfsp/correlationid/\"+pm.variables.get(\"quoteId2\"), function (err, response) {", + " if(response !== null) {", + " console.log(response.json());", + " pm.test(\"Response ilpPacket is not null\", function () {", + " pm.expect(response.json().ilpPacket).not.equal(null);", + " pm.environment.set(\"ilpPacket2\", response.json().ilpPacket);", + " });", + " ", + " pm.test(\"Response condition is not null\", function () {", + " pm.expect(response.json().condition).not.equal(null);", + " pm.environment.set(\"condition2\", response.json().condition);", + " });", + " } else {", + " pm.test(\"Quote FAILED\", function () {", + " throw new Error('Did not receive response');", + " });", + " postman.setNextRequest(null);", + " }", + " ", + " });", + "}, 3000);", + "", + "", + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Accept", + "value": "application/vnd.interoperability.quotes+json;version=1" + }, + { + "key": "Content-Type", + "name": "Content-Type", + "value": "application/vnd.interoperability.quotes+json;version=1.0", + "type": "text" + }, + { + "key": "Date", + "value": "{{quoteDate}}" + }, + { + "key": "FSPIOP-Source", + "value": "{{payerfsp}}" + }, + { + "key": "FSPIOP-Destination", + "value": "{{payeefsp}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"quoteId\": \"{{quoteId2}}\",\n \"transactionId\": \"{{quoteId2}}\",\n \"payee\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"MSISDN\",\n \"partyIdentifier\": \"{{receiverMSISDN}}\",\n \"fspId\": \"{{payeefsp}}\"\n }\n },\n \"payer\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"MSISDN\",\n \"partyIdentifier\": \"27713803905\",\n \"fspId\": \"{{payerfsp}}\"\n },\n \"personalInfo\": {\n \"complexName\": {\n \"firstName\": \"Mats\",\n \"lastName\": \"Hagman\"\n },\n \"dateOfBirth\": \"1983-10-25\"\n }\n },\n \"amountType\": \"SEND\",\n \"amount\": {\n \"amount\": \"15\" ,\n \"currency\": \"XOF\"\n },\n \"transactionType\": {\n \"scenario\": \"TRANSFER\",\n \"initiator\": \"PAYER\",\n \"initiatorType\": \"CONSUMER\"\n },\n \"note\": \"hej\"\n}" + }, + "url": { + "raw": "{{HOST_QUOTING_SERVICE}}/quotes", + "host": [ + "{{HOST_QUOTING_SERVICE}}" + ], + "path": [ + "quotes" + ] + } + }, + "response": [] + }, + { + "name": "QuotesByID", + "event": [ + { + "listen": "test", + "script": { + "id": "aa07986c-5b41-42d6-9223-157fd4d99a67", + "exec": [ + "pm.test(\"Status code is 202\", function () {", + " pm.response.to.have.status(202);", + "});", + "", + "", + "setTimeout(function () {", + " pm.sendRequest(pm.environment.get(\"HOST_SIMULATOR\")+\"/payerfsp/correlationid/\"+pm.variables.get(\"quoteId2\"), function (err, response) {", + " if(response.responseSize !== 0) {", + " console.log(response.json());", + " pm.test(\"Response transfer amount is valid\", function () {", + " // pm.expect(response.json().ilpPacket).not.equal(null);", + " pm.expect(response.json().transferAmount.amount).to.eql('15');", + " // pm.environment.set(\"ilpPacket\", response.json().ilpPacket);", + " });", + " ", + " pm.test(\"Response condition is not null\", function () {", + " pm.expect(response.json().condition).not.equal(null);", + " //pm.environment.set(\"condition\", response.json().condition);", + " });", + " } else {", + " pm.test(\"Quote FAILED\", function () {", + " throw new Error('Did not receive response');", + " });", + " postman.setNextRequest(null);", + " }", + " ", + " });", + "}, 3000);" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/vnd.interoperability.quotes+json;version=1" + }, + { + "key": "Content-Type", + "value": "application/vnd.interoperability.quotes+json;version=1.0" + }, + { + "key": "Date", + "value": "{{quoteDate}}" + }, + { + "key": "FSPIOP-Source", + "value": "{{payerfsp}}", + "type": "text" + }, + { + "key": "FSPIOP-Destination", + "value": "{{payeefsp}}", + "type": "text" + } + ], + "url": { + "raw": "{{HOST_QUOTING_SERVICE}}/quotes/{{quoteId2}}", + "host": [ + "{{HOST_QUOTING_SERVICE}}" + ], + "path": [ + "quotes", + "{{quoteId2}}" + ] + }, + "description": "The HTTP request GET /quotes/ is used to get information regarding an earlier created or requested quote. The in the URI should contain the quoteId that was used for the creation of the quote." + }, + "response": [] + }, + { + "name": "400-Missing Date header", + "event": [ + { + "listen": "test", + "script": { + "id": "aa07986c-5b41-42d6-9223-157fd4d99a67", + "exec": [ + "pm.test(\"Status code is 400\", function () {", + " pm.response.to.have.status(400);", + "});", + "", + "", + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/vnd.interoperability.quotes+json;version=1" + }, + { + "key": "Content-Type", + "value": "application/vnd.interoperability.quotes+json;version=1.0" + }, + { + "key": "FSPIOP-Source", + "type": "text", + "value": "{{payerfsp}}" + }, + { + "key": "FSPIOP-Destination", + "type": "text", + "value": "{{payeefsp}}" + } + ], + "url": { + "raw": "{{HOST_QUOTING_SERVICE}}/quotes/{{quoteId2}}", + "host": [ + "{{HOST_QUOTING_SERVICE}}" + ], + "path": [ + "quotes", + "{{quoteId2}}" + ] + }, + "description": "The HTTP request GET /quotes/ is used to get information regarding an earlier created or requested quote. The in the URI should contain the quoteId that was used for the creation of the quote." + }, + "response": [] + }, + { + "name": "400-Missing FSPIOP-Source header", + "event": [ + { + "listen": "test", + "script": { + "id": "aa07986c-5b41-42d6-9223-157fd4d99a67", + "exec": [ + "pm.test(\"Status code is 400\", function () {", + " pm.response.to.have.status(400);", + "});", + "", + "", + "/*setTimeout(function () {", + " pm.sendRequest(pm.environment.get(\"HOST_SIMULATOR\")+\"/payerfsp/correlationid/\"+pm.variables.get(\"quoteId2\"), function (err, response) {", + " if(response !== null) {", + " console.log(response.json());", + " pm.test(\"Response transfer amount is valid\", function () {", + " ", + " pm.expect(response.json().transferAmount.amount).to.eql('15');", + " ", + " });", + " ", + " pm.test(\"Response condition is not null\", function () {", + " pm.expect(response.json().condition).not.equal(null);", + " ", + " });", + " } else {", + " pm.test(\"Quote FAILED\", function () {", + " throw new Error('Did not receive response');", + " });", + " postman.setNextRequest(null);", + " }", + " ", + " });", + "}, 3000);*/" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/vnd.interoperability.quotes+json;version=1" + }, + { + "key": "Content-Type", + "value": "application/vnd.interoperability.quotes+json;version=1.0" + }, + { + "key": "Date", + "value": "{{quoteDate}}" + }, + { + "key": "FSPIOP-Destination", + "type": "text", + "value": "{{payeefsp}}" + } + ], + "url": { + "raw": "{{HOST_QUOTING_SERVICE}}/quotes/{{quoteId2}}", + "host": [ + "{{HOST_QUOTING_SERVICE}}" + ], + "path": [ + "quotes", + "{{quoteId2}}" + ] + }, + "description": "The HTTP request GET /quotes/ is used to get information regarding an earlier created or requested quote. The in the URI should contain the quoteId that was used for the creation of the quote." + }, + "response": [] + }, + { + "name": "400- Missing Accept header", + "event": [ + { + "listen": "test", + "script": { + "id": "aa07986c-5b41-42d6-9223-157fd4d99a67", + "exec": [ + "pm.test(\"Status code is 400\", function () {", + " pm.response.to.have.status(400);", + "});", + "", + "", + "/*setTimeout(function () {", + " pm.sendRequest(pm.environment.get(\"HOST_SIMULATOR\")+\"/payerfsp/correlationid/\"+pm.variables.get(\"quoteId2\"), function (err, response) {", + " if(response !== null) {", + " console.log(response.json());", + " pm.test(\"Response transfer amount is valid\", function () {", + " ", + " pm.expect(response.json().transferAmount.amount).to.eql('15');", + " ", + " });", + " ", + " pm.test(\"Response condition is not null\", function () {", + " pm.expect(response.json().condition).not.equal(null);", + " ", + " });", + " } else {", + " pm.test(\"Quote FAILED\", function () {", + " throw new Error('Did not receive response');", + " });", + " postman.setNextRequest(null);", + " }", + " ", + " });", + "}, 3000);*/" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/vnd.interoperability.quotes+json;version=1.0" + }, + { + "key": "Date", + "value": "{{quoteDate}}" + }, + { + "key": "FSPIOP-Source", + "type": "text", + "value": "{{payerfsp}}" + }, + { + "key": "FSPIOP-Destination", + "type": "text", + "value": "{{payeefsp}}" + } + ], + "url": { + "raw": "{{HOST_QUOTING_SERVICE}}/quotes/{{quoteId2}}", + "host": [ + "{{HOST_QUOTING_SERVICE}}" + ], + "path": [ + "quotes", + "{{quoteId2}}" + ] + }, + "description": "The HTTP request GET /quotes/ is used to get information regarding an earlier created or requested quote. The in the URI should contain the quoteId that was used for the creation of the quote." + }, + "response": [] + }, + { + "name": "404-No ID in the URI", + "event": [ + { + "listen": "test", + "script": { + "id": "aa07986c-5b41-42d6-9223-157fd4d99a67", + "exec": [ + "pm.test(\"Status code is 404\", function () {", + " pm.response.to.have.status(404);", + "});", + "", + " var jsonData = pm.response.json();", + "", + "pm.test(\"Error code is 3002\", function () {", + " pm.expect(jsonData.errorInformation.errorCode).to.eql('3002');", + "});", + "", + "pm.test(\"Error Description is Unknown URI - Not Found\", function () {", + " pm.expect(jsonData.errorInformation.errorDescription).to.include(\"Unknown URI - Not Found\");", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/vnd.interoperability.quotes+json;version=1" + }, + { + "key": "Content-Type", + "value": "application/vnd.interoperability.quotes+json;version=1.0" + }, + { + "key": "Date", + "value": "{{quoteDate}}" + }, + { + "key": "FSPIOP-Source", + "type": "text", + "value": "{{payerfsp}}" + }, + { + "key": "FSPIOP-Destination", + "type": "text", + "value": "{{payeefsp}}" + } + ], + "url": { + "raw": "{{HOST_QUOTING_SERVICE}}/quotes/", + "host": [ + "{{HOST_QUOTING_SERVICE}}" + ], + "path": [ + "quotes", + "" + ] + }, + "description": "The HTTP request GET /quotes/ is used to get information regarding an earlier created or requested quote. The in the URI should contain the quoteId that was used for the creation of the quote." + }, + "response": [] + }, + { + "name": "400- Malformed ID", + "event": [ + { + "listen": "test", + "script": { + "id": "aa07986c-5b41-42d6-9223-157fd4d99a67", + "exec": [ + "pm.test(\"Status code is 400\", function () {", + " pm.response.to.have.status(400);", + "});", + "", + "var jsonData = pm.response.json();", + " ", + "pm.test(\"Check Malformed ID - 000000\", function () {", + " pm.expect(jsonData.errorInformation.errorDescription).to.include('Malformed syntax');", + "}); ", + " ", + "pm.test(\"Check Error code 3101\", function () {", + " pm.expect(jsonData.errorInformation.errorCode).to.eql('3101');", + "});", + "", + "", + "", + "", + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/vnd.interoperability.quotes+json;version=1" + }, + { + "key": "Content-Type", + "value": "application/vnd.interoperability.quotes+json;version=1.0" + }, + { + "key": "Date", + "value": "{{quoteDate}}" + }, + { + "key": "FSPIOP-Source", + "type": "text", + "value": "{{payerfsp}}" + }, + { + "key": "FSPIOP-Destination", + "type": "text", + "value": "{{payeefsp}}" + } + ], + "url": { + "raw": "{{HOST_QUOTING_SERVICE}}/quotes/000000", + "host": [ + "{{HOST_QUOTING_SERVICE}}" + ], + "path": [ + "quotes", + "000000" + ] + }, + "description": "The HTTP request GET /quotes/ is used to get information regarding an earlier created or requested quote. The in the URI should contain the quoteId that was used for the creation of the quote." + }, + "response": [] + }, + { + "name": "400-Malformed ID", + "event": [ + { + "listen": "test", + "script": { + "id": "aa07986c-5b41-42d6-9223-157fd4d99a67", + "exec": [ + "pm.test(\"Status code is 400\", function () {", + " pm.response.to.have.status(400);", + "});", + "", + "var jsonData = pm.response.json();", + " ", + "pm.test(\"Check Malformed ID - 482f5eb4-67b6-####-9737-c77b0@$4706c\", function () {", + " pm.expect(jsonData.errorInformation.errorDescription).to.include('Malformed syntax');", + "}); ", + " ", + "pm.test(\"Check Error code 3101\", function () {", + " pm.expect(jsonData.errorInformation.errorCode).to.eql('3101');", + "});", + "", + "", + "", + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/vnd.interoperability.quotes+json;version=1" + }, + { + "key": "Content-Type", + "value": "application/vnd.interoperability.quotes+json;version=1.0" + }, + { + "key": "Date", + "value": "{{quoteDate}}" + }, + { + "key": "FSPIOP-Source", + "type": "text", + "value": "{{payerfsp}}" + }, + { + "key": "FSPIOP-Destination", + "type": "text", + "value": "{{payeefsp}}" + } + ], + "url": { + "raw": "{{HOST_QUOTING_SERVICE}}/quotes/482f5eb4-67b6-####-9737-c77b0@$4706c", + "host": [ + "{{HOST_QUOTING_SERVICE}}" + ], + "path": [ + "quotes", + "482f5eb4-67b6-" + ], + "hash": "###-9737-c77b0@$4706c" + }, + "description": "The HTTP request GET /quotes/ is used to get information regarding an earlier created or requested quote. The in the URI should contain the quoteId that was used for the creation of the quote." + }, + "response": [] + }, + { + "name": "202- Non-existent ID-1178", + "event": [ + { + "listen": "test", + "script": { + "id": "aa07986c-5b41-42d6-9223-157fd4d99a67", + "exec": [ + "pm.test(\"Status code is 202\", function () {", + " pm.response.to.have.status(202);", + "});", + "", + "", + "// FROM API Spec: 3205 - Quote ID not found -\tProvided Quote ID was not found in the server.", + "setTimeout(function () {", + " pm.sendRequest(pm.environment.get(\"HOST_SIMULATOR\")+\"/payerfsp/callbacks/482f5ea4-67b6-431a-9737-c77b0123706d\", function (err, response) {", + " if(response.responseSize === 0) {", + " ", + " pm.test(\"Response condition is null\", function () {", + " pm.expect(response.responseSize).equal(0);", + " });", + " ", + " ", + " } else {", + " pm.test(\"Quote FAILED\", function () {", + " throw new Error('received response');", + " });", + " postman.setNextRequest(null);", + " }", + " ", + " });", + "}, 3000);", + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/vnd.interoperability.quotes+json;version=1" + }, + { + "key": "Content-Type", + "value": "application/vnd.interoperability.quotes+json;version=1.0" + }, + { + "key": "Date", + "value": "{{quoteDate}}" + }, + { + "key": "FSPIOP-Source", + "type": "text", + "value": "{{payerfsp}}" + }, + { + "key": "FSPIOP-Destination", + "type": "text", + "value": "{{payeefsp}}" + } + ], + "url": { + "raw": "{{HOST_QUOTING_SERVICE}}/quotes/482f5ea4-67b6-431a-9737-c77b0123706d", + "host": [ + "{{HOST_QUOTING_SERVICE}}" + ], + "path": [ + "quotes", + "482f5ea4-67b6-431a-9737-c77b0123706d" + ] + } + }, + "response": [] + } + ], + "protocolProfileBehavior": {}, + "_postman_isSubFolder": true + }, + { + "name": "POST", + "item": [ + { + "name": "RC 400 - EC 3102 Missing mandatory element - empty quote id", + "event": [ + { + "listen": "prerequest", + "script": { + "id": "887e4721-3923-41bd-bf8a-3d0cd5eed8ee", + "exec": [ + " ", + " var uuid = require('uuid');", + " var generatedUUID = uuid.v4();", + " pm.environment.set('quoteId2', generatedUUID);", + "", + "", + " pm.environment.set('quoteDate', (new Date()).toUTCString());", + "" + ], + "type": "text/javascript" + } + }, + { + "listen": "test", + "script": { + "id": "095c973b-3b61-453c-992c-21a78b1066dc", + "exec": [ + "pm.test(\"Status code is 400\", function () {", + " pm.response.to.have.status(400);", + "});", + "", + "var jsonData = pm.response.json();", + " ", + "pm.test(\"Check Missing mandatory element - QuoteId\", function () {", + " pm.expect(jsonData.errorInformation.errorDescription).to.include('Missing mandatory element ');", + "}); ", + " ", + "pm.test(\"Check Error code 3102\", function () {", + " pm.expect(jsonData.errorInformation.errorCode).to.eql('3102');", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Accept", + "value": "application/vnd.interoperability.quotes+json;version=1" + }, + { + "key": "Content-Type", + "name": "Content-Type", + "value": "application/vnd.interoperability.quotes+json;version=1.0", + "type": "text" + }, + { + "key": "Date", + "value": "{{quoteDate}}" + }, + { + "key": "FSPIOP-Source", + "value": "{{payerfsp}}" + }, + { + "key": "FSPIOP-Destination", + "value": "{{payeefsp}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"quoteId\": \"\",\n \"transactionId\": \"{{quoteId2}}\",\n \"payee\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"MSISDN\",\n \"partyIdentifier\": \"{{receiverMSISDN}}\",\n \"fspId\": \"{{payeefsp}}\"\n }\n },\n \"payer\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"MSISDN\",\n \"partyIdentifier\": \"27713803905\",\n \"fspId\": \"{{payerfsp}}\"\n },\n \"personalInfo\": {\n \"complexName\": {\n \"firstName\": \"Mats\",\n \"lastName\": \"Hagman\"\n },\n \"dateOfBirth\": \"1983-10-25\"\n }\n },\n \"amountType\": \"SEND\",\n \"amount\": {\n \"amount\": \"15\" ,\n \"currency\": \"XOF\"\n },\n \"transactionType\": {\n \"scenario\": \"TRANSFER\",\n \"initiator\": \"PAYER\",\n \"initiatorType\": \"CONSUMER\"\n },\n \"note\": \"hej\"\n}" + }, + "url": { + "raw": "{{HOST_QUOTING_SERVICE}}/quotes", + "host": [ + "{{HOST_QUOTING_SERVICE}}" + ], + "path": [ + "quotes" + ] + } + }, + "response": [] + }, + { + "name": "RC 406 - EC 3001 - Unacceptable version", + "event": [ + { + "listen": "prerequest", + "script": { + "id": "887e4721-3923-41bd-bf8a-3d0cd5eed8ee", + "exec": [ + "if (pm.environment.get('CONFIG_GENERATE_NEW_TRANSFER_UUID_ON_PREPARE') === 'true') {", + " var uuid = require('uuid');", + " var generatedUUID = uuid.v4();", + " pm.environment.set('quoteId2', generatedUUID);", + "}", + "", + "if (pm.environment.get('CONFIG_GENERATE_NEW_PREPARE_DATE') === 'true') {", + " pm.environment.set('quoteDate', (new Date()).toUTCString());", + "}" + ], + "type": "text/javascript" + } + }, + { + "listen": "test", + "script": { + "id": "095c973b-3b61-453c-992c-21a78b1066dc", + "exec": [ + "pm.test(\"Status code is 406\", function () {", + " pm.response.to.have.status(406);", + "});", + "", + "var jsonData = pm.response.json();", + " ", + "pm.test(\"Check Unacceptable version requested\", function () {", + " pm.expect(jsonData.errorInformation.errorDescription).to.include('Unacceptable version requested');", + "}); ", + " ", + "pm.test(\"Check Error code 3001\", function () {", + " pm.expect(jsonData.errorInformation.errorCode).to.eql('3001');", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Accept", + "value": "application/vnd.interoperability.quotes+json;version=5000" + }, + { + "key": "Content-Type", + "name": "Content-Type", + "type": "text", + "value": "application/vnd.interoperability.quotes+json;version=5000.0" + }, + { + "key": "Date", + "value": "{{quoteDate}}" + }, + { + "key": "FSPIOP-Source", + "value": "{{payerfsp}}" + }, + { + "key": "FSPIOP-Destination", + "value": "{{payeefsp}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"quoteId\": \"{{quoteId2}}\",\n \"transactionId\": \"{{quoteId2}}\",\n \"payee\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"MSISDN\",\n \"partyIdentifier\": \"{{receiverMSISDN}}\",\n \"fspId\": \"{{payeefsp}}\"\n }\n },\n \"payer\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"MSISDN\",\n \"partyIdentifier\": \"27713803905\",\n \"fspId\": \"{{payerfsp}}\"\n },\n \"personalInfo\": {\n \"complexName\": {\n \"firstName\": \"Mats\",\n \"lastName\": \"Hagman\"\n },\n \"dateOfBirth\": \"1983-10-25\"\n }\n },\n \"amountType\": \"SEND\",\n \"amount\": {\n \"amount\": \"15\",\n \"currency\": \"XOF\"\n },\n \"transactionType\": {\n \"scenario\": \"TRANSFER\",\n \"initiator\": \"PAYER\",\n \"initiatorType\": \"CONSUMER\"\n },\n \"note\": \"hej\"\n}" + }, + "url": { + "raw": "{{HOST_QUOTING_SERVICE}}/quotes", + "host": [ + "{{HOST_QUOTING_SERVICE}}" + ], + "path": [ + "quotes" + ] + }, + "description": "Expected should be this:\r\n{\r\n \"errorInformation\": {\r\n \"errorCode\": \"3001\",\r\n \"errorDescription\": \"The Client requested an unsupported version, see extension list for supported version(s).\",\r\n \"extensionList\": [\r\n { \"key\": \"1\", \"value\": \"0\" },\r\n { \"key\": \"2\", \"value\": \"1\" },\r\n { \"key\": \"4\", \"value\": \"2\" }\r\n ]\r\n }\r\n}" + }, + "response": [] + }, + { + "name": "RC 400 - EC 3101 Malformed QuoteId", + "event": [ + { + "listen": "prerequest", + "script": { + "id": "887e4721-3923-41bd-bf8a-3d0cd5eed8ee", + "exec": [ + "", + " var uuid = require('uuid');", + " var generatedUUID = uuid.v4();", + " pm.environment.set('quoteId2', generatedUUID);", + "", + "", + "", + " pm.environment.set('quoteDate', (new Date()).toUTCString());", + "" + ], + "type": "text/javascript" + } + }, + { + "listen": "test", + "script": { + "id": "095c973b-3b61-453c-992c-21a78b1066dc", + "exec": [ + "pm.test(\"Status code is 400\", function () {", + " pm.response.to.have.status(400);", + "});", + "", + "", + "var jsonData = pm.response.json();", + " ", + "pm.test(\"Check Malformed syntax - Quote ID\", function () {", + " pm.expect(jsonData.errorInformation.errorDescription).to.include('Malformed syntax');", + "}); ", + " ", + "pm.test(\"Check Error code 3101\", function () {", + " pm.expect(jsonData.errorInformation.errorCode).to.eql('3101');", + "});", + "", + "", + "", + "", + "", + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Accept", + "value": "application/vnd.interoperability.quotes+json;version=1" + }, + { + "key": "Content-Type", + "name": "Content-Type", + "type": "text", + "value": "application/vnd.interoperability.quotes+json;version=1.0" + }, + { + "key": "Date", + "value": "{{quoteDate}}" + }, + { + "key": "FSPIOP-Source", + "value": "{{payerfsp}}" + }, + { + "key": "FSPIOP-Destination", + "value": "{{payeefsp}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"quoteId\": \"@123#59\",\n \"transactionId\": \"{{quoteId2}}\",\n \"payee\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"MSISDN\",\n \"partyIdentifier\": \"{{receiverMSISDN}}\",\n \"fspId\": \"{{payeefsp}}\"\n }\n },\n \"payer\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"MSISDN\",\n \"partyIdentifier\": \"27713803905\",\n \"fspId\": \"{{payerfsp}}\"\n },\n \"personalInfo\": {\n \"complexName\": {\n \"firstName\": \"Mats\",\n \"lastName\": \"Hagman\"\n },\n \"dateOfBirth\": \"1983-10-25\"\n }\n },\n \"amountType\": \"SEND\",\n \"amount\": {\n \"amount\": \"17\",\n \"currency\": \"XOF\"\n },\n \"transactionType\": {\n \"scenario\": \"TRANSFER\",\n \"initiator\": \"PAYER\",\n \"initiatorType\": \"CONSUMER\"\n },\n \"note\": \"hej\"\n}" + }, + "url": { + "raw": "{{HOST_QUOTING_SERVICE}}/quotes", + "host": [ + "{{HOST_QUOTING_SERVICE}}" + ], + "path": [ + "quotes" + ] + }, + "description": "This is the log at simulators: I see 2 error msgs in which one is appropriate \" invalid guid format quoteID\" but the other is abt transfer expirty date.. which I do not understand.\n\n[d1741-simulator-85448cd97d-jbc74] 2019-08-29T21:28:51.026Z - info: L1p-Trace-Id=undefined - Method: post Path: /payeefsp/quotes Query: {} \n[d1741-simulator-85448cd97d-jbc74] 2019-08-29T21:28:51.026Z - info: L1p-Trace-Id=undefined - Headers: {\"host\":\"dev1-simulator.mojaloop.live\",\"connection\":\"close\",\"x-request-id\":\"b3c628cbc0b801c12e0901d6a4db76b4\",\"x-real-ip\":\"10.1.2.185\",\"x-forwarded-for\":\"10.1.2.185\",\"x-forwarded-host\":\"dev1-simulator.mojaloop.live\",\"x-forwarded-port\":\"80\",\"x-forwarded-proto\":\"http\",\"x-original-uri\":\"/payeefsp/quotes\",\"x-scheme\":\"http\",\"content-length\":\"546\",\"content-type\":\"application/vnd.interoperability.quotes+json;version=1.0\",\"date\":\"Thu, 29 Aug 2019 21:28:51 GMT\",\"fspiop-source\":\"payerfsp\",\"fspiop-destination\":\"payeefsp\",\"accept\":\"application/vnd.interoperability.quotes+json;version=1\",\"user-agent\":\"node-fetch/1.0 (+https://github.com/bitinn/node-fetch)\",\"accept-encoding\":\"gzip,deflate\"} \n[d1741-simulator-85448cd97d-jbc74] 2019-08-29T21:28:51.029Z - info: L1p-Trace-Id=undefined - Response: ValidationError: child \"@ Quote Id must be in a valid GUID format. @\" fails because [\"@ Quote Id must be in a valid GUID format. @\" must be a valid GUID] \n[d1741-simulator-85448cd97d-jbc74] 2019-08-29T21:28:51.044Z - info: L1p-Trace-Id=undefined - Method: put Path: /payerfsp/quotes/@123 Query: {} \n[d1741-simulator-85448cd97d-jbc74] 2019-08-29T21:28:51.045Z - info: L1p-Trace-Id=undefined - Headers: {\"host\":\"dev1-simulator.mojaloop.live\",\"connection\":\"close\",\"x-request-id\":\"368abe999b812644e001df12752be5f8\",\"x-real-ip\":\"10.1.2.185\",\"x-forwarded-for\":\"10.1.2.185\",\"x-forwarded-host\":\"dev1-simulator.mojaloop.live\",\"x-forwarded-port\":\"80\",\"x-forwarded-proto\":\"http\",\"x-original-uri\":\"/payerfsp/quotes/@123\",\"x-scheme\":\"http\",\"content-length\":\"1727\",\"content-type\":\"application/vnd.interoperability.quotes+json;version=1.0\",\"date\":\"Thu, 29 Aug 2019 21:28:51 GMT\",\"fspiop-source\":\"switch\",\"fspiop-destination\":\"payerfsp\",\"fspiop-http-method\":\"PUT\",\"user-agent\":\"axios/0.19.0\"} \n[d1741-simulator-85448cd97d-jbc74] 2019-08-29T21:28:51.048Z - info: L1p-Trace-Id=undefined - Response: ValidationError: child \"@ A valid transfer expiry date must be supplied. @\" fails because [\"@ A valid transfer expiry date must be supplied. @\" is required]" + }, + "response": [] + }, + { + "name": "RC 400 - EC 3101 Malformed TransactionId", + "event": [ + { + "listen": "prerequest", + "script": { + "id": "887e4721-3923-41bd-bf8a-3d0cd5eed8ee", + "exec": [ + "if (pm.environment.get('CONFIG_GENERATE_NEW_TRANSFER_UUID_ON_PREPARE') === 'true') {", + " var uuid = require('uuid');", + " var generatedUUID = uuid.v4();", + " pm.environment.set('quoteId2', generatedUUID);", + "}", + "", + "if (pm.environment.get('CONFIG_GENERATE_NEW_PREPARE_DATE') === 'true') {", + " pm.environment.set('quoteDate', (new Date()).toUTCString());", + "}" + ], + "type": "text/javascript" + } + }, + { + "listen": "test", + "script": { + "id": "095c973b-3b61-453c-992c-21a78b1066dc", + "exec": [ + "pm.test(\"Status code is 400\", function () {", + " pm.response.to.have.status(400);", + "});", + "", + "", + "var jsonData = pm.response.json();", + " ", + "pm.test(\"Check Malformed syntax - Transaction ID\", function () {", + " pm.expect(jsonData.errorInformation.errorDescription).to.include('Malformed syntax');", + "}); ", + " ", + "pm.test(\"Check Error code 3101\", function () {", + " pm.expect(jsonData.errorInformation.errorCode).to.eql('3101');", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Accept", + "value": "application/vnd.interoperability.quotes+json;version=1" + }, + { + "key": "Content-Type", + "name": "Content-Type", + "type": "text", + "value": "application/vnd.interoperability.quotes+json;version=1.0" + }, + { + "key": "Date", + "value": "{{quoteDate}}" + }, + { + "key": "FSPIOP-Source", + "value": "{{payerfsp}}" + }, + { + "key": "FSPIOP-Destination", + "value": "{{payeefsp}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"quoteId\": \"{{quoteId2}}\",\n \"transactionId\": \"@123\",\n \"payee\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"MSISDN\",\n \"partyIdentifier\": \"{{receiverMSISDN}}\",\n \"fspId\": \"{{payeefsp}}\"\n }\n },\n \"payer\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"MSISDN\",\n \"partyIdentifier\": \"27713803905\",\n \"fspId\": \"{{payerfsp}}\"\n },\n \"personalInfo\": {\n \"complexName\": {\n \"firstName\": \"Mats\",\n \"lastName\": \"Hagman\"\n },\n \"dateOfBirth\": \"1983-10-25\"\n }\n },\n \"amountType\": \"SEND\",\n \"amount\": {\n \"amount\": \"17\",\n \"currency\": \"XOF\"\n },\n \"transactionType\": {\n \"scenario\": \"TRANSFER\",\n \"initiator\": \"PAYER\",\n \"initiatorType\": \"CONSUMER\"\n },\n \"note\": \"hej\"\n}" + }, + "url": { + "raw": "{{HOST_QUOTING_SERVICE}}/quotes", + "host": [ + "{{HOST_QUOTING_SERVICE}}" + ], + "path": [ + "quotes" + ] + } + }, + "response": [] + }, + { + "name": "RC 400 - Error 3101 Malformed Syntax - invalid payeePartyIdType", + "event": [ + { + "listen": "prerequest", + "script": { + "id": "887e4721-3923-41bd-bf8a-3d0cd5eed8ee", + "exec": [ + "if (pm.environment.get('CONFIG_GENERATE_NEW_TRANSFER_UUID_ON_PREPARE') === 'true') {", + " var uuid = require('uuid');", + " var generatedUUID = uuid.v4();", + " pm.environment.set('quoteId2', generatedUUID);", + "}", + "", + "if (pm.environment.get('CONFIG_GENERATE_NEW_PREPARE_DATE') === 'true') {", + " pm.environment.set('quoteDate', (new Date()).toUTCString());", + "}" + ], + "type": "text/javascript" + } + }, + { + "listen": "test", + "script": { + "id": "095c973b-3b61-453c-992c-21a78b1066dc", + "exec": [ + "pm.test(\"Status code is 400\", function () {", + " pm.response.to.have.status(400);", + "});", + "var jsonData = pm.response.json();", + " ", + "pm.test(\"Check Malformed syntax - PayeePartyIdTypeEnum\", function () {", + " pm.expect(jsonData.errorInformation.errorDescription).to.include('PartyIdTypeEnum');", + "}); ", + " ", + "pm.test(\"Check Error code 3101\", function () {", + " pm.expect(jsonData.errorInformation.errorCode).to.eql('3101');", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Accept", + "value": "application/vnd.interoperability.quotes+json;version=1" + }, + { + "key": "Content-Type", + "name": "Content-Type", + "type": "text", + "value": "application/vnd.interoperability.quotes+json;version=1.0" + }, + { + "key": "Date", + "value": "{{quoteDate}}" + }, + { + "key": "FSPIOP-Source", + "value": "{{payerfsp}}" + }, + { + "key": "FSPIOP-Destination", + "value": "{{payeefsp}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"quoteId\": \"{{quoteId2}}\",\n \"transactionId\": \"{{quoteId2}}\",\n \"payee\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"CELLNM\",\n \"partyIdentifier\": \"{{receiverMSISDN}}\",\n \"fspId\": \"{{payeefsp}}\"\n }\n },\n \"payer\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"MSISDN\",\n \"partyIdentifier\": \"27713803905\",\n \"fspId\": \"{{payerfsp}}\"\n },\n \"personalInfo\": {\n \"complexName\": {\n \"firstName\": \"Mats\",\n \"lastName\": \"Hagman\"\n },\n \"dateOfBirth\": \"1983-10-25\"\n }\n },\n \"amountType\": \"SEND\",\n \"amount\": {\n \"amount\": \"17\",\n \"currency\": \"XOF\"\n },\n \"transactionType\": {\n \"scenario\": \"TRANSFER\",\n \"initiator\": \"PAYER\",\n \"initiatorType\": \"CONSUMER\"\n },\n \"note\": \"hej\"\n}" + }, + "url": { + "raw": "{{HOST_QUOTING_SERVICE}}/quotes", + "host": [ + "{{HOST_QUOTING_SERVICE}}" + ], + "path": [ + "quotes" + ] + } + }, + "response": [] + }, + { + "name": "RC 400 - Error 3101 Malformed Syntax - invalid payerPartyIdType", + "event": [ + { + "listen": "prerequest", + "script": { + "id": "887e4721-3923-41bd-bf8a-3d0cd5eed8ee", + "exec": [ + "if (pm.environment.get('CONFIG_GENERATE_NEW_TRANSFER_UUID_ON_PREPARE') === 'true') {", + " var uuid = require('uuid');", + " var generatedUUID = uuid.v4();", + " pm.environment.set('quoteId2', generatedUUID);", + "}", + "", + "if (pm.environment.get('CONFIG_GENERATE_NEW_PREPARE_DATE') === 'true') {", + " pm.environment.set('quoteDate', (new Date()).toUTCString());", + "}" + ], + "type": "text/javascript" + } + }, + { + "listen": "test", + "script": { + "id": "095c973b-3b61-453c-992c-21a78b1066dc", + "exec": [ + "pm.test(\"Status code is 400\", function () {", + " pm.response.to.have.status(400);", + "});", + "", + "var jsonData = pm.response.json();", + " ", + "pm.test(\"Check Malformed syntax - PayerPartyIdTypeEnum\", function () {", + " pm.expect(jsonData.errorInformation.errorDescription).to.include('PartyIdTypeEnum');", + "}); ", + " ", + "pm.test(\"Check Error code 3101\", function () {", + " pm.expect(jsonData.errorInformation.errorCode).to.eql('3101');", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Accept", + "value": "application/vnd.interoperability.quotes+json;version=1" + }, + { + "key": "Content-Type", + "name": "Content-Type", + "type": "text", + "value": "application/vnd.interoperability.quotes+json;version=1.0" + }, + { + "key": "Date", + "value": "{{quoteDate}}" + }, + { + "key": "FSPIOP-Source", + "value": "{{payerfsp}}" + }, + { + "key": "FSPIOP-Destination", + "value": "{{payeefsp}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"quoteId\": \"{{quoteId2}}\",\n \"transactionId\": \"{{quoteId2}}\",\n \"payee\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"MSISDN\",\n \"partyIdentifier\": \"{{receiverMSISDN}}\",\n \"fspId\": \"{{payeefsp}}\"\n }\n },\n \"payer\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"CELLSD\",\n \"partyIdentifier\": \"27713803905\",\n \"fspId\": \"{{payerfsp}}\"\n },\n \"personalInfo\": {\n \"complexName\": {\n \"firstName\": \"Mats\",\n \"lastName\": \"Hagman\"\n },\n \"dateOfBirth\": \"1983-10-25\"\n }\n },\n \"amountType\": \"SEND\",\n \"amount\": {\n \"amount\": \"19\",\n \"currency\": \"XOF\"\n },\n \"transactionType\": {\n \"scenario\": \"TRANSFER\",\n \"initiator\": \"PAYER\",\n \"initiatorType\": \"CONSUMER\"\n },\n \"note\": \"hej\"\n}" + }, + "url": { + "raw": "{{HOST_QUOTING_SERVICE}}/quotes", + "host": [ + "{{HOST_QUOTING_SERVICE}}" + ], + "path": [ + "quotes" + ] + } + }, + "response": [] + }, + { + "name": "RC 400 - Error 3102 Missing mandatory element - QuoteId", + "event": [ + { + "listen": "prerequest", + "script": { + "id": "887e4721-3923-41bd-bf8a-3d0cd5eed8ee", + "exec": [ + "if (pm.environment.get('CONFIG_GENERATE_NEW_TRANSFER_UUID_ON_PREPARE') === 'true') {", + " var uuid = require('uuid');", + " var generatedUUID = uuid.v4();", + " pm.environment.set('quoteId2', generatedUUID);", + "}", + "", + "if (pm.environment.get('CONFIG_GENERATE_NEW_PREPARE_DATE') === 'true') {", + " pm.environment.set('quoteDate', (new Date()).toUTCString());", + "}" + ], + "type": "text/javascript" + } + }, + { + "listen": "test", + "script": { + "id": "095c973b-3b61-453c-992c-21a78b1066dc", + "exec": [ + "pm.test(\"Status code is 400\", function () {", + " pm.response.to.have.status(400);", + "});", + "", + "var jsonData = pm.response.json();", + " ", + "pm.test(\"Check Missing mandatory element - QuoteID\", function () {", + " pm.expect(jsonData.errorInformation.errorDescription).to.include('Missing mandatory element');", + "}); ", + " ", + "pm.test(\"Check Error code 3102\", function () {", + " pm.expect(jsonData.errorInformation.errorCode).to.eql('3102');", + "});", + "", + "", + "", + "", + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Accept", + "value": "application/vnd.interoperability.quotes+json;version=1" + }, + { + "key": "Content-Type", + "name": "Content-Type", + "type": "text", + "value": "application/vnd.interoperability.quotes+json;version=1.0" + }, + { + "key": "Date", + "value": "{{quoteDate}}" + }, + { + "key": "FSPIOP-Source", + "value": "{{payerfsp}}" + }, + { + "key": "FSPIOP-Destination", + "value": "{{payeefsp}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \n \"transactionId\": \"{{quoteId2}}\",\n \"payee\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"MSISDN\",\n \"partyIdentifier\": \"{{receiverMSISDN}}\",\n \"fspId\": \"{{payeefsp}}\"\n }\n },\n \"payer\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"MSISDN\",\n \"partyIdentifier\": \"27713803905\",\n \"fspId\": \"{{payerfsp}}\"\n },\n \"personalInfo\": {\n \"complexName\": {\n \"firstName\": \"Mats\",\n \"lastName\": \"Hagman\"\n },\n \"dateOfBirth\": \"1983-10-25\"\n }\n },\n \"amountType\": \"SEND\",\n \"amount\": {\n \"amount\": \"17\",\n \"currency\": \"XOF\"\n },\n \"transactionType\": {\n \"scenario\": \"TRANSFER\",\n \"initiator\": \"PAYER\",\n \"initiatorType\": \"CONSUMER\"\n },\n \"note\": \"hej\"\n}" + }, + "url": { + "raw": "{{HOST_QUOTING_SERVICE}}/quotes", + "host": [ + "{{HOST_QUOTING_SERVICE}}" + ], + "path": [ + "quotes" + ] + } + }, + "response": [] + }, + { + "name": "RC 400 - Error 3102 Missing mandatory element - TransactionId", + "event": [ + { + "listen": "prerequest", + "script": { + "id": "887e4721-3923-41bd-bf8a-3d0cd5eed8ee", + "exec": [ + "if (pm.environment.get('CONFIG_GENERATE_NEW_TRANSFER_UUID_ON_PREPARE') === 'true') {", + " var uuid = require('uuid');", + " var generatedUUID = uuid.v4();", + " pm.environment.set('quoteId2', generatedUUID);", + "}", + "", + "if (pm.environment.get('CONFIG_GENERATE_NEW_PREPARE_DATE') === 'true') {", + " pm.environment.set('quoteDate', (new Date()).toUTCString());", + "}" + ], + "type": "text/javascript" + } + }, + { + "listen": "test", + "script": { + "id": "095c973b-3b61-453c-992c-21a78b1066dc", + "exec": [ + "pm.test(\"Status code is 400\", function () {", + " pm.response.to.have.status(400);", + "});", + "", + "var jsonData = pm.response.json();", + " ", + "pm.test(\"Check Missing mandatory element - TransactionID\", function () {", + " pm.expect(jsonData.errorInformation.errorDescription).to.include('Missing mandatory element');", + "}); ", + " ", + "pm.test(\"Check Error code 3102\", function () {", + " pm.expect(jsonData.errorInformation.errorCode).to.eql('3102');", + "});", + "", + "", + "", + "", + "", + "", + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Accept", + "value": "application/vnd.interoperability.quotes+json;version=1" + }, + { + "key": "Content-Type", + "name": "Content-Type", + "type": "text", + "value": "application/vnd.interoperability.quotes+json;version=1.0" + }, + { + "key": "Date", + "value": "{{quoteDate}}" + }, + { + "key": "FSPIOP-Source", + "value": "{{payerfsp}}" + }, + { + "key": "FSPIOP-Destination", + "value": "{{payeefsp}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"quoteId\": \"{{quoteId2}}\",\n \n \"payee\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"MSISDN\",\n \"partyIdentifier\": \"{{receiverMSISDN}}\",\n \"fspId\": \"{{payeefsp}}\"\n }\n },\n \"payer\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"MSISDN\",\n \"partyIdentifier\": \"27713803905\",\n \"fspId\": \"{{payerfsp}}\"\n },\n \"personalInfo\": {\n \"complexName\": {\n \"firstName\": \"Mats\",\n \"lastName\": \"Hagman\"\n },\n \"dateOfBirth\": \"1983-10-25\"\n }\n },\n \"amountType\": \"SEND\",\n \"amount\": {\n \"amount\": \"17\",\n \"currency\": \"XOF\"\n },\n \"transactionType\": {\n \"scenario\": \"TRANSFER\",\n \"initiator\": \"PAYER\",\n \"initiatorType\": \"CONSUMER\"\n },\n \"note\": \"hej\"\n}" + }, + "url": { + "raw": "{{HOST_QUOTING_SERVICE}}/quotes", + "host": [ + "{{HOST_QUOTING_SERVICE}}" + ], + "path": [ + "quotes" + ] + } + }, + "response": [] + }, + { + "name": "RC 400 - Error 3102 Missing mandatory element - payeePartyIdType", + "event": [ + { + "listen": "prerequest", + "script": { + "id": "887e4721-3923-41bd-bf8a-3d0cd5eed8ee", + "exec": [ + "if (pm.environment.get('CONFIG_GENERATE_NEW_TRANSFER_UUID_ON_PREPARE') === 'true') {", + " var uuid = require('uuid');", + " var generatedUUID = uuid.v4();", + " pm.environment.set('quoteId2', generatedUUID);", + "}", + "", + "if (pm.environment.get('CONFIG_GENERATE_NEW_PREPARE_DATE') === 'true') {", + " pm.environment.set('quoteDate', (new Date()).toUTCString());", + "}" + ], + "type": "text/javascript" + } + }, + { + "listen": "test", + "script": { + "id": "095c973b-3b61-453c-992c-21a78b1066dc", + "exec": [ + "pm.test(\"Status code is 400\", function () {", + " pm.response.to.have.status(400);", + "});", + "", + "var jsonData = pm.response.json();", + " ", + "pm.test(\"Check Missing mandatory element - PartyIdTypeEnum\", function () {", + " pm.expect(jsonData.errorInformation.errorDescription).to.include('Missing mandatory element');", + "}); ", + " ", + "pm.test(\"Check Error code 3102\", function () {", + " pm.expect(jsonData.errorInformation.errorCode).to.eql('3102');", + "});", + "", + "", + "", + "", + "", + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Accept", + "value": "application/vnd.interoperability.quotes+json;version=1" + }, + { + "key": "Content-Type", + "name": "Content-Type", + "type": "text", + "value": "application/vnd.interoperability.quotes+json;version=1.0" + }, + { + "key": "Date", + "value": "{{quoteDate}}" + }, + { + "key": "FSPIOP-Source", + "value": "{{payerfsp}}" + }, + { + "key": "FSPIOP-Destination", + "value": "{{payeefsp}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"quoteId\": \"{{quoteId2}}\",\n \"transactionId\": \"{{quoteId2}}\",\n \"payee\": {\n \"partyIdInfo\": {\n \n \"partyIdentifier\": \"{{receiverMSISDN}}\",\n \"fspId\": \"{{payeefsp}}\"\n }\n },\n \"payer\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"MSISDN\",\n \"partyIdentifier\": \"27713803905\",\n \"fspId\": \"{{payerfsp}}\"\n },\n \"personalInfo\": {\n \"complexName\": {\n \"firstName\": \"Mats\",\n \"lastName\": \"Hagman\"\n },\n \"dateOfBirth\": \"1983-10-25\"\n }\n },\n \"amountType\": \"SEND\",\n \"amount\": {\n \"amount\": \"17\",\n \"currency\": \"XOF\"\n },\n \"transactionType\": {\n \"scenario\": \"TRANSFER\",\n \"initiator\": \"PAYER\",\n \"initiatorType\": \"CONSUMER\"\n },\n \"note\": \"hej\"\n}" + }, + "url": { + "raw": "{{HOST_QUOTING_SERVICE}}/quotes", + "host": [ + "{{HOST_QUOTING_SERVICE}}" + ], + "path": [ + "quotes" + ] + } + }, + "response": [] + }, + { + "name": "RC 400 - Error 3102 Missing mandatory element - payeePartyIdentifier", + "event": [ + { + "listen": "prerequest", + "script": { + "id": "887e4721-3923-41bd-bf8a-3d0cd5eed8ee", + "exec": [ + "if (pm.environment.get('CONFIG_GENERATE_NEW_TRANSFER_UUID_ON_PREPARE') === 'true') {", + " var uuid = require('uuid');", + " var generatedUUID = uuid.v4();", + " pm.environment.set('quoteId2', generatedUUID);", + "}", + "", + "if (pm.environment.get('CONFIG_GENERATE_NEW_PREPARE_DATE') === 'true') {", + " pm.environment.set('quoteDate', (new Date()).toUTCString());", + "}" + ], + "type": "text/javascript" + } + }, + { + "listen": "test", + "script": { + "id": "095c973b-3b61-453c-992c-21a78b1066dc", + "exec": [ + "pm.test(\"Status code is 400\", function () {", + " pm.response.to.have.status(400);", + "});", + "", + "var jsonData = pm.response.json();", + " ", + "pm.test(\"Check Missing mandatory element - PartyIdTypeEnum\", function () {", + " pm.expect(jsonData.errorInformation.errorDescription).to.include('Missing mandatory element');", + "}); ", + " ", + "pm.test(\"Check Error code 3102\", function () {", + " pm.expect(jsonData.errorInformation.errorCode).to.eql('3102');", + "});", + "", + "", + "", + "", + "", + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Accept", + "value": "application/vnd.interoperability.quotes+json;version=1" + }, + { + "key": "Content-Type", + "name": "Content-Type", + "type": "text", + "value": "application/vnd.interoperability.quotes+json;version=1.0" + }, + { + "key": "Date", + "value": "{{quoteDate}}" + }, + { + "key": "FSPIOP-Source", + "value": "{{payerfsp}}" + }, + { + "key": "FSPIOP-Destination", + "value": "{{payeefsp}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"quoteId\": \"{{quoteId2}}\",\n \"transactionId\": \"{{quoteId2}}\",\n \"payee\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"MSISDN\",\n \n \"fspId\": \"{{payeefsp}}\"\n }\n },\n \"payer\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"MSISDN\",\n \"partyIdentifier\": \"27713803905\",\n \"fspId\": \"{{payerfsp}}\"\n },\n \"personalInfo\": {\n \"complexName\": {\n \"firstName\": \"Mats\",\n \"lastName\": \"Hagman\"\n },\n \"dateOfBirth\": \"1983-10-25\"\n }\n },\n \"amountType\": \"SEND\",\n \"amount\": {\n \"amount\": \"18\",\n \"currency\": \"XOF\"\n },\n \"transactionType\": {\n \"scenario\": \"TRANSFER\",\n \"initiator\": \"PAYER\",\n \"initiatorType\": \"CONSUMER\"\n },\n \"note\": \"hej\"\n}" + }, + "url": { + "raw": "{{HOST_QUOTING_SERVICE}}/quotes", + "host": [ + "{{HOST_QUOTING_SERVICE}}" + ], + "path": [ + "quotes" + ] + } + }, + "response": [] + }, + { + "name": "RC 400 - Error 3102 Missing mandatory element - payerPartyIdType", + "event": [ + { + "listen": "prerequest", + "script": { + "id": "887e4721-3923-41bd-bf8a-3d0cd5eed8ee", + "exec": [ + "if (pm.environment.get('CONFIG_GENERATE_NEW_TRANSFER_UUID_ON_PREPARE') === 'true') {", + " var uuid = require('uuid');", + " var generatedUUID = uuid.v4();", + " pm.environment.set('quoteId2', generatedUUID);", + "}", + "", + "if (pm.environment.get('CONFIG_GENERATE_NEW_PREPARE_DATE') === 'true') {", + " pm.environment.set('quoteDate', (new Date()).toUTCString());", + "}" + ], + "type": "text/javascript" + } + }, + { + "listen": "test", + "script": { + "id": "095c973b-3b61-453c-992c-21a78b1066dc", + "exec": [ + "pm.test(\"Status code is 400\", function () {", + " pm.response.to.have.status(400);", + "});", + "", + "var jsonData = pm.response.json();", + " ", + "pm.test(\"Check Missing mandatory element - PartyIdTypeEnum\", function () {", + " pm.expect(jsonData.errorInformation.errorDescription).to.include('Missing mandatory element');", + "}); ", + " ", + "pm.test(\"Check Error code 3102\", function () {", + " pm.expect(jsonData.errorInformation.errorCode).to.eql('3102');", + "});", + "", + "", + "", + "", + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Accept", + "value": "application/vnd.interoperability.quotes+json;version=1" + }, + { + "key": "Content-Type", + "name": "Content-Type", + "type": "text", + "value": "application/vnd.interoperability.quotes+json;version=1.0" + }, + { + "key": "Date", + "value": "{{quoteDate}}" + }, + { + "key": "FSPIOP-Source", + "value": "{{payerfsp}}" + }, + { + "key": "FSPIOP-Destination", + "value": "{{payeefsp}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"quoteId\": \"{{quoteId2}}\",\n \"transactionId\": \"{{quoteId2}}\",\n \"payee\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"MSISDN\",\n \"partyIdentifier\": \"{{receiverMSISDN}}\",\n \"fspId\": \"{{payeefsp}}\"\n }\n },\n \"payer\": {\n \"partyIdInfo\": {\n \n \"partyIdentifier\": \"27713803905\",\n \"fspId\": \"{{payerfsp}}\"\n },\n \"personalInfo\": {\n \"complexName\": {\n \"firstName\": \"Mats\",\n \"lastName\": \"Hagman\"\n },\n \"dateOfBirth\": \"1983-10-25\"\n }\n },\n \"amountType\": \"SEND\",\n \"amount\": {\n \"amount\": \"19\",\n \"currency\": \"XOF\"\n },\n \"transactionType\": {\n \"scenario\": \"TRANSFER\",\n \"initiator\": \"PAYER\",\n \"initiatorType\": \"CONSUMER\"\n },\n \"note\": \"hej\"\n}" + }, + "url": { + "raw": "{{HOST_QUOTING_SERVICE}}/quotes", + "host": [ + "{{HOST_QUOTING_SERVICE}}" + ], + "path": [ + "quotes" + ] + } + }, + "response": [] + }, + { + "name": "RC 400 - Error 3102 Missing mandatory element - payerPartyIdentifier", + "event": [ + { + "listen": "prerequest", + "script": { + "id": "887e4721-3923-41bd-bf8a-3d0cd5eed8ee", + "exec": [ + "if (pm.environment.get('CONFIG_GENERATE_NEW_TRANSFER_UUID_ON_PREPARE') === 'true') {", + " var uuid = require('uuid');", + " var generatedUUID = uuid.v4();", + " pm.environment.set('quoteId2', generatedUUID);", + "}", + "", + "if (pm.environment.get('CONFIG_GENERATE_NEW_PREPARE_DATE') === 'true') {", + " pm.environment.set('quoteDate', (new Date()).toUTCString());", + "}" + ], + "type": "text/javascript" + } + }, + { + "listen": "test", + "script": { + "id": "095c973b-3b61-453c-992c-21a78b1066dc", + "exec": [ + "pm.test(\"Status code is 400\", function () {", + " pm.response.to.have.status(400);", + "});", + "", + "var jsonData = pm.response.json();", + " ", + "pm.test(\"Check Missing mandatory element - PartyIdTypeEnum\", function () {", + " pm.expect(jsonData.errorInformation.errorDescription).to.include('Missing mandatory element');", + "}); ", + " ", + "pm.test(\"Check Error code 3102\", function () {", + " pm.expect(jsonData.errorInformation.errorCode).to.eql('3102');", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Accept", + "value": "application/vnd.interoperability.quotes+json;version=1" + }, + { + "key": "Content-Type", + "name": "Content-Type", + "type": "text", + "value": "application/vnd.interoperability.quotes+json;version=1.0" + }, + { + "key": "Date", + "value": "{{quoteDate}}" + }, + { + "key": "FSPIOP-Source", + "value": "{{payerfsp}}" + }, + { + "key": "FSPIOP-Destination", + "value": "{{payeefsp}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"quoteId\": \"{{quoteId2}}\",\n \"transactionId\": \"{{quoteId2}}\",\n \"payee\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"MSISDN\",\n \"partyIdentifier\": \"{{receiverMSISDN}}\",\n \"fspId\": \"{{payeefsp}}\"\n }\n },\n \"payer\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"MSISDN\",\n \n \"fspId\": \"{{payerfsp}}\"\n },\n \"personalInfo\": {\n \"complexName\": {\n \"firstName\": \"Mats\",\n \"lastName\": \"Hagman\"\n },\n \"dateOfBirth\": \"1983-10-25\"\n }\n },\n \"amountType\": \"SEND\",\n \"amount\": {\n \"amount\": \"19\",\n \"currency\": \"XOF\"\n },\n \"transactionType\": {\n \"scenario\": \"TRANSFER\",\n \"initiator\": \"PAYER\",\n \"initiatorType\": \"CONSUMER\"\n },\n \"note\": \"hej\"\n}" + }, + "url": { + "raw": "{{HOST_QUOTING_SERVICE}}/quotes", + "host": [ + "{{HOST_QUOTING_SERVICE}}" + ], + "path": [ + "quotes" + ] + } + }, + "response": [] + } + ], + "protocolProfileBehavior": {}, + "_postman_isSubFolder": true + } + ], + "description": "Folder for quotes", + "protocolProfileBehavior": {}, + "_postman_isSubFolder": true + } + ], + "description": "Author: Sridevi Miriyala\n\nMojaloop API mainly consists of Participants, Parties, Quotes and Transfers endpoints.\nBulk transfers, transaction requests, transactions, Authorizations, Bulk quotes etc are yet to implement.\n\nThis collection includes the negative test cases of the the four endpoints that validates Headers and Input params.", + "event": [ + { + "listen": "prerequest", + "script": { + "id": "526011ca-4860-4a15-baf6-8698e6bbd3e8", + "type": "text/javascript", + "exec": [ + "" + ] + } + }, + { + "listen": "test", + "script": { + "id": "829c49e7-24b4-40e6-8f65-d11d1b6d47e3", + "type": "text/javascript", + "exec": [ + "" + ] + } + } + ], + "protocolProfileBehavior": {} + } + ], + "event": [ + { + "listen": "prerequest", + "script": { + "id": "0471d644-a46d-4e9d-baeb-4f27fe6023c1", + "type": "text/javascript", + "exec": [ + "pm.environment.set('dateHeader', (new Date()).toUTCString());" + ] + } + }, + { + "listen": "test", + "script": { + "id": "d652122a-fa96-4520-ae30-bb391e5d2c82", + "type": "text/javascript", + "exec": [ + "" + ] + } + } + ], + "protocolProfileBehavior": {} +} \ No newline at end of file diff --git a/OSS-API-Tests.postman_collection.json b/OSS-API-Tests-old.postman_collection.json similarity index 88% rename from OSS-API-Tests.postman_collection.json rename to OSS-API-Tests-old.postman_collection.json index 340e236..8f7bedd 100644 --- a/OSS-API-Tests.postman_collection.json +++ b/OSS-API-Tests-old.postman_collection.json @@ -1,7 +1,7 @@ { "info": { "_postman_id": "974a8a77-74b7-4fc4-9aed-987bdac5a49a", - "name": "OSS-API-Tests", + "name": "OSS-API-Tests-old", "description": "##Author - Sridevi Miriyala\n\n##Description:\nThis section includes testing of the behavior of the API end points including Headers and body params testing for positive and negative paths.\n\nBased on API Definition.docx updated on 2018-03-13 Version 1.0. Note - The API supports a maximum size of 65536 bytes (64 Kilobytes) in the HTTP header.", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" }, @@ -13,7 +13,7 @@ "name": "participants", "item": [ { - "name": "/MSISDN/ID", + "name": "/MSISDN/ID - Moved to New collection", "item": [ { "name": "GET - ParticipantsByTypeAndID", @@ -35,85 +35,85 @@ "", "", "//Check data on payer side", - "setTimeout(function () {", - " pm.sendRequest(pm.environment.get(\"HOST_SIMULATOR\")+\"/payerfsp/callbacks/\"+pm.variables.get(\"pathfinderMSISDN\"), function (err, response) {", + "// setTimeout(function () {", + "// pm.sendRequest(pm.environment.get(\"HOST_SIMULATOR\")+\"/payerfsp/callbacks/\"+pm.variables.get(\"pathfinderMSISDN\"), function (err, response) {", " ", - " if(response.responseSize !== 0) { ", + "// if(response.responseSize !== 0) { ", " ", - " //Checking headers", - " var headers = response.json().headers;", - " pm.test(\"payerfsp fspiop-source is switch\", function () {", - " pm.expect(headers['fspiop-source']).to.eql('switch');", - " });", + "// //Checking headers", + "// var headers = response.json().headers;", + "// pm.test(\"payerfsp fspiop-source is switch\", function () {", + "// pm.expect(headers['fspiop-source']).to.eql('switch');", + "// });", " ", - " pm.test(\"payerfsp fspiop-destination is payerfsp\", function () {", - " pm.expect(headers['fspiop-destination']).to.eql('payerfsp');", - " });", + "// pm.test(\"payerfsp fspiop-destination is payerfsp\", function () {", + "// pm.expect(headers['fspiop-destination']).to.eql('payerfsp');", + "// });", " ", - " pm.test(\"payerfsp content-type should be application/vnd.interoperability.participants+json;version=1.0\", function () {", - " pm.expect(headers['content-type']).to.eql('application/vnd.interoperability.participants+json;version=1.0');", - " });", + "// pm.test(\"payerfsp content-type should be application/vnd.interoperability.participants+json;version=1.0\", function () {", + "// pm.expect(headers['content-type']).to.eql('application/vnd.interoperability.participants+json;version=1.0');", + "// });", " ", - " pm.test(\"payerfsp accept is empty\", function () {", - " pm.expect(headers['accept']).to.eql(undefined);", - " });", + "// pm.test(\"payerfsp accept is empty\", function () {", + "// pm.expect(headers['accept']).to.eql(undefined);", + "// });", " ", " ", " ", - " // //Validate protected header inside Signature", - " // var {signature,protectedHeader} = JSON.parse(headers['fspiop-signature'])", - " // var decodedProtectedHeaders = JSON.parse(atob(protectedHeader))", - " // console.log('decodedProtectedHeaders:',decodedProtectedHeaders)", + "// // //Validate protected header inside Signature", + "// // var {signature,protectedHeader} = JSON.parse(headers['fspiop-signature'])", + "// // var decodedProtectedHeaders = JSON.parse(atob(protectedHeader))", + "// // console.log('decodedProtectedHeaders:',decodedProtectedHeaders)", " ", - " // // pm.test(\"FSPIOP-Signature signature is returned\", function () {", - " // // pm.expect(signature).to.eql(pm.environment.get(\"payeefsp-signature\"));", - " // // });", + "// // // pm.test(\"FSPIOP-Signature signature is returned\", function () {", + "// // // pm.expect(signature).to.eql(pm.environment.get(\"payeefsp-signature\"));", + "// // // });", " ", - " // pm.test(\"FSPIOP-Signature Protected Header alg to be RS256\", function () {", - " // pm.expect(decodedProtectedHeaders['alg']).to.eql('RS256');", - " // });", - " // pm.test(\"FSPIOP-Signature Protected Header FSPIOP-URI to be /participants/MSISDN/\"+pm.environment.get(\"pathfinderMSISDN\"), function () {", - " // pm.expect(decodedProtectedHeaders['FSPIOP-URI']).to.eql('/participants/MSISDN/'+pm.environment.get(\"pathfinderMSISDN\"));", - " // });", + "// // pm.test(\"FSPIOP-Signature Protected Header alg to be RS256\", function () {", + "// // pm.expect(decodedProtectedHeaders['alg']).to.eql('RS256');", + "// // });", + "// // pm.test(\"FSPIOP-Signature Protected Header FSPIOP-URI to be /participants/MSISDN/\"+pm.environment.get(\"pathfinderMSISDN\"), function () {", + "// // pm.expect(decodedProtectedHeaders['FSPIOP-URI']).to.eql('/participants/MSISDN/'+pm.environment.get(\"pathfinderMSISDN\"));", + "// // });", " ", "", - " // pm.test(\"FSPIOP-Signature Protected Header FSPIOP-HTTP-Method to be PUT\", function () {", - " // pm.expect(decodedProtectedHeaders['FSPIOP-HTTP-Method']).to.eql('PUT');", - " // });", - " // pm.test(\"FSPIOP-Signature Protected Header FSPIOP-Source to be switch\", function () {", - " // pm.expect(decodedProtectedHeaders['FSPIOP-Source']).to.eql('switch');", - " // });", - " // pm.test(\"FSPIOP-Signature Protected Header FSPIOP-Destination to be payerfsp\", function () {", - " // pm.expect(decodedProtectedHeaders['FSPIOP-Destination']).to.eql('payerfsp');", - " // });", - " // pm.test(\"FSPIOP-Signature Protected Header Date is present\", function () {", - " // pm.expect(decodedProtectedHeaders['Date']).to.not.eql(undefined);", - " // });", + "// // pm.test(\"FSPIOP-Signature Protected Header FSPIOP-HTTP-Method to be PUT\", function () {", + "// // pm.expect(decodedProtectedHeaders['FSPIOP-HTTP-Method']).to.eql('PUT');", + "// // });", + "// // pm.test(\"FSPIOP-Signature Protected Header FSPIOP-Source to be switch\", function () {", + "// // pm.expect(decodedProtectedHeaders['FSPIOP-Source']).to.eql('switch');", + "// // });", + "// // pm.test(\"FSPIOP-Signature Protected Header FSPIOP-Destination to be payerfsp\", function () {", + "// // pm.expect(decodedProtectedHeaders['FSPIOP-Destination']).to.eql('payerfsp');", + "// // });", + "// // pm.test(\"FSPIOP-Signature Protected Header Date is present\", function () {", + "// // pm.expect(decodedProtectedHeaders['Date']).to.not.eql(undefined);", + "// // });", " ", - " pm.test(\"payerfsp fspiop-uri to be /parties/MSISDN/\"+pm.environment.get(\"pathfinderMSISDN\"), function () {", - " pm.expect(headers['fspiop-uri']).to.eql('/parties/MSISDN/'+pm.environment.get(\"pathfinderMSISDN\"));", - " });", + "// pm.test(\"payerfsp fspiop-uri to be /parties/MSISDN/\"+pm.environment.get(\"pathfinderMSISDN\"), function () {", + "// pm.expect(headers['fspiop-uri']).to.eql('/parties/MSISDN/'+pm.environment.get(\"pathfinderMSISDN\"));", + "// });", " ", - " pm.test(\"payerfsp fspiop-http-method is PUT\", function () {", - " pm.expect(headers['fspiop-http-method']).to.eql('PUT');", - " });", + "// pm.test(\"payerfsp fspiop-http-method is PUT\", function () {", + "// pm.expect(headers['fspiop-http-method']).to.eql('PUT');", + "// });", " ", - " //Checking data", - " var jsonData = response.json().data;", - " pm.test(\"Expected fspid is payeefsp \", function () {", - " pm.expect(jsonData.fspId).to.eql(pm.variables.get(\"payeefsp\"));", - " });", + "// //Checking data", + "// var jsonData = response.json().data;", + "// pm.test(\"Expected fspid is payeefsp \", function () {", + "// pm.expect(jsonData.fspId).to.eql(pm.variables.get(\"payeefsp\"));", + "// });", " ", " ", - " } else {", - " pm.test(\"Parties FAILED - payerFSP\", function () {", - " throw new Error('Did not receive response');", - " });", + "// } else {", + "// pm.test(\"Parties FAILED - payerFSP\", function () {", + "// throw new Error('Did not receive response');", + "// });", " ", - " }", + "// }", " ", - " });", - "}, 4000)", + "// });", + "// }, 4000)", "", "" ], @@ -210,46 +210,114 @@ "description": "Author: Sridevi Miriyala\n\nURI param: MSISDN\n" }, "response": [] - } - ], - "protocolProfileBehavior": {}, - "_postman_isSubFolder": true - }, - { - "name": "400", - "item": [ + }, { - "name": "400 - 3101 - Malformed Type (BUG)", + "name": "202 - Accepted (BUG) Copy", "event": [ { - "listen": "prerequest", + "listen": "test", "script": { - "id": "9cf7d011-ba2b-48b2-abf4-a2ed7ae0a6e8", + "id": "df53ac68-44bc-4b61-9296-8857e0fe7c8d", "exec": [ - "pm.environment.set('dateHeader', (new Date()).toUTCString());", + "pm.test(\"Status code is 202\", function () {", + " pm.response.to.have.status(202);", + "});", + "", + "", + "// //Check data on payer side", + "// setTimeout(function () {", + "// pm.sendRequest(pm.environment.get(\"HOST_SIMULATOR\")+\"/payerfsp/callbacks/\"+pm.variables.get(\"pathfinderMSISDN\"), function (err, response) {", + " ", + "// if(response.responseSize !== 0) { ", + " ", + "// //Checking headers", + "// var headers = response.json().headers;", + "// pm.test(\"payerfsp fspiop-source is switch\", function () {", + "// pm.expect(headers['fspiop-source']).to.eql('switch');", + "// });", + " ", + "// pm.test(\"payerfsp fspiop-destination is payerfsp\", function () {", + "// pm.expect(headers['fspiop-destination']).to.eql('payerfsp');", + "// });", + " ", + "// pm.test(\"payerfsp content-type should be application/vnd.interoperability.participants+json;version=1.0\", function () {", + "// pm.expect(headers['content-type']).to.eql('application/vnd.interoperability.participants+json;version=1.0');", + "// });", + " ", + "// pm.test(\"payerfsp accept is empty\", function () {", + "// pm.expect(headers['accept']).to.eql(undefined);", + "// });", + " ", + " ", + " ", + "// // //Validate protected header inside Signature", + "// // var {signature,protectedHeader} = JSON.parse(headers['fspiop-signature'])", + "// // var decodedProtectedHeaders = JSON.parse(atob(protectedHeader))", + "// // console.log('decodedProtectedHeaders:',decodedProtectedHeaders)", + " ", + "// // // pm.test(\"FSPIOP-Signature signature is returned\", function () {", + "// // // pm.expect(signature).to.eql(pm.environment.get(\"payeefsp-signature\"));", + "// // // });", + " ", + "// // pm.test(\"FSPIOP-Signature Protected Header alg to be RS256\", function () {", + "// // pm.expect(decodedProtectedHeaders['alg']).to.eql('RS256');", + "// // });", + "// // pm.test(\"FSPIOP-Signature Protected Header FSPIOP-URI to be /participants/MSISDN/\"+pm.environment.get(\"pathfinderMSISDN\"), function () {", + "// // pm.expect(decodedProtectedHeaders['FSPIOP-URI']).to.eql('/participants/MSISDN/'+pm.environment.get(\"pathfinderMSISDN\"));", + "// // });", + " ", + "", + "// // pm.test(\"FSPIOP-Signature Protected Header FSPIOP-HTTP-Method to be PUT\", function () {", + "// // pm.expect(decodedProtectedHeaders['FSPIOP-HTTP-Method']).to.eql('PUT');", + "// // });", + "// // pm.test(\"FSPIOP-Signature Protected Header FSPIOP-Source to be switch\", function () {", + "// // pm.expect(decodedProtectedHeaders['FSPIOP-Source']).to.eql('switch');", + "// // });", + "// // pm.test(\"FSPIOP-Signature Protected Header FSPIOP-Destination to be payerfsp\", function () {", + "// // pm.expect(decodedProtectedHeaders['FSPIOP-Destination']).to.eql('payerfsp');", + "// // });", + "// // pm.test(\"FSPIOP-Signature Protected Header Date is present\", function () {", + "// // pm.expect(decodedProtectedHeaders['Date']).to.not.eql(undefined);", + "// // });", + " ", + "// pm.test(\"payerfsp fspiop-uri to be /parties/MSISDN/\"+pm.environment.get(\"pathfinderMSISDN\"), function () {", + "// pm.expect(headers['fspiop-uri']).to.eql('/parties/MSISDN/'+pm.environment.get(\"pathfinderMSISDN\"));", + "// });", + " ", + "// pm.test(\"payerfsp fspiop-http-method is PUT\", function () {", + "// pm.expect(headers['fspiop-http-method']).to.eql('PUT');", + "// });", + " ", + "// //Checking data", + "// var jsonData = response.json().data;", + "// pm.test(\"Expected fspid is payeefsp \", function () {", + "// pm.expect(jsonData.fspId).to.eql(pm.variables.get(\"payeefsp\"));", + "// });", + " ", + " ", + "// } else {", + "// pm.test(\"Parties FAILED - payerFSP\", function () {", + "// throw new Error('Did not receive response');", + "// });", + " ", + "// }", + " ", + "// });", + "// }, 4000)", + "", "" ], "type": "text/javascript" } }, { - "listen": "test", + "listen": "prerequest", "script": { - "id": "3472322e-3146-4049-a128-f281e0be340e", + "id": "0cb60963-9178-4069-9360-82a0664a0db8", "exec": [ - "pm.test(\"Status code is 400\", function () {", - " pm.response.to.have.status(400);", - "});", + "pm.variables.set('expectedFspId', 'payeefsp');", "", - "setTimeout(function () {", - " pm.sendRequest(pm.environment.get(\"HOST_SIMULATOR\")+\"/payerfsp/correlationid/\"+pm.variables.get(\"pathfinderMSISDN\"), function (err, response) {", - " //console.log(response.json());", - " pm.test(\"Error message is expected as response.\", function () {", - " pm.expect(response.json().errorInformation.errorCode).to.eql('3101');", - " pm.expect(response.json().errorInformation.errorDescription).to.eql('Malformed Type');", - " });", - " });", - "}, 1000)" + "" ], "type": "text/javascript" } @@ -259,91 +327,67 @@ "method": "GET", "header": [ { - "key": "Accept", + "key": "accept", + "value": "application/vnd.interoperability.participants+json;version=1", + "type": "text" + }, + { + "key": "content-type", + "value": "application/vnd.interoperability.participants+json;version=1.0", + "type": "text" + }, + { + "key": "date", + "value": "{{dateHeader}}", + "type": "text" + }, + { + "key": "fspiop-source", + "value": "{{payerfsp}}", + "type": "text" + }, + { + "key": "x-forwarded-for", + "value": "", "type": "text", - "value": "application/vnd.interoperability.participants+json;version=1" + "disabled": true }, { - "key": "Date", + "key": "fspiop-destination", + "value": "", "type": "text", - "value": "{{dateHeader}}" + "disabled": true }, { - "key": "FSPIOP-Source", + "key": "fspiop-encryption", + "value": "", "type": "text", - "value": "{{payerfsp}}" - } - ], - "url": { - "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/participants/XYZ/{{pathfinderMSISDN}}", - "host": [ - "{{HOST_ACCOUNT_LOOKUP_SERVICE}}" - ], - "path": [ - "participants", - "XYZ", - "{{pathfinderMSISDN}}" - ] - }, - "description": "Format of the parameter is not valid. For example, amount set to 5.ABC. The error description field should specify which information element is erroneous." - }, - "response": [] - }, - { - "name": "400 - 3101 - Malformed Header (BUG)", - "event": [ - { - "listen": "prerequest", - "script": { - "id": "9cf7d011-ba2b-48b2-abf4-a2ed7ae0a6e8", - "exec": [ - "pm.environment.set('dateHeader', (new Date()).toUTCString());", - "" - ], - "type": "text/javascript" - } - }, - { - "listen": "test", - "script": { - "id": "3b65ac8a-b8ef-4fef-b3bb-9640778e4aa4", - "exec": [ - "pm.test(\"Status code is 400\", function () {", - " pm.response.to.have.status(400);", - "});", - "", - "setTimeout(function () {", - " pm.sendRequest(pm.environment.get(\"HOST_SIMULATOR\")+\"/payerfsp/correlationid/\"+pm.variables.get(\"pathfinderMSISDN\"), function (err, response) {", - " //console.log(response.json());", - " pm.test(\"Error message is expected as response.\", function () {", - " pm.expect(response.json().errorInformation.errorCode).to.eql('3101');", - " pm.expect(response.json().errorInformation.errorDescription).to.eql('Malformed Type');", - " });", - " });", - "}, 1000)" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "GET", - "header": [ + "disabled": true + }, { - "key": "Accept", - "value": "xyz" + "key": "fspiop-signature", + "value": "{{fspiop-signature}}", + "type": "text" }, { - "key": "Date", - "value": "{{dateHeader}}" + "key": "fspiop-uri", + "value": "/participants/MSISDN/{{pathfinderMSISDN}}", + "type": "text" }, { - "key": "FSPIOP-Source", - "value": "{{payerfsp}}" + "key": "fspiop-http-method", + "value": "GET", + "type": "text" + }, + { + "key": "content-length", + "value": "", + "type": "text", + "disabled": true } ], "url": { - "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/participants/MSISDN/{{pathfinderMSISDN}}", + "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/participants/MSISDN/{{pathfinderMSISDN}}?currency=USD", "host": [ "{{HOST_ACCOUNT_LOOKUP_SERVICE}}" ], @@ -351,39 +395,29 @@ "participants", "MSISDN", "{{pathfinderMSISDN}}" + ], + "query": [ + { + "key": "currency", + "value": "USD" + } ] }, - "description": "Format of the parameter is not valid. For example, amount set to 5.ABC. The error description field should specify which information element is erroneous." + "description": "Author: Sridevi Miriyala\n\nURI param: MSISDN\n" }, "response": [] }, { - "name": "404 - 3102 - Missing Mandatory ID (BUG)", + "name": "202 - Accepted - Ignore query Parameter", "event": [ { "listen": "test", "script": { "id": "df53ac68-44bc-4b61-9296-8857e0fe7c8d", "exec": [ - "pm.test(\"Status code is 400\", function () {", - " pm.response.to.have.status(400);", - "});", - "", - "// pm.test(\"Check that Content-Type is present\", function () {", - "// pm.response.to.have.header(\"Content-Type\");", - "// pm.response.to.be.header(\"Content-Type\", \"application/vnd.interoperability.parties+json;version=1.0\");", - "// });", - "", - "setTimeout(function () {", - " pm.sendRequest(pm.environment.get(\"HOST_SIMULATOR\")+\"/payerfsp/correlationid/\"+pm.variables.get(\"pathfinderMSISDN\"), function (err, response) {", - " //console.log(response.json());", - " pm.expect(response.json().errorInformation.errorCode).to.eql('3101');", - " pm.expect(response.json().errorInformation.errorDescription).to.eql('Malformed Type');", - " ", - " });", - "}, 1000)", - "", - "" + "pm.test(\"Status code is 202\", function () {", + " pm.response.to.have.status(202);", + "});" ], "type": "text/javascript" } @@ -394,7 +428,6 @@ "id": "0cb60963-9178-4069-9360-82a0664a0db8", "exec": [ "pm.variables.set('expectedFspId', 'payeefsp');", - "pm.variables.set('participantDateHeader', (new Date()).toUTCString());", "", "" ], @@ -406,107 +439,67 @@ "method": "GET", "header": [ { - "key": "Accept", - "value": "application/vnd.interoperability.participants+json;version=1" + "key": "accept", + "value": "application/vnd.interoperability.participants+json;version=1", + "type": "text" }, { - "key": "Content-Type", - "value": "application/vnd.interoperability.participants+json;version=1.0" + "key": "content-type", + "value": "application/vnd.interoperability.participants+json;version=1.0", + "type": "text" }, { - "key": "FSPIOP-Source", - "value": "{{payerfsp}}" + "key": "date", + "value": "{{dateHeader}}", + "type": "text" }, { - "key": "Date", - "value": "{{dateHeader}}" - } - ], - "url": { - "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/participants/MSISDN/", - "host": [ - "{{HOST_ACCOUNT_LOOKUP_SERVICE}}" - ], - "path": [ - "participants", - "MSISDN", - "" - ] - } - }, - "response": [] - }, - { - "name": "400 - 3102 - Missing Mandatory Headers (BUG)", - "event": [ - { - "listen": "test", - "script": { - "id": "df53ac68-44bc-4b61-9296-8857e0fe7c8d", - "exec": [ - "pm.test(\"Status code is 400\", function () {", - " pm.response.to.have.status(400);", - "});", - "", - "// pm.test(\"Check that Content-Type is present\", function () {", - "// pm.response.to.have.header(\"Content-Type\");", - "// pm.response.to.be.header(\"Content-Type\", \"application/vnd.interoperability.parties+json;version=1.0\");", - "// });", - "", - "setTimeout(function () {", - " pm.sendRequest(pm.environment.get(\"HOST_SIMULATOR\")+\"/payerfsp/correlationid/\"+pm.variables.get(\"pathfinderMSISDN\"), function (err, response) {", - " //console.log(response.json());", - " pm.test(\"Error message is expected as response.\", function () {", - " pm.expect(response.json().errorInformation.errorCode).to.eql('3102');", - " pm.expect(response.json().errorInformation.errorDescription).to.eql('Missing Date Header');", - " });", - " ", - " ", - " });", - "}, 1000)", - "", - "" - ], - "type": "text/javascript" - } - }, - { - "listen": "prerequest", - "script": { - "id": "0cb60963-9178-4069-9360-82a0664a0db8", - "exec": [ - "pm.variables.set('expectedFspId', 'payeefsp');", - "pm.variables.set('participantDateHeader', (new Date()).toUTCString());", - "", - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "GET", - "header": [ + "key": "fspiop-source", + "value": "{{payerfsp}}", + "type": "text" + }, { - "key": "Accept", - "value": "application/vnd.interoperability.participants+json;version=1" + "key": "x-forwarded-for", + "value": "", + "type": "text", + "disabled": true }, { - "key": "Content-Type", - "value": "application/vnd.interoperability.participants+json;version=1.0" + "key": "fspiop-destination", + "value": "", + "type": "text", + "disabled": true }, { - "key": "FSPIOP-Source", - "value": "{{payerfsp}}" + "key": "fspiop-encryption", + "value": "", + "type": "text", + "disabled": true }, { - "key": "Date", - "value": "{{dateHeader}}", + "key": "fspiop-signature", + "value": "{{fspiop-signature}}", + "type": "text" + }, + { + "key": "fspiop-uri", + "value": "/participants/MSISDN/{{pathfinderMSISDN}}", + "type": "text" + }, + { + "key": "fspiop-http-method", + "value": "GET", + "type": "text" + }, + { + "key": "content-length", + "value": "", + "type": "text", "disabled": true } ], "url": { - "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/participants/MSISDN/{{pathfinderMSISDN}}", + "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/participants/MSISDN/{{pathfinderMSISDN}}?xyz&amount&123", "host": [ "{{HOST_ACCOUNT_LOOKUP_SERVICE}}" ], @@ -514,35 +507,65 @@ "participants", "MSISDN", "{{pathfinderMSISDN}}" + ], + "query": [ + { + "key": "xyz", + "value": null + }, + { + "key": "amount", + "value": null + }, + { + "key": "123", + "value": null + } ] - } + }, + "description": "Author: Sridevi Miriyala\n\nURI param: MSISDN\n" }, "response": [] } ], "protocolProfileBehavior": {}, "_postman_isSubFolder": true - } - ], - "protocolProfileBehavior": {}, - "_postman_isSubFolder": true - }, - { - "name": "POST - ParticipantsByTypeAndID", - "item": [ + }, { - "name": "201", + "name": "400", "item": [ { - "name": "201 - Created", + "name": "400 - 3101 - Invalid Type - Path Parameter", "event": [ + { + "listen": "prerequest", + "script": { + "id": "9cf7d011-ba2b-48b2-abf4-a2ed7ae0a6e8", + "exec": [ + "pm.environment.set('dateHeader', (new Date()).toUTCString());", + "" + ], + "type": "text/javascript" + } + }, { "listen": "test", "script": { - "id": "c11075ed-0aa5-4631-a8a4-5bbf1b7fbddb", + "id": "3472322e-3146-4049-a128-f281e0be340e", "exec": [ - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", + "pm.test(\"Status code is 400\", function () {", + " pm.response.to.have.status(400);", + "});", + "", + "", + "var jsonData = pm.response.json();", + " ", + "pm.test(\"Check Malformed syntax - 'Type' URI path parameter\", function () {", + " pm.expect(jsonData.errorInformation.errorDescription).to.include('Malformed syntax - \\'Type\\' URI path parameter');", + "}); ", + " ", + "pm.test(\"Check Error code 3101\", function () {", + " pm.expect(jsonData.errorInformation.errorCode).to.eql('3101');", "});" ], "type": "text/javascript" @@ -550,22 +573,22 @@ } ], "request": { - "method": "POST", + "method": "GET", "header": [ { "key": "Accept", - "value": "application/vnd.interoperability.participants+json;version=1", - "type": "text" + "type": "text", + "value": "application/vnd.interoperability.participants+json;version=1" }, { "key": "Date", - "value": "{{dateHeader}}", - "type": "text" + "type": "text", + "value": "{{dateHeader}}" }, { "key": "FSPIOP-Source", - "value": "{{payerfsp}}", - "type": "text" + "type": "text", + "value": "{{payerfsp}}" }, { "key": "Content-Type", @@ -573,33 +596,22 @@ "type": "text" } ], - "body": { - "mode": "raw", - "raw": "{\n\t\"fspId\": \"{{payeefsp}}\",\n\t\"currency\": \"{{currency}}\"\n}" - }, "url": { - "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/participants/MSISDN/{{pathfinderMSISDN}}", + "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/participants/XYZ/{{pathfinderMSISDN}}", "host": [ "{{HOST_ACCOUNT_LOOKUP_SERVICE}}" ], "path": [ "participants", - "MSISDN", + "XYZ", "{{pathfinderMSISDN}}" ] } }, "response": [] - } - ], - "protocolProfileBehavior": {}, - "_postman_isSubFolder": true - }, - { - "name": "400", - "item": [ + }, { - "name": "400 - 3101 - Malformed MSISDN (BUG)", + "name": "400 - 3101 - Malformed Header - Invalid content type", "event": [ { "listen": "prerequest", @@ -615,21 +627,21 @@ { "listen": "test", "script": { - "id": "3472322e-3146-4049-a128-f281e0be340e", + "id": "3b65ac8a-b8ef-4fef-b3bb-9640778e4aa4", "exec": [ "pm.test(\"Status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", - "setTimeout(function () {", - " pm.sendRequest(pm.environment.get(\"HOST_SIMULATOR\")+\"/payerfsp/correlationid/\"+pm.variables.get(\"pathfinderMSISDN\"), function (err, response) {", - " //console.log(response.json());", - " pm.test(\"Error message is expected as response.\", function () {", - " pm.expect(response.json().errorInformation.errorCode).to.eql('3101');", - " pm.expect(response.json().errorInformation.errorDescription).to.eql('Malformed MSISDN');", - " });", - " });", - "}, 1000)" + "var jsonData = pm.response.json();", + " ", + "pm.test(\"Check Malformed syntax - Invalid accept header\", function () {", + " pm.expect(jsonData.errorInformation.errorDescription).to.include('Malformed syntax - Invalid accept header');", + "}); ", + " ", + "pm.test(\"Check Error code 3101\", function () {", + " pm.expect(jsonData.errorInformation.errorCode).to.eql('3101');", + "});" ], "type": "text/javascript" } @@ -640,18 +652,15 @@ "header": [ { "key": "Accept", - "value": "application/vnd.interoperability.participants+json;version=1", - "type": "text" + "value": "xyz" }, { "key": "Date", - "value": "{{dateHeader}}", - "type": "text" + "value": "{{dateHeader}}" }, { "key": "FSPIOP-Source", - "value": "{{payerfsp}}", - "type": "text" + "value": "{{payerfsp}}" }, { "key": "Content-Type", @@ -660,54 +669,40 @@ } ], "url": { - "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/participants/MSISDN/@3456!", + "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/participants/MSISDN/{{pathfinderMSISDN}}", "host": [ "{{HOST_ACCOUNT_LOOKUP_SERVICE}}" ], "path": [ "participants", "MSISDN", - "@3456!" + "{{pathfinderMSISDN}}" ] - }, - "description": "Format of the parameter is not valid. For example, amount set to 5.ABC. The error description field should specify which information element is erroneous." + } }, "response": [] - } - ], - "protocolProfileBehavior": {}, - "_postman_isSubFolder": true - } - ], - "protocolProfileBehavior": {}, - "_postman_isSubFolder": true - }, - { - "name": "DEL - ParticipantsByTypeAndID ( NOT IMPLEMENTED )", - "item": [], - "protocolProfileBehavior": {}, - "_postman_isSubFolder": true - }, - { - "name": "PUT - ParticipantsByTypeAndID ( NOT IMPLEMENTED )", - "item": [ - { - "name": "200", - "item": [ + }, { - "name": "200 - Accepted (BUG)", + "name": "404 - 3002 - Missing Mandatory ID", "event": [ { "listen": "test", "script": { "id": "df53ac68-44bc-4b61-9296-8857e0fe7c8d", "exec": [ - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", + "pm.test(\"Status code is 404\", function () {", + " pm.response.to.have.status(404);", "});", "", - "", - "" + "var jsonData = pm.response.json();", + " ", + "pm.test(\"Check Missing mandatory ID - Unknown URI - Not Found\", function () {", + " pm.expect(jsonData.errorInformation.errorDescription).to.include('Unknown URI - Not Found');", + "}); ", + " ", + "pm.test(\"Check Error code 3002\", function () {", + " pm.expect(jsonData.errorInformation.errorCode).to.eql('3002');", + "});" ], "type": "text/javascript" } @@ -718,6 +713,7 @@ "id": "0cb60963-9178-4069-9360-82a0664a0db8", "exec": [ "pm.variables.set('expectedFspId', 'payeefsp');", + "pm.variables.set('participantDateHeader', (new Date()).toUTCString());", "", "" ], @@ -726,202 +722,60 @@ } ], "request": { - "method": "PUT", + "method": "GET", "header": [ { - "key": "accept", - "type": "text", + "key": "Accept", "value": "application/vnd.interoperability.participants+json;version=1" }, { - "key": "content-type", - "type": "text", + "key": "Content-Type", "value": "application/vnd.interoperability.participants+json;version=1.0" }, { - "key": "date", - "type": "text", - "value": "{{dateHeader}}" - }, - { - "key": "fspiop-source", - "type": "text", + "key": "FSPIOP-Source", "value": "{{payerfsp}}" }, { - "key": "x-forwarded-for", - "type": "text", - "value": "", - "disabled": true - }, - { - "key": "fspiop-destination", - "type": "text", - "value": "", - "disabled": true - }, - { - "key": "fspiop-encryption", - "type": "text", - "value": "", - "disabled": true - }, - { - "key": "fspiop-signature", - "type": "text", - "value": "{{fspiop-signature}}" - }, - { - "key": "fspiop-uri", - "type": "text", - "value": "/participants/MSISDN/{{pathfinderMSISDN}}" - }, - { - "key": "fspiop-http-method", - "type": "text", - "value": "GET" - }, - { - "key": "content-length", - "type": "text", - "value": "", - "disabled": true + "key": "Date", + "value": "{{dateHeader}}" } ], - "body": { - "mode": "raw", - "raw": "{\"fspId\":\"testfsp\"}" - }, "url": { - "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/participants/MSISDN/{{pathfinderMSISDN}}", + "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/participants/MSISDN/", "host": [ "{{HOST_ACCOUNT_LOOKUP_SERVICE}}" ], "path": [ "participants", "MSISDN", - "{{pathfinderMSISDN}}" + "" ] - }, - "description": "Author: Sridevi Miriyala\n\nURI param: MSISDN\n" + } }, "response": [] - } - ], - "protocolProfileBehavior": {}, - "_postman_isSubFolder": true - } - ], - "protocolProfileBehavior": {}, - "_postman_isSubFolder": true - } - ], - "protocolProfileBehavior": {}, - "_postman_isSubFolder": true - }, - { - "name": "/BUSINESS/ID", - "item": [ - { - "name": "GET - ParticipantsByTypeAndID", - "item": [ - { - "name": "202", - "item": [ + }, { - "name": "202 - Accepted (BUG)", + "name": "400 - 3102 - Missing Mandatory Headers", "event": [ { "listen": "test", "script": { "id": "df53ac68-44bc-4b61-9296-8857e0fe7c8d", "exec": [ - "pm.test(\"Status code is 202\", function () {", - " pm.response.to.have.status(202);", + "pm.test(\"Status code is 400\", function () {", + " pm.response.to.have.status(400);", "});", "", - "", - "//Check data on payer side", - "setTimeout(function () {", - " pm.sendRequest(pm.environment.get(\"HOST_SIMULATOR\")+\"/payerfsp/callbacks/\"+pm.variables.get(\"pathfinderMSISDN\"), function (err, response) {", - " ", - " if(response.responseSize !== 0) { ", - " ", - " //Checking headers", - " var headers = response.json().headers;", - " pm.test(\"payerfsp fspiop-source is switch\", function () {", - " pm.expect(headers['fspiop-source']).to.eql('switch');", - " });", - " ", - " pm.test(\"payerfsp fspiop-destination is payerfsp\", function () {", - " pm.expect(headers['fspiop-destination']).to.eql('payerfsp');", - " });", - " ", - " pm.test(\"payerfsp content-type should be application/vnd.interoperability.participants+json;version=1.0\", function () {", - " pm.expect(headers['content-type']).to.eql('application/vnd.interoperability.participants+json;version=1.0');", - " });", - " ", - " pm.test(\"payerfsp accept is empty\", function () {", - " pm.expect(headers['accept']).to.eql(undefined);", - " });", - " ", - " ", - " ", - " // //Validate protected header inside Signature", - " // var {signature,protectedHeader} = JSON.parse(headers['fspiop-signature'])", - " // var decodedProtectedHeaders = JSON.parse(atob(protectedHeader))", - " // console.log('decodedProtectedHeaders:',decodedProtectedHeaders)", - " ", - " // // pm.test(\"FSPIOP-Signature signature is returned\", function () {", - " // // pm.expect(signature).to.eql(pm.environment.get(\"payeefsp-signature\"));", - " // // });", - " ", - " // pm.test(\"FSPIOP-Signature Protected Header alg to be RS256\", function () {", - " // pm.expect(decodedProtectedHeaders['alg']).to.eql('RS256');", - " // });", - " // pm.test(\"FSPIOP-Signature Protected Header FSPIOP-URI to be /participants/MSISDN/\"+pm.environment.get(\"pathfinderMSISDN\"), function () {", - " // pm.expect(decodedProtectedHeaders['FSPIOP-URI']).to.eql('/participants/MSISDN/'+pm.environment.get(\"pathfinderMSISDN\"));", - " // });", - " ", - "", - " // pm.test(\"FSPIOP-Signature Protected Header FSPIOP-HTTP-Method to be PUT\", function () {", - " // pm.expect(decodedProtectedHeaders['FSPIOP-HTTP-Method']).to.eql('PUT');", - " // });", - " // pm.test(\"FSPIOP-Signature Protected Header FSPIOP-Source to be switch\", function () {", - " // pm.expect(decodedProtectedHeaders['FSPIOP-Source']).to.eql('switch');", - " // });", - " // pm.test(\"FSPIOP-Signature Protected Header FSPIOP-Destination to be payerfsp\", function () {", - " // pm.expect(decodedProtectedHeaders['FSPIOP-Destination']).to.eql('payerfsp');", - " // });", - " // pm.test(\"FSPIOP-Signature Protected Header Date is present\", function () {", - " // pm.expect(decodedProtectedHeaders['Date']).to.not.eql(undefined);", - " // });", - " ", - " pm.test(\"payerfsp fspiop-uri to be /parties/MSISDN/\"+pm.environment.get(\"pathfinderMSISDN\"), function () {", - " pm.expect(headers['fspiop-uri']).to.eql('/parties/MSISDN/'+pm.environment.get(\"pathfinderMSISDN\"));", - " });", - " ", - " pm.test(\"payerfsp fspiop-http-method is PUT\", function () {", - " pm.expect(headers['fspiop-http-method']).to.eql('PUT');", - " });", - " ", - " //Checking data", - " var jsonData = response.json().data;", - " pm.test(\"Expected fspid is payeefsp \", function () {", - " pm.expect(jsonData.fspId).to.eql(pm.variables.get(\"payeefsp\"));", - " });", - " ", - " ", - " } else {", - " pm.test(\"Parties FAILED - payerFSP\", function () {", - " throw new Error('Did not receive response');", - " });", - " ", - " }", - " ", - " });", - "}, 4000)", - "", + "var jsonData = pm.response.json();", + " ", + "pm.test(\"Check Missing mandatory element - date is required\", function () {", + " pm.expect(jsonData.errorInformation.errorDescription).to.include('Missing mandatory element - date is required');", + "}); ", + " ", + "pm.test(\"Check Error code 3102\", function () {", + " pm.expect(jsonData.errorInformation.errorCode).to.eql('3102');", + "});", "" ], "type": "text/javascript" @@ -933,6 +787,7 @@ "id": "0cb60963-9178-4069-9360-82a0664a0db8", "exec": [ "pm.variables.set('expectedFspId', 'payeefsp');", + "pm.variables.set('participantDateHeader', (new Date()).toUTCString());", "", "" ], @@ -944,126 +799,69 @@ "method": "GET", "header": [ { - "key": "accept", - "value": "application/vnd.interoperability.participants+json;version=1", - "type": "text" - }, - { - "key": "content-type", - "value": "application/vnd.interoperability.participants+json;version=1.0", - "type": "text" - }, - { - "key": "date", - "value": "{{dateHeader}}", - "type": "text" - }, - { - "key": "fspiop-source", - "value": "{{payerfsp}}", - "type": "text" - }, - { - "key": "x-forwarded-for", - "value": "", - "type": "text", - "disabled": true - }, - { - "key": "fspiop-destination", - "value": "", - "type": "text", - "disabled": true - }, - { - "key": "fspiop-encryption", - "value": "", - "type": "text", - "disabled": true - }, - { - "key": "fspiop-signature", - "value": "{{fspiop-signature}}", - "type": "text" + "key": "Accept", + "value": "application/vnd.interoperability.participants+json;version=1" }, { - "key": "fspiop-uri", - "value": "/participants/MSISDN/{{pathfinderMSISDN}}", - "type": "text" + "key": "Content-Type", + "value": "application/vnd.interoperability.participants+json;version=1.0" }, { - "key": "fspiop-http-method", - "value": "GET", - "type": "text" + "key": "FSPIOP-Source", + "value": "{{payerfsp}}" }, { - "key": "content-length", - "value": "", - "type": "text", + "key": "Date", + "value": "{{dateHeader}}", "disabled": true } ], "url": { - "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/participants/BUSINESS/{{pathfinderMSISDN}}", + "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/participants/MSISDN/{{pathfinderMSISDN}}", "host": [ "{{HOST_ACCOUNT_LOOKUP_SERVICE}}" ], "path": [ "participants", - "BUSINESS", + "MSISDN", "{{pathfinderMSISDN}}" ] - }, - "description": "Author: Sridevi Miriyala\n\nURI param: MSISDN\n" + } }, "response": [] } ], "protocolProfileBehavior": {}, "_postman_isSubFolder": true - }, + } + ], + "protocolProfileBehavior": {}, + "_postman_isSubFolder": true + }, + { + "name": "POST - ParticipantsByTypeAndID", + "item": [ { - "name": "400", + "name": "202", "item": [ { - "name": "400 - 3101 - Malformed Type (BUG)", + "name": "202 - Created", "event": [ - { - "listen": "prerequest", - "script": { - "id": "9cf7d011-ba2b-48b2-abf4-a2ed7ae0a6e8", - "exec": [ - "pm.environment.set('dateHeader', (new Date()).toUTCString());", - "" - ], - "type": "text/javascript" - } - }, { "listen": "test", "script": { - "id": "3472322e-3146-4049-a128-f281e0be340e", + "id": "c11075ed-0aa5-4631-a8a4-5bbf1b7fbddb", "exec": [ - "pm.test(\"Status code is 400\", function () {", - " pm.response.to.have.status(400);", - "});", - "", - "setTimeout(function () {", - " pm.sendRequest(pm.environment.get(\"HOST_SIMULATOR\")+\"/payerfsp/correlationid/\"+pm.variables.get(\"pathfinderMSISDN\"), function (err, response) {", - " //console.log(response.json());", - " pm.test(\"Error message is expected as response.\", function () {", - " pm.expect(response.json().errorInformation.errorCode).to.eql('3101');", - " pm.expect(response.json().errorInformation.errorDescription).to.eql('Malformed Type');", - " });", - " });", - "}, 1000)" + "pm.test(\"Status code is 202\", function () {", + " pm.response.to.have.status(202);", + "});" ], "type": "text/javascript" } } ], "request": { - "method": "GET", + "method": "POST", "header": [ { "key": "Accept", @@ -1079,277 +877,264 @@ "key": "FSPIOP-Source", "type": "text", "value": "{{payerfsp}}" + }, + { + "key": "Content-Type", + "type": "text", + "value": "application/vnd.interoperability.participants+json;version=1.0" } ], + "body": { + "mode": "raw", + "raw": "{\n\t\"fspId\": \"{{payeefsp}}\",\n\t\"currency\": \"{{currency}}\"\n}" + }, "url": { - "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/participants/XYZ/{{pathfinderMSISDN}}", + "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/participants/MSISDN/{{pathfinderMSISDN}}", "host": [ "{{HOST_ACCOUNT_LOOKUP_SERVICE}}" ], "path": [ "participants", - "XYZ", + "MSISDN", "{{pathfinderMSISDN}}" ] - }, - "description": "Format of the parameter is not valid. For example, amount set to 5.ABC. The error description field should specify which information element is erroneous." + } }, "response": [] - }, + } + ], + "protocolProfileBehavior": {}, + "_postman_isSubFolder": true + }, + { + "name": "400", + "item": [ { - "name": "400 - 3101 - Malformed Header (BUG)", + "name": "400 - Missing Date header Missing - 3102", "event": [ - { - "listen": "prerequest", - "script": { - "id": "9cf7d011-ba2b-48b2-abf4-a2ed7ae0a6e8", - "exec": [ - "pm.environment.set('dateHeader', (new Date()).toUTCString());", - "" - ], - "type": "text/javascript" - } - }, { "listen": "test", "script": { - "id": "3b65ac8a-b8ef-4fef-b3bb-9640778e4aa4", + "id": "c11075ed-0aa5-4631-a8a4-5bbf1b7fbddb", "exec": [ "pm.test(\"Status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", - "setTimeout(function () {", - " pm.sendRequest(pm.environment.get(\"HOST_SIMULATOR\")+\"/payerfsp/correlationid/\"+pm.variables.get(\"pathfinderMSISDN\"), function (err, response) {", - " //console.log(response.json());", - " pm.test(\"Error message is expected as response.\", function () {", - " pm.expect(response.json().errorInformation.errorCode).to.eql('3101');", - " pm.expect(response.json().errorInformation.errorDescription).to.eql('Malformed Type');", - " });", - " });", - "}, 1000)" + "var jsonData = pm.response.json();", + " ", + "pm.test(\"Check Missing mandatory element - date is required\", function () {", + " pm.expect(jsonData.errorInformation.errorDescription).to.include('Missing mandatory element - date is required');", + "}); ", + " ", + "pm.test(\"Check Error code 3102\", function () {", + " pm.expect(jsonData.errorInformation.errorCode).to.eql('3102');", + "});" ], "type": "text/javascript" } } ], "request": { - "method": "GET", + "method": "POST", "header": [ { "key": "Accept", - "value": "xyz" + "value": "application/vnd.interoperability.participants+json;version=1", + "type": "text" }, { "key": "Date", - "value": "{{dateHeader}}" + "value": "{{dateHeader}}", + "type": "text", + "disabled": true }, { "key": "FSPIOP-Source", - "value": "{{payerfsp}}" + "value": "{{payerfsp}}", + "type": "text" + }, + { + "key": "Content-Type", + "value": "application/vnd.interoperability.participants+json;version=1.0", + "type": "text" } ], + "body": { + "mode": "raw", + "raw": "{\n\t\"fspId\": \"{{payeefsp}}\",\n\t\"currency\": \"{{currency}}\"\n}" + }, "url": { - "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/participants/BUSINESS/{{pathfinderMSISDN}}", + "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/participants/MSISDN/{{pathfinderMSISDN}}", "host": [ "{{HOST_ACCOUNT_LOOKUP_SERVICE}}" ], "path": [ "participants", - "BUSINESS", + "MSISDN", "{{pathfinderMSISDN}}" ] - }, - "description": "Format of the parameter is not valid. For example, amount set to 5.ABC. The error description field should specify which information element is erroneous." + } }, "response": [] }, { - "name": "404 - 3102 - Missing Mandatory ID (BUG)", + "name": "400 - Malformed Type - xyz - 3101", "event": [ { "listen": "test", "script": { - "id": "df53ac68-44bc-4b61-9296-8857e0fe7c8d", + "id": "c11075ed-0aa5-4631-a8a4-5bbf1b7fbddb", "exec": [ "pm.test(\"Status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", - "// pm.test(\"Check that Content-Type is present\", function () {", - "// pm.response.to.have.header(\"Content-Type\");", - "// pm.response.to.be.header(\"Content-Type\", \"application/vnd.interoperability.parties+json;version=1.0\");", - "// });", - "", - "setTimeout(function () {", - " pm.sendRequest(pm.environment.get(\"HOST_SIMULATOR\")+\"/payerfsp/correlationid/\"+pm.variables.get(\"pathfinderMSISDN\"), function (err, response) {", - " //console.log(response.json());", - " pm.expect(response.json().errorInformation.errorCode).to.eql('3101');", - " pm.expect(response.json().errorInformation.errorDescription).to.eql('Malformed Type');", - " ", - " });", - "}, 1000)", - "", - "" - ], - "type": "text/javascript" - } - }, - { - "listen": "prerequest", - "script": { - "id": "0cb60963-9178-4069-9360-82a0664a0db8", - "exec": [ - "pm.variables.set('expectedFspId', 'payeefsp');", - "pm.variables.set('participantDateHeader', (new Date()).toUTCString());", - "", - "" + "var jsonData = pm.response.json();", + " ", + "pm.test(\"Check Missing mandatory element - date is required\", function () {", + " pm.expect(jsonData.errorInformation.errorDescription).to.include('Malformed syntax - \\'Type\\' URI path parameter');", + "}); ", + " ", + "pm.test(\"Check Error code 3101\", function () {", + " pm.expect(jsonData.errorInformation.errorCode).to.eql('3101');", + "});" ], "type": "text/javascript" } } ], "request": { - "method": "GET", + "method": "POST", "header": [ { "key": "Accept", - "value": "application/vnd.interoperability.participants+json;version=1" + "value": "application/vnd.interoperability.participants+json;version=1", + "type": "text" }, { - "key": "Content-Type", - "value": "application/vnd.interoperability.participants+json;version=1.0" + "key": "Date", + "value": "{{dateHeader}}", + "type": "text" }, { "key": "FSPIOP-Source", - "value": "{{payerfsp}}" + "value": "{{payerfsp}}", + "type": "text" }, { - "key": "Date", - "value": "{{dateHeader}}" + "key": "Content-Type", + "value": "application/vnd.interoperability.participants+json;version=1.0", + "type": "text" } ], + "body": { + "mode": "raw", + "raw": "{\n\t\"fspId\": \"{{payeefsp}}\",\n\t\"currency\": \"{{currency}}\",\n\t\"currency1\": \"{{currency}}\"\n}" + }, "url": { - "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/participants/BUSINESS/", + "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/participants/xyz/{{pathfinderMSISDN}}", "host": [ "{{HOST_ACCOUNT_LOOKUP_SERVICE}}" ], "path": [ "participants", - "BUSINESS", - "" + "xyz", + "{{pathfinderMSISDN}}" ] } }, "response": [] }, { - "name": "400 - 3102 - Missing Mandatory Headers (BUG)", + "name": "400 - fsiop header missing - 3102", "event": [ { "listen": "test", "script": { - "id": "df53ac68-44bc-4b61-9296-8857e0fe7c8d", + "id": "c11075ed-0aa5-4631-a8a4-5bbf1b7fbddb", "exec": [ "pm.test(\"Status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", - "// pm.test(\"Check that Content-Type is present\", function () {", - "// pm.response.to.have.header(\"Content-Type\");", - "// pm.response.to.be.header(\"Content-Type\", \"application/vnd.interoperability.parties+json;version=1.0\");", - "// });", - "", - "setTimeout(function () {", - " pm.sendRequest(pm.environment.get(\"HOST_SIMULATOR\")+\"/payerfsp/correlationid/\"+pm.variables.get(\"pathfinderMSISDN\"), function (err, response) {", - " //console.log(response.json());", - " pm.test(\"Error message is expected as response.\", function () {", - " pm.expect(response.json().errorInformation.errorCode).to.eql('3102');", - " pm.expect(response.json().errorInformation.errorDescription).to.eql('Missing Date Header');", - " });", - " ", - " ", - " });", - "}, 1000)", - "", - "" - ], - "type": "text/javascript" - } - }, - { - "listen": "prerequest", - "script": { - "id": "0cb60963-9178-4069-9360-82a0664a0db8", - "exec": [ - "pm.variables.set('expectedFspId', 'payeefsp');", - "pm.variables.set('participantDateHeader', (new Date()).toUTCString());", - "", - "" + "var jsonData = pm.response.json();", + " ", + "pm.test(\"Check Missing mandatory element - fspiop-source is required\", function () {", + " pm.expect(jsonData.errorInformation.errorDescription).to.include('Missing mandatory element - fspiop-source is required');", + "}); ", + " ", + "pm.test(\"Check Error code 3102\", function () {", + " pm.expect(jsonData.errorInformation.errorCode).to.eql('3102');", + "});" ], "type": "text/javascript" } } ], "request": { - "method": "GET", + "method": "POST", "header": [ { "key": "Accept", - "value": "application/vnd.interoperability.participants+json;version=1" + "value": "application/vnd.interoperability.participants+json;version=1", + "type": "text" }, { - "key": "Content-Type", - "value": "application/vnd.interoperability.participants+json;version=1.0" + "key": "Date", + "value": "{{dateHeader}}", + "type": "text" }, { "key": "FSPIOP-Source", - "value": "{{payerfsp}}" + "value": "{{payerfsp}}", + "type": "text", + "disabled": true }, { - "key": "Date", - "value": "{{dateHeader}}", - "disabled": true + "key": "Content-Type", + "value": "application/vnd.interoperability.participants+json;version=1.0", + "type": "text" } ], + "body": { + "mode": "raw", + "raw": "{\n\t\"fspId\": \"{{payeefsp}}\",\n\t\"currency\": \"{{currency}}\"\n}" + }, "url": { - "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/participants/BUSINESS/{{pathfinderMSISDN}}", + "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/participants/MSISDN/{{pathfinderMSISDN}}", "host": [ "{{HOST_ACCOUNT_LOOKUP_SERVICE}}" ], "path": [ "participants", - "BUSINESS", + "MSISDN", "{{pathfinderMSISDN}}" ] } }, "response": [] - } - ], - "protocolProfileBehavior": {}, - "_postman_isSubFolder": true - } - ], - "protocolProfileBehavior": {}, - "_postman_isSubFolder": true - }, - { - "name": "POST - ParticipantsByTypeAndID", - "item": [ - { - "name": "201", - "item": [ + }, { - "name": "201 - Created", + "name": "400 - Missing content type - 3102", "event": [ { "listen": "test", "script": { "id": "c11075ed-0aa5-4631-a8a4-5bbf1b7fbddb", "exec": [ - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", + "pm.test(\"Status code is 400\", function () {", + " pm.response.to.have.status(400);", + "});", + "", + "var jsonData = pm.response.json();", + " ", + "pm.test(\"Check Missing mandatory element - fspiop-source is required\", function () {", + " pm.expect(jsonData.errorInformation.errorDescription).to.include('Missing mandatory element - content-type is required');", + "}); ", + " ", + "pm.test(\"Check Error code 3102\", function () {", + " pm.expect(jsonData.errorInformation.errorCode).to.eql('3102');", "});" ], "type": "text/javascript" @@ -1377,7 +1162,8 @@ { "key": "Content-Type", "value": "application/vnd.interoperability.participants+json;version=1.0", - "type": "text" + "type": "text", + "disabled": true } ], "body": { @@ -1385,70 +1171,54 @@ "raw": "{\n\t\"fspId\": \"{{payeefsp}}\",\n\t\"currency\": \"{{currency}}\"\n}" }, "url": { - "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/participants/BUSINESS/{{pathfinderMSISDN}}", + "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/participants/MSISDN/{{pathfinderMSISDN}}", "host": [ "{{HOST_ACCOUNT_LOOKUP_SERVICE}}" ], "path": [ "participants", - "BUSINESS", + "MSISDN", "{{pathfinderMSISDN}}" ] } }, "response": [] - } - ], - "protocolProfileBehavior": {}, - "_postman_isSubFolder": true - }, - { - "name": "400", - "item": [ + }, { - "name": "400 - 3101 - Malformed BUSINESS (BUG)", + "name": "400 - Malformed Syntax - accept header - 3101", "event": [ - { - "listen": "prerequest", - "script": { - "id": "9cf7d011-ba2b-48b2-abf4-a2ed7ae0a6e8", - "exec": [ - "pm.environment.set('dateHeader', (new Date()).toUTCString());", - "" - ], - "type": "text/javascript" - } - }, { "listen": "test", "script": { - "id": "3472322e-3146-4049-a128-f281e0be340e", + "id": "c11075ed-0aa5-4631-a8a4-5bbf1b7fbddb", "exec": [ "pm.test(\"Status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", - "setTimeout(function () {", - " pm.sendRequest(pm.environment.get(\"HOST_SIMULATOR\")+\"/payerfsp/correlationid/\"+pm.variables.get(\"pathfinderMSISDN\"), function (err, response) {", - " //console.log(response.json());", - " pm.test(\"Error message is expected as response.\", function () {", - " pm.expect(response.json().errorInformation.errorCode).to.eql('3101');", - " pm.expect(response.json().errorInformation.errorDescription).to.eql('Malformed MSISDN');", - " });", - " });", - "}, 1000)" + "", + "var jsonData = pm.response.json();", + " ", + "pm.test(\"Check Malformed syntax - Invalid accept header\", function () {", + " pm.expect(jsonData.errorInformation.errorDescription).to.include('Malformed syntax - Invalid accept header');", + "}); ", + " ", + "pm.test(\"Check Error code 3101\", function () {", + " pm.expect(jsonData.errorInformation.errorCode).to.eql('3101');", + "});" ], "type": "text/javascript" } } ], "request": { - "method": "GET", + "method": "POST", "header": [ { "key": "Accept", "value": "application/vnd.interoperability.participants+json;version=1", - "type": "text" + "type": "text", + "disabled": true }, { "key": "Date", @@ -1466,138 +1236,215 @@ "type": "text" } ], + "body": { + "mode": "raw", + "raw": "{\n\t\"fspId\": \"{{payeefsp}}\",\n\t\"currency\": \"{{currency}}\"\n}" + }, "url": { - "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/participants/BUSINESS/@3456!", + "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/participants/MSISDN/{{pathfinderMSISDN}}", "host": [ "{{HOST_ACCOUNT_LOOKUP_SERVICE}}" ], "path": [ "participants", - "BUSINESS", - "@3456!" + "MSISDN", + "{{pathfinderMSISDN}}" ] - }, - "description": "Format of the parameter is not valid. For example, amount set to 5.ABC. The error description field should specify which information element is erroneous." + } }, "response": [] - } - ], - "protocolProfileBehavior": {}, - "_postman_isSubFolder": true - } - ], - "protocolProfileBehavior": {}, - "_postman_isSubFolder": true - }, - { - "name": "DEL - ParticipantsByTypeAndID ( NOT IMPLEMENTED )", - "item": [], - "protocolProfileBehavior": {}, - "_postman_isSubFolder": true - }, - { - "name": "PUT - ParticipantsByTypeAndID", - "item": [ - { - "name": "200", - "item": [ + }, { - "name": "200 - Accepted (BUG)", + "name": "406 - Invalid content type - version -3001", "event": [ { "listen": "test", "script": { - "id": "df53ac68-44bc-4b61-9296-8857e0fe7c8d", + "id": "c11075ed-0aa5-4631-a8a4-5bbf1b7fbddb", "exec": [ - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", + "pm.test(\"Status code is 406\", function () {", + " pm.response.to.have.status(406);", "});", "", - "", + "var jsonData = pm.response.json();", + " ", + "pm.test(\"Check Unacceptable version requested\", function () {", + " pm.expect(jsonData.errorInformation.errorDescription).to.include('Unacceptable version requested');", + "}); ", + " ", + "pm.test(\"Check Error code 3001\", function () {", + " pm.expect(jsonData.errorInformation.errorCode).to.eql('3001');", + "});", "" ], "type": "text/javascript" } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Accept", + "value": "application/vnd.interoperability.participants+json;version=1", + "type": "text" + }, + { + "key": "Date", + "value": "{{dateHeader}}", + "type": "text" + }, + { + "key": "FSPIOP-Source", + "value": "{{payerfsp}}", + "type": "text" + }, + { + "key": "Content-Type", + "value": "application/vnd.interoperability.participants+json;version=1.1", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"fspId\": \"{{payeefsp}}\",\n\t\"currency\": \"{{currency}}\"\n}" }, + "url": { + "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/participants/MSISDN/{{pathfinderMSISDN}}", + "host": [ + "{{HOST_ACCOUNT_LOOKUP_SERVICE}}" + ], + "path": [ + "participants", + "MSISDN", + "{{pathfinderMSISDN}}" + ] + } + }, + "response": [] + }, + { + "name": "400 - Malformed - 3101 - Invalid Accept Header", + "event": [ { - "listen": "prerequest", + "listen": "test", "script": { - "id": "0cb60963-9178-4069-9360-82a0664a0db8", + "id": "c11075ed-0aa5-4631-a8a4-5bbf1b7fbddb", "exec": [ - "pm.variables.set('expectedFspId', 'payeefsp');", + "pm.test(\"Status code is 400\", function () {", + " pm.response.to.have.status(400);", + "});", "", - "" + "var jsonData = pm.response.json();", + " ", + "pm.test(\"Check Malformed syntax - Invalid accept header\", function () {", + " pm.expect(jsonData.errorInformation.errorDescription).to.include('Malformed syntax - Invalid accept header');", + "}); ", + " ", + "pm.test(\"Check Error code 3101\", function () {", + " pm.expect(jsonData.errorInformation.errorCode).to.eql('3101');", + "});" ], "type": "text/javascript" } } ], "request": { - "method": "PUT", + "method": "POST", "header": [ { - "key": "accept", - "type": "text", - "value": "application/vnd.interoperability.participants+json;version=1" - }, - { - "key": "content-type", - "type": "text", - "value": "application/vnd.interoperability.participants+json;version=1.0" - }, - { - "key": "date", - "type": "text", - "value": "{{dateHeader}}" - }, - { - "key": "fspiop-source", - "type": "text", - "value": "{{payerfsp}}" + "key": "Accept", + "value": "application/vnd.interoperability.participants+xml;version=1", + "type": "text" }, { - "key": "x-forwarded-for", - "type": "text", - "value": "", - "disabled": true + "key": "Date", + "value": "{{dateHeader}}", + "type": "text" }, { - "key": "fspiop-destination", - "type": "text", - "value": "", - "disabled": true + "key": "FSPIOP-Source", + "value": "{{payerfsp}}", + "type": "text" }, { - "key": "fspiop-encryption", - "type": "text", - "value": "", - "disabled": true - }, + "key": "Content-Type", + "value": "application/vnd.interoperability.participants+json;version=1.0", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"fspId\": \"{{payeefsp}}\",\n\t\"currency\": \"{{currency}}\"\n}" + }, + "url": { + "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/participants/MSISDN/{{pathfinderMSISDN}}", + "host": [ + "{{HOST_ACCOUNT_LOOKUP_SERVICE}}" + ], + "path": [ + "participants", + "MSISDN", + "{{pathfinderMSISDN}}" + ] + } + }, + "response": [] + }, + { + "name": "400 - Invalid content type - xml", + "event": [ + { + "listen": "test", + "script": { + "id": "c11075ed-0aa5-4631-a8a4-5bbf1b7fbddb", + "exec": [ + "pm.test(\"Status code is 400\", function () {", + " pm.response.to.have.status(400);", + "});", + "", + "var jsonData = pm.response.json();", + " ", + "pm.test(\"Check Malformed syntax - Invalid content-type header\", function () {", + " pm.expect(jsonData.errorInformation.errorDescription).to.include('Malformed syntax - Invalid content-type header');", + "}); ", + " ", + "pm.test(\"Check Error code 3101\", function () {", + " pm.expect(jsonData.errorInformation.errorCode).to.eql('3101');", + "});", + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ { - "key": "fspiop-signature", - "type": "text", - "value": "{{fspiop-signature}}" + "key": "Accept", + "value": "application/vnd.interoperability.participants+json;version=1", + "type": "text" }, { - "key": "fspiop-uri", - "type": "text", - "value": "/participants/MSISDN/{{pathfinderMSISDN}}" + "key": "Date", + "value": "{{dateHeader}}", + "type": "text" }, { - "key": "fspiop-http-method", - "type": "text", - "value": "GET" + "key": "FSPIOP-Source", + "value": "{{payerfsp}}", + "type": "text" }, { - "key": "content-length", - "type": "text", - "value": "", - "disabled": true + "key": "Content-Type", + "value": "application/vnd.interoperability.participants+xml;version=1.0", + "type": "text" } ], "body": { "mode": "raw", - "raw": "{\"fspId\":\"testfsp\"}" + "raw": "{\n\t\"fspId\": \"{{payeefsp}}\",\n\t\"currency\": \"{{currency}}\"\n}" }, "url": { "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/participants/MSISDN/{{pathfinderMSISDN}}", @@ -1609,431 +1456,178 @@ "MSISDN", "{{pathfinderMSISDN}}" ] - }, - "description": "Author: Sridevi Miriyala\n\nURI param: MSISDN\n" + } }, "response": [] - } - ], - "protocolProfileBehavior": {}, - "_postman_isSubFolder": true - } - ], - "protocolProfileBehavior": {}, - "_postman_isSubFolder": true - } - ], - "protocolProfileBehavior": {}, - "_postman_isSubFolder": true - }, - { - "name": "POST Participants Bulk", - "event": [ - { - "listen": "test", - "script": { - "id": "92c0fe7a-2429-4516-9d3a-4a689c0c775e", - "exec": [ - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});" - ], - "type": "text/javascript" - } - }, - { - "listen": "prerequest", - "script": { - "id": "d712f8b3-dca4-49e1-b94e-6794960bc0af", - "exec": [ - "var uuid = require('uuid');", - " var generatedUUID = uuid.v4();", - " pm.environment.set('bulkRequestId', generatedUUID);" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [ - { - "key": "Accept", - "value": "application/vnd.interoperability.participants+json;version=1", - "type": "text" - }, - { - "key": "Cache-Control", - "value": "no-cache", - "type": "text" - }, - { - "key": "Date", - "value": "", - "type": "text" - }, - { - "key": "FSPIOP-Source", - "value": "{{fsp_mockfsp01_id}}", - "type": "text" - }, - { - "key": "Content-Type", - "name": "Content-Type", - "value": "application/vnd.interoperability.participants+json;version=1.0", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\n\t\"requestId\": \"{{bulkRequestId}}\",\n\t\"partyList\":\n\t [ {\n\t \"partyIdType\": \"MSISDN\",\n\t \"partyIdentifier\": \"00319875638746\",\n\t \"fspId\": \"payerfsp\"\n\t },\n\t {\n\t \"partyIdType\": \"BUSINESS\",\n\t \"partyIdentifier\": \"00419875689759\",\n\t \"fspId\": \"payeefsp\"\n\t } ],\n\t \"currency\": \"USD\"\n}" - }, - "url": { - "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/participants", - "host": [ - "{{HOST_ACCOUNT_LOOKUP_SERVICE}}" - ], - "path": [ - "participants" - ] - } - }, - "response": [] - } - ], - "description": "Author: Sridevi Miriyala\n\nFolder for participants.\nParticipant is a FSP.\n", - "event": [ - { - "listen": "prerequest", - "script": { - "id": "5dfe9046-ff53-434f-aa92-89faa8d0fd87", - "type": "text/javascript", - "exec": [ - "" - ] - } - }, - { - "listen": "test", - "script": { - "id": "462ee703-cad7-4da9-a007-284fcb5927f4", - "type": "text/javascript", - "exec": [ - "" - ] - } - } - ], - "protocolProfileBehavior": {}, - "_postman_isSubFolder": true - }, - { - "name": "parties", - "item": [ - { - "name": "/MSISDN/ID", - "item": [ - { - "name": "GET - PartiesByTypeAndID", - "item": [ - { - "name": "202", - "item": [ + }, { - "name": "202 - Accepted", + "name": "400 - Malformed - 3101 - Invalid FSPID > 32 char", "event": [ { "listen": "test", "script": { - "id": "fdb13fdb-0720-4c9d-8ff1-d28765c9fa5d", + "id": "c11075ed-0aa5-4631-a8a4-5bbf1b7fbddb", "exec": [ - "pm.test(\"Status code is 202\", function () {", - " pm.response.to.have.status(202);", + "pm.test(\"Status code is 400\", function () {", + " pm.response.to.have.status(400);", "});", "", - "//Check data on payee side", - "setTimeout(function () {", - " pm.sendRequest(pm.environment.get(\"HOST_SIMULATOR\")+\"/payeefsp/requests/\"+pm.environment.get(\"pathfinderMSISDN\"), function (err, response) {", - " ", - " if(response.responseSize !== 0) { ", - " //Checking headers", - " var headers = response.json().headers;", - " pm.test(\"payeefsp fspiop-source is payerfsp\", function () {", - " pm.expect(headers['fspiop-source']).to.eql('payerfsp');", - " });", - " ", - " pm.test(\"payeefsp fspiop-destination is payeefsp\", function () {", - " pm.expect(headers['fspiop-destination']).to.eql('payeefsp');", - " });", - " ", - " pm.test(\"payeefsp content-type should be application/vnd.interoperability.parties+json;version=1.0\", function () {", - " pm.expect(headers['content-type']).to.eql('application/vnd.interoperability.parties+json;version=1.0');", - " });", - " ", - " //pm.test(\"payeefsp accept should be application/vnd.interoperability.parties+json;version=1\", function () {", - " // pm.expect(headers['accept']).to.eql('should be application/vnd.interoperability.parties+json;version=1');", - " //});", - " ", - " ", - " ", - " //Validate protected header inside Signature", - " var {signature,protectedHeader} = JSON.parse(headers['fspiop-signature'])", - " var decodedProtectedHeaders = JSON.parse(atob(protectedHeader))", - " console.log('decodedProtectedHeaders:',decodedProtectedHeaders)", - " ", - " pm.test(\"FSPIOP-Signature Protected Header alg to be RS256\", function () {", - " pm.expect(decodedProtectedHeaders['alg']).to.eql('RS256');", - " });", - " pm.test(\"FSPIOP-Signature Protected Header FSPIOP-URI to be /parties\", function () {", - " pm.expect(decodedProtectedHeaders['FSPIOP-URI']).to.eql('/parties');", - " });", - " ", - "", - " pm.test(\"FSPIOP-Signature Protected Header FSPIOP-HTTP-Method to be GET\", function () {", - " pm.expect(decodedProtectedHeaders['FSPIOP-HTTP-Method']).to.eql('GET');", - " });", - " pm.test(\"FSPIOP-Signature Protected Header FSPIOP-Source to be Payerfsp\", function () {", - " pm.expect(decodedProtectedHeaders['FSPIOP-Source']).to.eql('payerfsp');", - " });", - " pm.test(\"FSPIOP-Signature Protected Header FSPIOP-Destination to be payeefsp\", function () {", - " pm.expect(decodedProtectedHeaders['FSPIOP-Destination']).to.eql('payeefsp');", - " });", - " pm.test(\"FSPIOP-Signature Protected Header Date is present\", function () {", - " pm.expect(decodedProtectedHeaders['Date']).to.not.eql(undefined);", - " });", - " ", - " pm.test(\"payeefsp FSPIOP-URI to be /parties\", function () {", - " pm.expect(headers['fspiop-uri']).to.eql('/parties');", - " });", - " ", - " pm.test(\"payeefsp fspiop-http-method is GET\", function () {", - " pm.expect(headers['fspiop-http-method']).to.eql('GET');", - " });", - " ", - " ", - " ", - " } else {", - " pm.test(\"Parties FAILED - payeeFSP\", function () {", - " throw new Error('Did not receive response');", - " });", - " ", - " }", - " ", - " });", - "}, 4000)", + "var jsonData = pm.response.json();", + " ", + "pm.test(\"Check Malformed syntax - fspId length must be less than or equal to 32 characters long\", function () {", + " pm.expect(jsonData.errorInformation.errorDescription).to.include('Malformed syntax');", + "}); ", + " ", + "pm.test(\"Check Error code 3101\", function () {", + " pm.expect(jsonData.errorInformation.errorCode).to.eql('3101');", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Accept", + "value": "application/vnd.interoperability.participants+json;version=1", + "type": "text" + }, + { + "key": "Date", + "value": "{{dateHeader}}", + "type": "text" + }, + { + "key": "FSPIOP-Source", + "value": "{{payerfsp}}", + "type": "text" + }, + { + "key": "Content-Type", + "value": "application/vnd.interoperability.participants+json;version=1.0", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"fspId\": \"123456789012345678901234567890123\",\n\t\"currency\": \"{{currency}}\"\n}" + }, + "url": { + "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/participants/MSISDN/{{pathfinderMSISDN}}", + "host": [ + "{{HOST_ACCOUNT_LOOKUP_SERVICE}}" + ], + "path": [ + "participants", + "MSISDN", + "{{pathfinderMSISDN}}" + ] + } + }, + "response": [] + }, + { + "name": "400 - Malformed Type - 3101 - Invalid FSPID - 0 in data", + "event": [ + { + "listen": "test", + "script": { + "id": "c11075ed-0aa5-4631-a8a4-5bbf1b7fbddb", + "exec": [ + "pm.test(\"Status code is 400\", function () {", + " pm.response.to.have.status(400);", + "});", "", - "//Check data on payer side", - "setTimeout(function () {", - " pm.sendRequest(pm.environment.get(\"HOST_SIMULATOR\")+\"/payerfsp/callbacks/\"+pm.environment.get(\"pathfinderMSISDN\"), function (err, response) {", - " ", - " if(response.responseSize !== 0) { ", - " //Checking headers", - " var headers = response.json().headers;", - " pm.test(\"payerfsp fspiop-source is payeefsp\", function () {", - " pm.expect(headers['fspiop-source']).to.eql('payeefsp');", - " });", - " ", - " pm.test(\"payerfsp fspiop-destination is payerfsp\", function () {", - " pm.expect(headers['fspiop-destination']).to.eql('payerfsp');", - " });", - " ", - " pm.test(\"payerfsp content-type should be application/vnd.interoperability.parties+json;version=1.0\", function () {", - " pm.expect(headers['content-type']).to.eql('application/vnd.interoperability.parties+json;version=1.0');", - " });", - " ", - " pm.test(\"payerfsp accept is empty\", function () {", - " pm.expect(headers['accept']).to.eql(undefined);", - " });", - " ", - " ", - " ", - " //Validate protected header inside Signature", - " var {signature,protectedHeader} = JSON.parse(headers['fspiop-signature'])", - " var decodedProtectedHeaders = JSON.parse(atob(protectedHeader))", - " console.log('decodedProtectedHeaders:',decodedProtectedHeaders)", - " ", - " // pm.test(\"FSPIOP-Signature signature is returned\", function () {", - " // pm.expect(signature).to.eql(pm.environment.get(\"payeefsp-signature\"));", - " // });", - " ", - " pm.test(\"FSPIOP-Signature Protected Header alg to be RS256\", function () {", - " pm.expect(decodedProtectedHeaders['alg']).to.eql('RS256');", - " });", - " pm.test(\"FSPIOP-Signature Protected Header FSPIOP-URI to be /parties/MSISDN/\"+pm.environment.get(\"pathfinderMSISDN\"), function () {", - " pm.expect(decodedProtectedHeaders['FSPIOP-URI']).to.eql('/parties/MSISDN/'+pm.environment.get(\"pathfinderMSISDN\"));", - " });", - " ", - "", - " pm.test(\"FSPIOP-Signature Protected Header FSPIOP-HTTP-Method to be PUT\", function () {", - " pm.expect(decodedProtectedHeaders['FSPIOP-HTTP-Method']).to.eql('PUT');", - " });", - " pm.test(\"FSPIOP-Signature Protected Header FSPIOP-Source to be mojaloop-sdk\", function () {", - " pm.expect(decodedProtectedHeaders['FSPIOP-Source']).to.eql('payeefsp');", - " });", - " pm.test(\"FSPIOP-Signature Protected Header FSPIOP-Destination to be payerfsp\", function () {", - " pm.expect(decodedProtectedHeaders['FSPIOP-Destination']).to.eql('payerfsp');", - " });", - " pm.test(\"FSPIOP-Signature Protected Header Date is present\", function () {", - " pm.expect(decodedProtectedHeaders['Date']).to.not.eql(undefined);", - " });", - " ", - " //pm.test(\"payerfsp FSPIOP-URI to be /parties/MSISDN/\"+pm.environment.get(\"pathfinderMSISDN\"), function () {", - " // pm.expect(headers['fspiop-uri']).to.eql('/parties/MSISDN/'+pm.environment.get(\"pathfinderMSISDN\"));", - " //});", - " ", - " pm.test(\"payerfsp fspiop-http-method is PUT\", function () {", - " pm.expect(headers['fspiop-http-method']).to.eql('PUT');", - " });", - " ", - " //Checking data", - " var jsonData = response.json().data;", - " pm.test(\"Expected receiver first name is: \"+pm.variables.get(\"expectedFirstName\"), function () {", - " pm.expect(jsonData.party.personalInfo.complexName.firstName).to.eql(pm.variables.get(\"expectedFirstName\"));", - " });", - " pm.test(\"Expected receiver last name is: \"+pm.variables.get(\"expectedLastName\"), function () {", - " pm.expect(jsonData.party.personalInfo.complexName.lastName).to.eql(pm.variables.get(\"expectedLastName\"));", - " });", - " pm.test(\"Expected receiver DOB: \"+pm.variables.get(\"expectedDOB\"), function () {", - " pm.expect(jsonData.party.personalInfo.dateOfBirth).to.eql(pm.variables.get(\"expectedDOB\"));", - " }); ", - " ", - " } else {", - " pm.test(\"Parties FAILED - payerFSP\", function () {", - " throw new Error('Did not receive response');", - " });", - " ", - " }", - " ", - " });", - "}, 4000)", - "", - "" - ], - "type": "text/javascript" - } - }, - { - "listen": "prerequest", - "script": { - "id": "857a50b8-ed16-412f-9798-dd568bfd5a71", - "exec": [ - "pm.variables.set('expectedFspId', 'payeefsp');", - "pm.variables.set('expectedFullName', 'Siabelo Maroka');", - "pm.variables.set('expectedFirstName', 'Siabelo');", - "pm.variables.set('expectedLastName', 'Maroka');", - "pm.variables.set('expectedDOB', '3/3/1973');", - "", - "var requestData = {", - " \"party\": {", - " \"partyIdInfo\": {", - " \"partyIdType\": \"MSISDN\",", - " \"partyIdentifier\": \"17039811907\",", - " \"fspId\": \"payeefsp\"", - " },", - " \"name\": \"Siabelo Maroka\",", - " \"personalInfo\": {", - " \"complexName\": {", - " \"firstName\": \"Siabelo\",", - " \"lastName\": \"Maroka\"", - " },", - " \"dateOfBirth\": \"3/3/1973\"", - " }", - " }", - "}", - "", - "const addUserRequest = {", - " url: pm.environment.get(\"HOST_SIMULATOR\")+\"/payeefsp/parties/MSISDN/\"+pm.environment.get(\"pathfinderMSISDN\"),", - " method: 'POST',", - " headers: {", - " \"content-type\": \"application/json\",", - " },", - " body: JSON.stringify(requestData)", - "};", - "pm.sendRequest(addUserRequest, function (err, res) {", - " console.log(err ? err : res);", - "});", - "", - "" + "var jsonData = pm.response.json();", + " ", + "pm.test(\"Check Missing mandatory element - fspId is not allowed to be empty\", function () {", + " pm.expect(jsonData.errorInformation.errorDescription).to.include('Missing mandatory element ');", + "}); ", + " ", + "pm.test(\"Check Error code 3102\", function () {", + " pm.expect(jsonData.errorInformation.errorCode).to.eql('3102');", + "});" ], "type": "text/javascript" } } ], "request": { - "method": "GET", + "method": "POST", "header": [ { "key": "Accept", - "value": "application/vnd.interoperability.parties+json;version=1" + "type": "text", + "value": "application/vnd.interoperability.participants+json;version=1" }, { - "key": "Content-Type", - "value": "application/vnd.interoperability.parties+json;version=1.0" + "key": "Date", + "type": "text", + "value": "{{dateHeader}}" }, { "key": "FSPIOP-Source", + "type": "text", "value": "{{payerfsp}}" }, { - "key": "Date", - "value": "{{dateHeader}}" + "key": "Content-Type", + "type": "text", + "value": "application/vnd.interoperability.participants+json;version=1.0" } ], + "body": { + "mode": "raw", + "raw": "{\n\t\"fspId\": \"\",\n\t\"currency\": \"{{currency}}\"\n}" + }, "url": { - "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/parties/MSISDN/{{pathfinderMSISDN}}", + "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/participants/MSISDN/{{pathfinderMSISDN}}", "host": [ "{{HOST_ACCOUNT_LOOKUP_SERVICE}}" ], "path": [ - "parties", + "participants", "MSISDN", "{{pathfinderMSISDN}}" ] } }, "response": [] - } - ], - "protocolProfileBehavior": {}, - "_postman_isSubFolder": true - }, - { - "name": "400 - Error Code", - "item": [ + }, { - "name": "400 - 3101 - Malformed MSISDN", + "name": "400 - Malformed Type - 3101/3 - extra elements in currency - BUG", "event": [ - { - "listen": "prerequest", - "script": { - "id": "9cf7d011-ba2b-48b2-abf4-a2ed7ae0a6e8", - "exec": [ - "pm.environment.set('dateHeader', (new Date()).toUTCString());", - "" - ], - "type": "text/javascript" - } - }, { "listen": "test", "script": { - "id": "3472322e-3146-4049-a128-f281e0be340e", + "id": "c11075ed-0aa5-4631-a8a4-5bbf1b7fbddb", "exec": [ - "pm.test(\"Status code is 202\", function () {", - " pm.response.to.have.status(202);", + "pm.test(\"Status code is 400\", function () {", + " pm.response.to.have.status(400);", "});", - "" + "", + "var jsonData = pm.response.json();", + " ", + "pm.test(\"Check Malformed syntax - CurrencyEnum\", function () {", + " pm.expect(jsonData.errorInformation.errorDescription).to.include('Malformed syntax');", + "}); ", + " ", + "pm.test(\"Check Error code 3101\", function () {", + " pm.expect(jsonData.errorInformation.errorCode).to.eql('3101');", + "});" ], "type": "text/javascript" } } ], "request": { - "method": "GET", + "method": "POST", "header": [ { "key": "Accept", - "value": "application/vnd.interoperability.parties+json;version=1", + "value": "application/vnd.interoperability.participants+json;version=1", "type": "text" }, { @@ -2048,204 +1642,297 @@ }, { "key": "Content-Type", - "value": "application/vnd.interoperability.parties+json;version=1.0", + "value": "application/vnd.interoperability.participants+json;version=1.0", "type": "text" } ], + "body": { + "mode": "raw", + "raw": "{\n\t\"fspId\": \"{{payeefsp}}\",\n\t\"currency\": \"{{currency}},GBP\"\n}" + }, "url": { - "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/parties/MSISDN/@3456!", + "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/participants/MSISDN/{{pathfinderMSISDN}}", "host": [ "{{HOST_ACCOUNT_LOOKUP_SERVICE}}" ], "path": [ - "parties", + "participants", "MSISDN", - "@3456!" + "{{pathfinderMSISDN}}" ] - }, - "description": "Format of the parameter is not valid. For example, amount set to 5.ABC. The error description field should specify which information element is erroneous." + } }, "response": [] - }, + } + ], + "protocolProfileBehavior": {}, + "_postman_isSubFolder": true + } + ], + "protocolProfileBehavior": {}, + "_postman_isSubFolder": true + }, + { + "name": "DEL - ParticipantsByTypeAndID ( NOT IMPLEMENTED )", + "item": [], + "protocolProfileBehavior": {}, + "_postman_isSubFolder": true + }, + { + "name": "PUT - ParticipantsByTypeAndID ( NOT IMPLEMENTED )", + "item": [ + { + "name": "200", + "item": [ { - "name": "400 - 3101 - Malformed Type (BUG)", + "name": "200 - Accepted (BUG)", "event": [ { - "listen": "prerequest", + "listen": "test", "script": { - "id": "9cf7d011-ba2b-48b2-abf4-a2ed7ae0a6e8", + "id": "df53ac68-44bc-4b61-9296-8857e0fe7c8d", "exec": [ - "pm.environment.set('dateHeader', (new Date()).toUTCString());", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "", "" ], "type": "text/javascript" } }, { - "listen": "test", + "listen": "prerequest", "script": { - "id": "3472322e-3146-4049-a128-f281e0be340e", + "id": "0cb60963-9178-4069-9360-82a0664a0db8", "exec": [ - "pm.test(\"Status code is 400\", function () {", - " pm.response.to.have.status(400);", - "});", + "pm.variables.set('expectedFspId', 'payeefsp');", "", - "setTimeout(function () {", - " pm.sendRequest(pm.environment.get(\"HOST_SIMULATOR\")+\"/payerfsp/correlationid/\"+pm.variables.get(\"pathfinderMSISDN\"), function (err, response) {", - " //console.log(response.json());", - " pm.test(\"Error message is expected as response.\", function () {", - " pm.expect(response.json().errorCode).to.eql('3101');", - " pm.expect(response.json().errorDescription).to.eql('Malformed Type');", - " });", - " });", - "}, 1000)" + "" ], "type": "text/javascript" } } ], "request": { - "method": "GET", + "method": "PUT", "header": [ { - "key": "Accept", + "key": "accept", "type": "text", "value": "application/vnd.interoperability.participants+json;version=1" }, { - "key": "Date", + "key": "content-type", + "type": "text", + "value": "application/vnd.interoperability.participants+json;version=1.0" + }, + { + "key": "date", "type": "text", "value": "{{dateHeader}}" }, { - "key": "FSPIOP-Source", + "key": "fspiop-source", "type": "text", "value": "{{payerfsp}}" }, { - "key": "Content-Type", - "value": "application/vnd.interoperability.participants+json;version=1.0;", - "type": "text" - } - ], - "url": { - "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/parties/XYZ/{{pathfinderMSISDN}}", - "host": [ - "{{HOST_ACCOUNT_LOOKUP_SERVICE}}" - ], - "path": [ - "parties", - "XYZ", - "{{pathfinderMSISDN}}" - ] - }, - "description": "Format of the parameter is not valid. For example, amount set to 5.ABC. The error description field should specify which information element is erroneous." - }, - "response": [] - }, - { - "name": "400 - 3101 - Malformed Header (BUG)", - "event": [ - { - "listen": "prerequest", - "script": { - "id": "9cf7d011-ba2b-48b2-abf4-a2ed7ae0a6e8", - "exec": [ - "pm.environment.set('dateHeader', (new Date()).toUTCString());", - "" - ], - "type": "text/javascript" - } - }, - { - "listen": "test", - "script": { - "id": "3472322e-3146-4049-a128-f281e0be340e", - "exec": [ - "pm.test(\"Status code is 400\", function () {", - " pm.response.to.have.status(400);", - "});", - "", - "setTimeout(function () {", - " pm.sendRequest(pm.environment.get(\"HOST_SIMULATOR\")+\"/payerfsp/correlationid/\"+pm.variables.get(\"pathfinderMSISDN\"), function (err, response) {", - " //console.log(response.json());", - " pm.test(\"Error message is expected as response.\", function () {", - " pm.expect(response.json().errorCode).to.eql('3101');", - " pm.expect(response.json().errorDescription).to.eql('Malformed MSISDN');", - " });", - " });", - "}, 1000)" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "GET", - "header": [ + "key": "x-forwarded-for", + "type": "text", + "value": "", + "disabled": true + }, { - "key": "Accept", + "key": "fspiop-destination", "type": "text", - "value": "xyz" + "value": "", + "disabled": true }, { - "key": "Date", + "key": "fspiop-encryption", "type": "text", - "value": "{{dateHeader}}" + "value": "", + "disabled": true }, { - "key": "FSPIOP-Source", + "key": "fspiop-signature", "type": "text", - "value": "{{hub_operator}}" + "value": "{{fspiop-signature}}" }, { - "key": "Content-Type", - "value": "application/vnd.interoperability.parties+json;version=1.0;", - "type": "text" + "key": "fspiop-uri", + "type": "text", + "value": "/participants/MSISDN/{{pathfinderMSISDN}}" + }, + { + "key": "fspiop-http-method", + "type": "text", + "value": "GET" + }, + { + "key": "content-length", + "type": "text", + "value": "", + "disabled": true } ], + "body": { + "mode": "raw", + "raw": "{\"fspId\":\"testfsp\"}" + }, "url": { - "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/parties/MSISDN/{{pathfinderMSISDN}}", + "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/participants/MSISDN/{{pathfinderMSISDN}}", "host": [ "{{HOST_ACCOUNT_LOOKUP_SERVICE}}" ], "path": [ - "parties", + "participants", "MSISDN", "{{pathfinderMSISDN}}" ] }, - "description": "Format of the parameter is not valid. For example, amount set to 5.ABC. The error description field should specify which information element is erroneous." + "description": "Author: Sridevi Miriyala\n\nURI param: MSISDN\n" }, "response": [] - }, + } + ], + "protocolProfileBehavior": {}, + "_postman_isSubFolder": true + } + ], + "protocolProfileBehavior": {}, + "_postman_isSubFolder": true + } + ], + "event": [ + { + "listen": "prerequest", + "script": { + "id": "21673bb5-9a73-4935-a98b-60a567962f2b", + "type": "text/javascript", + "exec": [ + "" + ] + } + }, + { + "listen": "test", + "script": { + "id": "bd868a9b-b1e2-4301-8b92-54e09f013db6", + "type": "text/javascript", + "exec": [ + "" + ] + } + } + ], + "protocolProfileBehavior": {}, + "_postman_isSubFolder": true + }, + { + "name": "/BUSINESS/ID - Not validated", + "item": [ + { + "name": "GET - ParticipantsByTypeAndID", + "item": [ + { + "name": "202", + "item": [ { - "name": "404 - 3102 - Missing Mandatory ID (BUG)", + "name": "202 - Accepted (BUG)", "event": [ { "listen": "test", "script": { "id": "df53ac68-44bc-4b61-9296-8857e0fe7c8d", "exec": [ - "pm.test(\"Status code is 404\", function () {", - " pm.response.to.have.status(404);", + "pm.test(\"Status code is 202\", function () {", + " pm.response.to.have.status(202);", "});", "", - "// pm.test(\"Check that Content-Type is present\", function () {", - "// pm.response.to.have.header(\"Content-Type\");", - "// pm.response.to.be.header(\"Content-Type\", \"application/vnd.interoperability.parties+json;version=1.0\");", - "// });", "", - "setTimeout(function () {", - " pm.sendRequest(pm.environment.get(\"HOST_SIMULATOR\")+\"/payerfsp/callbacks/\"+pm.variables.get(\"pathfinderMSISDN\"), function (err, response) {", - " //console.log(response.json());", - " pm.test(\"Expected receiver fspId is: \"+pm.variables.get(\"expectedFspId\"), function () {", - " pm.expect(response.json().party.personalInfo.complexName.firstName).to.eql(pm.variables.get(\"expectedFspId\"));", - " });", + "//Check data on payer side", + "// setTimeout(function () {", + "// pm.sendRequest(pm.environment.get(\"HOST_SIMULATOR\")+\"/payerfsp/callbacks/\"+pm.variables.get(\"pathfinderMSISDN\"), function (err, response) {", + " ", + "// if(response.responseSize !== 0) { ", + " ", + "// //Checking headers", + "// var headers = response.json().headers;", + "// pm.test(\"payerfsp fspiop-source is switch\", function () {", + "// pm.expect(headers['fspiop-source']).to.eql('switch');", + "// });", + " ", + "// pm.test(\"payerfsp fspiop-destination is payerfsp\", function () {", + "// pm.expect(headers['fspiop-destination']).to.eql('payerfsp');", + "// });", + " ", + "// pm.test(\"payerfsp content-type should be application/vnd.interoperability.participants+json;version=1.0\", function () {", + "// pm.expect(headers['content-type']).to.eql('application/vnd.interoperability.participants+json;version=1.0');", + "// });", + " ", + "// pm.test(\"payerfsp accept is empty\", function () {", + "// pm.expect(headers['accept']).to.eql(undefined);", + "// });", + " ", + " ", " ", + "// // //Validate protected header inside Signature", + "// // var {signature,protectedHeader} = JSON.parse(headers['fspiop-signature'])", + "// // var decodedProtectedHeaders = JSON.parse(atob(protectedHeader))", + "// // console.log('decodedProtectedHeaders:',decodedProtectedHeaders)", + " ", + "// // // pm.test(\"FSPIOP-Signature signature is returned\", function () {", + "// // // pm.expect(signature).to.eql(pm.environment.get(\"payeefsp-signature\"));", + "// // // });", + " ", + "// // pm.test(\"FSPIOP-Signature Protected Header alg to be RS256\", function () {", + "// // pm.expect(decodedProtectedHeaders['alg']).to.eql('RS256');", + "// // });", + "// // pm.test(\"FSPIOP-Signature Protected Header FSPIOP-URI to be /participants/MSISDN/\"+pm.environment.get(\"pathfinderMSISDN\"), function () {", + "// // pm.expect(decodedProtectedHeaders['FSPIOP-URI']).to.eql('/participants/MSISDN/'+pm.environment.get(\"pathfinderMSISDN\"));", + "// // });", + " ", + "", + "// // pm.test(\"FSPIOP-Signature Protected Header FSPIOP-HTTP-Method to be PUT\", function () {", + "// // pm.expect(decodedProtectedHeaders['FSPIOP-HTTP-Method']).to.eql('PUT');", + "// // });", + "// // pm.test(\"FSPIOP-Signature Protected Header FSPIOP-Source to be switch\", function () {", + "// // pm.expect(decodedProtectedHeaders['FSPIOP-Source']).to.eql('switch');", + "// // });", + "// // pm.test(\"FSPIOP-Signature Protected Header FSPIOP-Destination to be payerfsp\", function () {", + "// // pm.expect(decodedProtectedHeaders['FSPIOP-Destination']).to.eql('payerfsp');", + "// // });", + "// // pm.test(\"FSPIOP-Signature Protected Header Date is present\", function () {", + "// // pm.expect(decodedProtectedHeaders['Date']).to.not.eql(undefined);", + "// // });", + " ", + "// pm.test(\"payerfsp fspiop-uri to be /parties/MSISDN/\"+pm.environment.get(\"pathfinderMSISDN\"), function () {", + "// pm.expect(headers['fspiop-uri']).to.eql('/parties/MSISDN/'+pm.environment.get(\"pathfinderMSISDN\"));", + "// });", + " ", + "// pm.test(\"payerfsp fspiop-http-method is PUT\", function () {", + "// pm.expect(headers['fspiop-http-method']).to.eql('PUT');", + "// });", + " ", + "// //Checking data", + "// var jsonData = response.json().data;", + "// pm.test(\"Expected fspid is payeefsp \", function () {", + "// pm.expect(jsonData.fspId).to.eql(pm.variables.get(\"payeefsp\"));", + "// });", + " ", + " ", + "// } else {", + "// pm.test(\"Parties FAILED - payerFSP\", function () {", + "// throw new Error('Did not receive response');", + "// });", + " ", + "// }", " ", - " });", - "}, 1000)", + "// });", + "// }, 4000)", "", "" ], @@ -2258,7 +1945,6 @@ "id": "0cb60963-9178-4069-9360-82a0664a0db8", "exec": [ "pm.variables.set('expectedFspId', 'payeefsp');", - "pm.variables.set('participantDateHeader', (new Date()).toUTCString());", "", "" ], @@ -2270,79 +1956,119 @@ "method": "GET", "header": [ { - "key": "Accept", - "value": "application/vnd.interoperability.participants+json;version=1" + "key": "accept", + "value": "application/vnd.interoperability.participants+json;version=1", + "type": "text" }, { - "key": "Content-Type", - "value": "application/vnd.interoperability.participants+json;version=1.0" + "key": "content-type", + "value": "application/vnd.interoperability.participants+json;version=1.0", + "type": "text" }, { - "key": "FSPIOP-Source", - "value": "{{payerfsp}}" + "key": "date", + "value": "{{dateHeader}}", + "type": "text" }, { - "key": "Date", - "value": "{{dateHeader}}" + "key": "fspiop-source", + "value": "{{payerfsp}}", + "type": "text" + }, + { + "key": "x-forwarded-for", + "value": "", + "type": "text", + "disabled": true + }, + { + "key": "fspiop-destination", + "value": "", + "type": "text", + "disabled": true + }, + { + "key": "fspiop-encryption", + "value": "", + "type": "text", + "disabled": true + }, + { + "key": "fspiop-signature", + "value": "{{fspiop-signature}}", + "type": "text" + }, + { + "key": "fspiop-uri", + "value": "/participants/MSISDN/{{pathfinderMSISDN}}", + "type": "text" + }, + { + "key": "fspiop-http-method", + "value": "GET", + "type": "text" + }, + { + "key": "content-length", + "value": "", + "type": "text", + "disabled": true } ], "url": { - "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/parties/MSISDN/", + "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/participants/BUSINESS/{{pathfinderMSISDN}}", "host": [ "{{HOST_ACCOUNT_LOOKUP_SERVICE}}" ], "path": [ - "parties", - "MSISDN", - "" + "participants", + "BUSINESS", + "{{pathfinderMSISDN}}" ] - } + }, + "description": "Author: Sridevi Miriyala\n\nURI param: MSISDN\n" }, "response": [] - }, + } + ], + "protocolProfileBehavior": {}, + "_postman_isSubFolder": true + }, + { + "name": "400", + "item": [ { - "name": "400 - 3102 - Missing Mandatory Headers (BUG)", + "name": "400 - 3101 - Malformed Type (BUG)", "event": [ { - "listen": "test", + "listen": "prerequest", "script": { - "id": "df53ac68-44bc-4b61-9296-8857e0fe7c8d", + "id": "9cf7d011-ba2b-48b2-abf4-a2ed7ae0a6e8", + "exec": [ + "pm.environment.set('dateHeader', (new Date()).toUTCString());", + "" + ], + "type": "text/javascript" + } + }, + { + "listen": "test", + "script": { + "id": "3472322e-3146-4049-a128-f281e0be340e", "exec": [ "pm.test(\"Status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", - "// pm.test(\"Check that Content-Type is present\", function () {", - "// pm.response.to.have.header(\"Content-Type\");", - "// pm.response.to.be.header(\"Content-Type\", \"application/vnd.interoperability.parties+json;version=1.0\");", - "// });", - "", "setTimeout(function () {", " pm.sendRequest(pm.environment.get(\"HOST_SIMULATOR\")+\"/payerfsp/correlationid/\"+pm.variables.get(\"pathfinderMSISDN\"), function (err, response) {", " //console.log(response.json());", " pm.test(\"Error message is expected as response.\", function () {", - " pm.expect(response.json().errorCode).to.eql('3102');", - " pm.expect(response.json().errorDescription).to.eql('Missing Date Header');", + " pm.expect(response.json().errorInformation.errorCode).to.eql('3101');", + " pm.expect(response.json().errorInformation.errorDescription).to.eql('Malformed Type');", " });", - " ", - " ", " });", - "}, 1000)", - "", - "" - ], - "type": "text/javascript" - } - }, - { - "listen": "prerequest", - "script": { - "id": "0cb60963-9178-4069-9360-82a0664a0db8", - "exec": [ - "pm.variables.set('expectedFspId', 'payeefsp');", - "pm.variables.set('participantDateHeader', (new Date()).toUTCString());", - "", - "" + "}, 1000)" ], "type": "text/javascript" } @@ -2353,248 +2079,260 @@ "header": [ { "key": "Accept", + "type": "text", "value": "application/vnd.interoperability.participants+json;version=1" }, { - "key": "Content-Type", - "value": "application/vnd.interoperability.participants+json;version=1.0" + "key": "Date", + "type": "text", + "value": "{{dateHeader}}" }, { "key": "FSPIOP-Source", + "type": "text", "value": "{{payerfsp}}" - }, - { - "key": "Date", - "value": "{{dateHeader}}", - "disabled": true } ], "url": { - "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/parties/MSISDN/{{pathfinderMSISDN}}", + "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/participants/XYZ/{{pathfinderMSISDN}}", "host": [ "{{HOST_ACCOUNT_LOOKUP_SERVICE}}" ], "path": [ - "parties", - "MSISDN", + "participants", + "XYZ", "{{pathfinderMSISDN}}" ] - } + }, + "description": "Format of the parameter is not valid. For example, amount set to 5.ABC. The error description field should specify which information element is erroneous." }, "response": [] - } - ], - "protocolProfileBehavior": {}, - "_postman_isSubFolder": true - } - ], - "protocolProfileBehavior": {}, - "_postman_isSubFolder": true - }, - { - "name": "PUT - PartiesByTypeAndID", - "item": [ - { - "name": "200", - "item": [ + }, { - "name": "200 - Valid Request", + "name": "400 - 3101 - Malformed Header (BUG)", "event": [ + { + "listen": "prerequest", + "script": { + "id": "9cf7d011-ba2b-48b2-abf4-a2ed7ae0a6e8", + "exec": [ + "pm.environment.set('dateHeader', (new Date()).toUTCString());", + "" + ], + "type": "text/javascript" + } + }, { "listen": "test", "script": { - "id": "76d6c169-8ddc-4595-8516-b93d15ed72ec", + "id": "3b65ac8a-b8ef-4fef-b3bb-9640778e4aa4", "exec": [ - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});" + "pm.test(\"Status code is 400\", function () {", + " pm.response.to.have.status(400);", + "});", + "", + "setTimeout(function () {", + " pm.sendRequest(pm.environment.get(\"HOST_SIMULATOR\")+\"/payerfsp/correlationid/\"+pm.variables.get(\"pathfinderMSISDN\"), function (err, response) {", + " //console.log(response.json());", + " pm.test(\"Error message is expected as response.\", function () {", + " pm.expect(response.json().errorInformation.errorCode).to.eql('3101');", + " pm.expect(response.json().errorInformation.errorDescription).to.eql('Malformed Type');", + " });", + " });", + "}, 1000)" ], "type": "text/javascript" } } ], "request": { - "method": "PUT", + "method": "GET", "header": [ { "key": "Accept", - "type": "text", - "value": "application/vnd.interoperability.parties+json;version=1", - "disabled": true + "value": "xyz" }, { "key": "Date", - "type": "text", "value": "{{dateHeader}}" }, { "key": "FSPIOP-Source", - "type": "text", - "value": "{{payeefsp}}" - }, - { - "key": "FSPIOP-Destination", - "type": "text", "value": "{{payerfsp}}" - }, - { - "key": "Content-Type", - "type": "text", - "value": "application/vnd.interoperability.parties+json;version=1.0" } ], - "body": { - "mode": "raw", - "raw": "{\n \"party\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"MSISDN\",\n \"partyIdentifier\": \"{{pathfinderMSISDN}}\",\n \"fspId\": \"{{payeefsp}}\"\n },\n \"name\": \"{{fullName}}\",\n \"personalInfo\": {\n \"complexName\": {\n \"firstName\": \"{{firstName}}\",\n \"lastName\": \"{{lastName}}\"\n },\n \"dateOfBirth\": \"{{dob}}\"\n }\n }\n}" - }, "url": { - "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/parties/MSISDN/17855501914", + "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/participants/BUSINESS/{{pathfinderMSISDN}}", "host": [ "{{HOST_ACCOUNT_LOOKUP_SERVICE}}" ], "path": [ - "parties", - "MSISDN", - "17855501914" + "participants", + "BUSINESS", + "{{pathfinderMSISDN}}" ] - } + }, + "description": "Format of the parameter is not valid. For example, amount set to 5.ABC. The error description field should specify which information element is erroneous." }, "response": [] - } - ], - "protocolProfileBehavior": {}, - "_postman_isSubFolder": true - }, - { - "name": "400", - "item": [ + }, { - "name": "Invalid Accept Header ( BUG)", + "name": "404 - 3102 - Missing Mandatory ID (BUG)", "event": [ { "listen": "test", "script": { - "id": "76d6c169-8ddc-4595-8516-b93d15ed72ec", + "id": "df53ac68-44bc-4b61-9296-8857e0fe7c8d", "exec": [ "pm.test(\"Status code is 400\", function () {", " pm.response.to.have.status(400);", - "});" + "});", + "", + "// pm.test(\"Check that Content-Type is present\", function () {", + "// pm.response.to.have.header(\"Content-Type\");", + "// pm.response.to.be.header(\"Content-Type\", \"application/vnd.interoperability.parties+json;version=1.0\");", + "// });", + "", + "setTimeout(function () {", + " pm.sendRequest(pm.environment.get(\"HOST_SIMULATOR\")+\"/payerfsp/correlationid/\"+pm.variables.get(\"pathfinderMSISDN\"), function (err, response) {", + " //console.log(response.json());", + " pm.expect(response.json().errorInformation.errorCode).to.eql('3101');", + " pm.expect(response.json().errorInformation.errorDescription).to.eql('Malformed Type');", + " ", + " });", + "}, 1000)", + "", + "" + ], + "type": "text/javascript" + } + }, + { + "listen": "prerequest", + "script": { + "id": "0cb60963-9178-4069-9360-82a0664a0db8", + "exec": [ + "pm.variables.set('expectedFspId', 'payeefsp');", + "pm.variables.set('participantDateHeader', (new Date()).toUTCString());", + "", + "" ], "type": "text/javascript" } } ], "request": { - "method": "PUT", + "method": "GET", "header": [ { "key": "Accept", - "type": "text", - "value": "application/vnd.interoperability.parties+json;version=1" + "value": "application/vnd.interoperability.participants+json;version=1" }, { - "key": "Date", - "type": "text", - "value": "{{dateHeader}}" + "key": "Content-Type", + "value": "application/vnd.interoperability.participants+json;version=1.0" }, { "key": "FSPIOP-Source", - "type": "text", - "value": "{{payeefsp}}" - }, - { - "key": "FSPIOP-Destination", - "type": "text", "value": "{{payerfsp}}" }, { - "key": "Content-Type", - "type": "text", - "value": "application/vnd.interoperability.parties+json;version=1.0" + "key": "Date", + "value": "{{dateHeader}}" } ], - "body": { - "mode": "raw", - "raw": "{\n \"party\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"MSISDN\",\n \"partyIdentifier\": \"{{pathfinderMSISDN}}\",\n \"fspId\": \"{{payeefsp}}\"\n },\n \"name\": \"{{fullName}}\",\n \"personalInfo\": {\n \"complexName\": {\n \"firstName\": \"{{firstName}}\",\n \"lastName\": \"{{lastName}}\"\n },\n \"dateOfBirth\": \"{{dob}}\"\n }\n }\n}" - }, "url": { - "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/parties/MSISDN/17855501914", + "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/participants/BUSINESS/", "host": [ "{{HOST_ACCOUNT_LOOKUP_SERVICE}}" ], "path": [ - "parties", - "MSISDN", - "17855501914" + "participants", + "BUSINESS", + "" ] } }, "response": [] }, { - "name": "Missing Content-TYpe (BUG)", + "name": "400 - 3102 - Missing Mandatory Headers (BUG)", "event": [ { "listen": "test", "script": { - "id": "76d6c169-8ddc-4595-8516-b93d15ed72ec", + "id": "df53ac68-44bc-4b61-9296-8857e0fe7c8d", "exec": [ "pm.test(\"Status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", - "var jsonData = pm.response.json();", + "// pm.test(\"Check that Content-Type is present\", function () {", + "// pm.response.to.have.header(\"Content-Type\");", + "// pm.response.to.be.header(\"Content-Type\", \"application/vnd.interoperability.parties+json;version=1.0\");", + "// });", "", - "pm.test(\"statusCode is 400\", function () {", - " pm.expect(jsonData.statusCode).to.eql(400);", - "});", + "setTimeout(function () {", + " pm.sendRequest(pm.environment.get(\"HOST_SIMULATOR\")+\"/payerfsp/correlationid/\"+pm.variables.get(\"pathfinderMSISDN\"), function (err, response) {", + " //console.log(response.json());", + " pm.test(\"Error message is expected as response.\", function () {", + " pm.expect(response.json().errorInformation.errorCode).to.eql('3102');", + " pm.expect(response.json().errorInformation.errorDescription).to.eql('Missing Date Header');", + " });", + " ", + " ", + " });", + "}, 1000)", "", - "pm.test(\"errorDescription is Invalid request payload input\", function () {", - " pm.expect(jsonData.message.errorInformation.errorDescription).to.eql('Invalid request payload input');", - "});" + "" ], "type": "text/javascript" } - } - ], - "request": { - "method": "PUT", - "header": [ - { - "key": "Date", - "type": "text", - "value": "{{dateHeader}}" - }, + }, + { + "listen": "prerequest", + "script": { + "id": "0cb60963-9178-4069-9360-82a0664a0db8", + "exec": [ + "pm.variables.set('expectedFspId', 'payeefsp');", + "pm.variables.set('participantDateHeader', (new Date()).toUTCString());", + "", + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "GET", + "header": [ { - "key": "FSPIOP-Source", - "type": "text", - "value": "{{payeefsp}}" + "key": "Accept", + "value": "application/vnd.interoperability.participants+json;version=1" }, { - "key": "FSPIOP-Destination", - "type": "text", + "key": "Content-Type", + "value": "application/vnd.interoperability.participants+json;version=1.0" + }, + { + "key": "FSPIOP-Source", "value": "{{payerfsp}}" }, { - "key": "Content-Type", - "type": "text", - "value": "application/vnd.interoperability.parties+json;version=1.0", + "key": "Date", + "value": "{{dateHeader}}", "disabled": true } ], - "body": { - "mode": "raw", - "raw": "{\n \"party\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"MSISDN\",\n \"partyIdentifier\": \"{{pathfinderMSISDN}}\",\n \"fspId\": \"{{payeefsp}}\"\n },\n \"name\": \"{{fullName}}\",\n \"personalInfo\": {\n \"complexName\": {\n \"firstName\": \"{{firstName}}\",\n \"lastName\": \"{{lastName}}\"\n },\n \"dateOfBirth\": \"{{dob}}\"\n }\n }\n}" - }, "url": { - "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/parties/MSISDN/17855501914", + "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/participants/BUSINESS/{{pathfinderMSISDN}}", "host": [ "{{HOST_ACCOUNT_LOOKUP_SERVICE}}" ], "path": [ - "parties", - "MSISDN", - "17855501914" + "participants", + "BUSINESS", + "{{pathfinderMSISDN}}" ] } }, @@ -2609,18 +2347,18 @@ "_postman_isSubFolder": true }, { - "name": "PUT - PartiesByTypeAndIDError", + "name": "POST - ParticipantsByTypeAndID", "item": [ { - "name": "200", + "name": "201", "item": [ { - "name": "200 - Valid Request (BUG)", + "name": "201 - Created", "event": [ { "listen": "test", "script": { - "id": "76d6c169-8ddc-4595-8516-b93d15ed72ec", + "id": "c11075ed-0aa5-4631-a8a4-5bbf1b7fbddb", "exec": [ "pm.test(\"Status code is 200\", function () {", " pm.response.to.have.status(200);", @@ -2631,11 +2369,11 @@ } ], "request": { - "method": "PUT", + "method": "POST", "header": [ { "key": "Accept", - "value": "application/vnd.interoperability.parties+json;version=1", + "value": "application/vnd.interoperability.participants+json;version=1", "type": "text" }, { @@ -2645,34 +2383,28 @@ }, { "key": "FSPIOP-Source", - "value": "{{payeefsp}}", - "type": "text" - }, - { - "key": "FSPIOP-Destination", "value": "{{payerfsp}}", "type": "text" }, { "key": "Content-Type", - "value": "application/vnd.interoperability.parties+json;version=1.0", + "value": "application/vnd.interoperability.participants+json;version=1.0", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n \"errorInformation\": {\n \"errorCode\": \"3204\",\n \"errorDescription\": \"Party with the provided identifier, identifier type, and optional sub id or type was not found.\",\n \"extensionList\": [\n {\n \"key\": \"MSISDN\",\n \"value\": \"17855501914\"\n }\n ]\n }\n}" + "raw": "{\n\t\"fspId\": \"{{payeefsp}}\",\n\t\"currency\": \"{{currency}}\"\n}" }, "url": { - "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/parties/MSISDN/17855501914/error", + "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/participants/BUSINESS/{{pathfinderMSISDN}}", "host": [ "{{HOST_ACCOUNT_LOOKUP_SERVICE}}" ], "path": [ - "parties", - "MSISDN", - "17855501914", - "error" + "participants", + "BUSINESS", + "{{pathfinderMSISDN}}" ] } }, @@ -2686,101 +2418,127 @@ "name": "400", "item": [ { - "name": "Missing Content-Type (BUG)", + "name": "400 - 3101 - Malformed BUSINESS (BUG)", "event": [ + { + "listen": "prerequest", + "script": { + "id": "9cf7d011-ba2b-48b2-abf4-a2ed7ae0a6e8", + "exec": [ + "pm.environment.set('dateHeader', (new Date()).toUTCString());", + "" + ], + "type": "text/javascript" + } + }, { "listen": "test", "script": { - "id": "76d6c169-8ddc-4595-8516-b93d15ed72ec", + "id": "3472322e-3146-4049-a128-f281e0be340e", "exec": [ "pm.test(\"Status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", - "var jsonData = pm.response.json();", - "", - "pm.test(\"statusCode is 400\", function () {", - " pm.expect(jsonData.statusCode).to.eql(400);", - "});", - "", - "pm.test(\"errorDescription is Invalid request payload input\", function () {", - " pm.expect(jsonData.message.errorInformation.errorDescription).to.eql('Invalid request payload input');", - "});" + "setTimeout(function () {", + " pm.sendRequest(pm.environment.get(\"HOST_SIMULATOR\")+\"/payerfsp/correlationid/\"+pm.variables.get(\"pathfinderMSISDN\"), function (err, response) {", + " //console.log(response.json());", + " pm.test(\"Error message is expected as response.\", function () {", + " pm.expect(response.json().errorInformation.errorCode).to.eql('3101');", + " pm.expect(response.json().errorInformation.errorDescription).to.eql('Malformed MSISDN');", + " });", + " });", + "}, 1000)" ], "type": "text/javascript" } } ], "request": { - "method": "PUT", + "method": "GET", "header": [ { "key": "Accept", - "type": "text", - "value": "application/vnd.interoperability.parties+json;version=1" + "value": "application/vnd.interoperability.participants+json;version=1", + "type": "text" }, { "key": "Date", - "type": "text", - "value": "{{dateHeader}}" + "value": "{{dateHeader}}", + "type": "text" }, { "key": "FSPIOP-Source", - "type": "text", - "value": "{{payeefsp}}" - }, - { - "key": "FSPIOP-Destination", - "type": "text", - "value": "{{payerfsp}}" + "value": "{{payerfsp}}", + "type": "text" }, { "key": "Content-Type", - "type": "text", - "value": "application/vnd.interoperability.parties+json;version=1.0", - "disabled": true + "value": "application/vnd.interoperability.participants+json;version=1.0", + "type": "text" } ], - "body": { - "mode": "raw", - "raw": "{\n \"errorInformation\": {\n \"errorCode\": \"3204\",\n \"errorDescription\": \"Party with the provided identifier, identifier type, and optional sub id or type was not found.\",\n \"extensionList\": [\n {\n \"key\": \"MSISDN\",\n \"value\": \"17855501914\"\n }\n ]\n }\n}" - }, "url": { - "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/parties/MSISDN/17855501914/error", + "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/participants/BUSINESS/@3456!", "host": [ "{{HOST_ACCOUNT_LOOKUP_SERVICE}}" ], "path": [ - "parties", - "MSISDN", - "17855501914", - "error" + "participants", + "BUSINESS", + "@3456!" ] - } + }, + "description": "Format of the parameter is not valid. For example, amount set to 5.ABC. The error description field should specify which information element is erroneous." }, "response": [] - }, + } + ], + "protocolProfileBehavior": {}, + "_postman_isSubFolder": true + } + ], + "protocolProfileBehavior": {}, + "_postman_isSubFolder": true + }, + { + "name": "DEL - ParticipantsByTypeAndID ( NOT IMPLEMENTED )", + "item": [], + "protocolProfileBehavior": {}, + "_postman_isSubFolder": true + }, + { + "name": "PUT - ParticipantsByTypeAndID", + "item": [ + { + "name": "200", + "item": [ { - "name": "Invalid Accept Header", + "name": "200 - Accepted (BUG)", "event": [ { "listen": "test", "script": { - "id": "76d6c169-8ddc-4595-8516-b93d15ed72ec", + "id": "df53ac68-44bc-4b61-9296-8857e0fe7c8d", "exec": [ - "pm.test(\"Status code is 400\", function () {", - " pm.response.to.have.status(400);", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", "});", "", - "var jsonData = pm.response.json();", "", - "pm.test(\"statusCode is 400\", function () {", - " pm.expect(jsonData.statusCode).to.eql(400);", - "});", + "" + ], + "type": "text/javascript" + } + }, + { + "listen": "prerequest", + "script": { + "id": "0cb60963-9178-4069-9360-82a0664a0db8", + "exec": [ + "pm.variables.set('expectedFspId', 'payeefsp');", "", - "pm.test(\"errorDescription is Invalid request payload input\", function () {", - " pm.expect(jsonData.message.errorInformation.errorDescription).to.eql('Invalid request payload input');", - "});" + "" ], "type": "text/javascript" } @@ -2790,47 +2548,81 @@ "method": "PUT", "header": [ { - "key": "Accept", + "key": "accept", "type": "text", - "value": "application/vnd.interoperability.parties+json;version=1" + "value": "application/vnd.interoperability.participants+json;version=1" }, { - "key": "Date", + "key": "content-type", "type": "text", - "value": "{{dateHeader}}" + "value": "application/vnd.interoperability.participants+json;version=1.0" }, { - "key": "FSPIOP-Source", + "key": "date", "type": "text", - "value": "{{payeefsp}}" + "value": "{{dateHeader}}" }, { - "key": "FSPIOP-Destination", + "key": "fspiop-source", "type": "text", "value": "{{payerfsp}}" }, { - "key": "Content-Type", + "key": "x-forwarded-for", "type": "text", - "value": "application/vnd.interoperability.parties+json;version=1.0" + "value": "", + "disabled": true + }, + { + "key": "fspiop-destination", + "type": "text", + "value": "", + "disabled": true + }, + { + "key": "fspiop-encryption", + "type": "text", + "value": "", + "disabled": true + }, + { + "key": "fspiop-signature", + "type": "text", + "value": "{{fspiop-signature}}" + }, + { + "key": "fspiop-uri", + "type": "text", + "value": "/participants/MSISDN/{{pathfinderMSISDN}}" + }, + { + "key": "fspiop-http-method", + "type": "text", + "value": "GET" + }, + { + "key": "content-length", + "type": "text", + "value": "", + "disabled": true } ], "body": { "mode": "raw", - "raw": "{\n \"errorInformation\": {\n \"errorCode\": \"3204\",\n \"errorDescription\": \"Party with the provided identifier, identifier type, and optional sub id or type was not found.\",\n \"extensionList\": [\n {\n \"key\": \"MSISDN\",\n \"value\": \"17855501914\"\n }\n ]\n }\n}" + "raw": "{\"fspId\":\"testfsp\"}" }, "url": { - "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/parties/MSISDN/17855501914/error", + "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/participants/MSISDN/{{pathfinderMSISDN}}", "host": [ "{{HOST_ACCOUNT_LOOKUP_SERVICE}}" ], "path": [ - "parties", + "participants", "MSISDN", - "17855501914", - "error" + "{{pathfinderMSISDN}}" ] - } + }, + "description": "Author: Sridevi Miriyala\n\nURI param: MSISDN\n" }, "response": [] } @@ -2839,37 +2631,141 @@ "_postman_isSubFolder": true } ], - "event": [ - { - "listen": "prerequest", - "script": { - "id": "fed530e9-53e1-4ef6-b9cc-ff3a24e6f82f", - "type": "text/javascript", - "exec": [ - "" - ] - } - }, - { - "listen": "test", - "script": { - "id": "93f5590d-d0af-4dcb-a96b-196f55b96983", - "type": "text/javascript", - "exec": [ - "" - ] - } - } - ], "protocolProfileBehavior": {}, "_postman_isSubFolder": true } ], + "event": [ + { + "listen": "prerequest", + "script": { + "id": "5a697d6f-f179-4d4d-8663-4a095245beec", + "type": "text/javascript", + "exec": [ + "" + ] + } + }, + { + "listen": "test", + "script": { + "id": "2602e128-7bed-49a0-bf13-a3db16a82f88", + "type": "text/javascript", + "exec": [ + "" + ] + } + } + ], "protocolProfileBehavior": {}, "_postman_isSubFolder": true }, { - "name": "/BUSINESS/ID", + "name": "POST Participants Bulk", + "event": [ + { + "listen": "test", + "script": { + "id": "92c0fe7a-2429-4516-9d3a-4a689c0c775e", + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});" + ], + "type": "text/javascript" + } + }, + { + "listen": "prerequest", + "script": { + "id": "d712f8b3-dca4-49e1-b94e-6794960bc0af", + "exec": [ + "var uuid = require('uuid');", + " var generatedUUID = uuid.v4();", + " pm.environment.set('bulkRequestId', generatedUUID);" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Accept", + "value": "application/vnd.interoperability.participants+json;version=1", + "type": "text" + }, + { + "key": "Cache-Control", + "value": "no-cache", + "type": "text" + }, + { + "key": "Date", + "value": "", + "type": "text" + }, + { + "key": "FSPIOP-Source", + "value": "{{fsp_mockfsp01_id}}", + "type": "text" + }, + { + "key": "Content-Type", + "name": "Content-Type", + "value": "application/vnd.interoperability.participants+json;version=1.0", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"requestId\": \"{{bulkRequestId}}\",\n\t\"partyList\":\n\t [ {\n\t \"partyIdType\": \"MSISDN\",\n\t \"partyIdentifier\": \"00319875638746\",\n\t \"fspId\": \"payerfsp\"\n\t },\n\t {\n\t \"partyIdType\": \"BUSINESS\",\n\t \"partyIdentifier\": \"00419875689759\",\n\t \"fspId\": \"payeefsp\"\n\t } ],\n\t \"currency\": \"USD\"\n}" + }, + "url": { + "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/participants", + "host": [ + "{{HOST_ACCOUNT_LOOKUP_SERVICE}}" + ], + "path": [ + "participants" + ] + } + }, + "response": [] + } + ], + "description": "Author: Sridevi Miriyala\n\nFolder for participants.\nParticipant is a FSP.\n", + "event": [ + { + "listen": "prerequest", + "script": { + "id": "5dfe9046-ff53-434f-aa92-89faa8d0fd87", + "type": "text/javascript", + "exec": [ + "" + ] + } + }, + { + "listen": "test", + "script": { + "id": "462ee703-cad7-4da9-a007-284fcb5927f4", + "type": "text/javascript", + "exec": [ + "" + ] + } + } + ], + "protocolProfileBehavior": {}, + "_postman_isSubFolder": true + }, + { + "name": "parties", + "item": [ + { + "name": "/MSISDN/ID", "item": [ { "name": "GET - PartiesByTypeAndID", @@ -2878,7 +2774,7 @@ "name": "202", "item": [ { - "name": "202 - Accepted (BUG)", + "name": "202 - Accepted", "event": [ { "listen": "test", @@ -2891,62 +2787,62 @@ "", "//Check data on payee side", "setTimeout(function () {", - " pm.sendRequest(pm.environment.get(\"HOST_SIMULATOR\")+\"/payeefsp/requests/\"+pm.environment.get(\"merchantId\"), function (err, response) {", + " pm.sendRequest(pm.environment.get(\"HOST_SIMULATOR\")+\"/payeefsp/requests/\"+pm.environment.get(\"pathfinderMSISDN\"), function (err, response) {", " ", " if(response.responseSize !== 0) { ", " //Checking headers", - " // var headers = response.json().headers;", - " // pm.test(\"payeefsp fspiop-source is payerfsp\", function () {", - " // pm.expect(headers['fspiop-source']).to.eql('payerfsp');", - " // });", + " var headers = response.json().headers;", + " pm.test(\"payeefsp fspiop-source is payerfsp\", function () {", + " pm.expect(headers['fspiop-source']).to.eql('payerfsp');", + " });", " ", - " // pm.test(\"payeefsp fspiop-destination is payeefsp\", function () {", - " // pm.expect(headers['fspiop-destination']).to.eql('payeefsp');", - " // });", + " pm.test(\"payeefsp fspiop-destination is payeefsp\", function () {", + " pm.expect(headers['fspiop-destination']).to.eql('payeefsp');", + " });", " ", - " // pm.test(\"payeefsp content-type should be application/vnd.interoperability.parties+json;version=1.0\", function () {", - " // pm.expect(headers['content-type']).to.eql('application/vnd.interoperability.parties+json;version=1.0');", - " // });", + " pm.test(\"payeefsp content-type should be application/vnd.interoperability.parties+json;version=1.0\", function () {", + " pm.expect(headers['content-type']).to.eql('application/vnd.interoperability.parties+json;version=1.0');", + " });", " ", - " // //pm.test(\"payeefsp accept should be application/vnd.interoperability.parties+json;version=1\", function () {", - " // // pm.expect(headers['accept']).to.eql('should be application/vnd.interoperability.parties+json;version=1');", - " // //});", + " //pm.test(\"payeefsp accept should be application/vnd.interoperability.parties+json;version=1\", function () {", + " // pm.expect(headers['accept']).to.eql('should be application/vnd.interoperability.parties+json;version=1');", + " //});", " ", " ", " ", - " // //Validate protected header inside Signature", - " // var {signature,protectedHeader} = JSON.parse(headers['fspiop-signature'])", - " // var decodedProtectedHeaders = JSON.parse(atob(protectedHeader))", - " // console.log('decodedProtectedHeaders:',decodedProtectedHeaders)", + " //Validate protected header inside Signature", + " var {signature,protectedHeader} = JSON.parse(headers['fspiop-signature'])", + " var decodedProtectedHeaders = JSON.parse(atob(protectedHeader))", + " console.log('decodedProtectedHeaders:',decodedProtectedHeaders)", " ", - " // pm.test(\"FSPIOP-Signature Protected Header alg to be RS256\", function () {", - " // pm.expect(decodedProtectedHeaders['alg']).to.eql('RS256');", - " // });", - " // pm.test(\"FSPIOP-Signature Protected Header FSPIOP-URI to be /parties\", function () {", - " // pm.expect(decodedProtectedHeaders['FSPIOP-URI']).to.eql('/parties');", - " // });", + " pm.test(\"FSPIOP-Signature Protected Header alg to be RS256\", function () {", + " pm.expect(decodedProtectedHeaders['alg']).to.eql('RS256');", + " });", + " pm.test(\"FSPIOP-Signature Protected Header FSPIOP-URI to be /parties\", function () {", + " pm.expect(decodedProtectedHeaders['FSPIOP-URI']).to.eql('/parties');", + " });", " ", "", - " // pm.test(\"FSPIOP-Signature Protected Header FSPIOP-HTTP-Method to be GET\", function () {", - " // pm.expect(decodedProtectedHeaders['FSPIOP-HTTP-Method']).to.eql('GET');", - " // });", - " // pm.test(\"FSPIOP-Signature Protected Header FSPIOP-Source to be Payerfsp\", function () {", - " // pm.expect(decodedProtectedHeaders['FSPIOP-Source']).to.eql('payerfsp');", - " // });", - " // pm.test(\"FSPIOP-Signature Protected Header FSPIOP-Destination to be payeefsp\", function () {", - " // pm.expect(decodedProtectedHeaders['FSPIOP-Destination']).to.eql('payeefsp');", - " // });", - " // pm.test(\"FSPIOP-Signature Protected Header Date is present\", function () {", - " // pm.expect(decodedProtectedHeaders['Date']).to.not.eql(undefined);", - " // });", + " pm.test(\"FSPIOP-Signature Protected Header FSPIOP-HTTP-Method to be GET\", function () {", + " pm.expect(decodedProtectedHeaders['FSPIOP-HTTP-Method']).to.eql('GET');", + " });", + " pm.test(\"FSPIOP-Signature Protected Header FSPIOP-Source to be Payerfsp\", function () {", + " pm.expect(decodedProtectedHeaders['FSPIOP-Source']).to.eql('payerfsp');", + " });", + " pm.test(\"FSPIOP-Signature Protected Header FSPIOP-Destination to be payeefsp\", function () {", + " pm.expect(decodedProtectedHeaders['FSPIOP-Destination']).to.eql('payeefsp');", + " });", + " pm.test(\"FSPIOP-Signature Protected Header Date is present\", function () {", + " pm.expect(decodedProtectedHeaders['Date']).to.not.eql(undefined);", + " });", " ", - " // pm.test(\"payeefsp FSPIOP-URI to be /parties\", function () {", - " // pm.expect(headers['fspiop-uri']).to.eql('/parties');", - " // });", + " pm.test(\"payeefsp FSPIOP-URI to be /parties\", function () {", + " pm.expect(headers['fspiop-uri']).to.eql('/parties');", + " });", " ", - " // pm.test(\"payeefsp fspiop-http-method is GET\", function () {", - " // pm.expect(headers['fspiop-http-method']).to.eql('GET');", - " // });", + " pm.test(\"payeefsp fspiop-http-method is GET\", function () {", + " pm.expect(headers['fspiop-http-method']).to.eql('GET');", + " });", " ", " ", " ", @@ -3056,31 +2952,31 @@ "id": "857a50b8-ed16-412f-9798-dd568bfd5a71", "exec": [ "pm.variables.set('expectedFspId', 'payeefsp');", - "pm.variables.set('expectedFullName', 'MerchantFirst MerchantLast');", - "pm.variables.set('expectedFirstName', 'MerchantFirst');", - "pm.variables.set('expectedLastName', 'MerchantLast');", - "pm.variables.set('expectedDOB', '2010-10-10');", + "pm.variables.set('expectedFullName', 'Siabelo Maroka');", + "pm.variables.set('expectedFirstName', 'Siabelo');", + "pm.variables.set('expectedLastName', 'Maroka');", + "pm.variables.set('expectedDOB', '3/3/1973');", "", "var requestData = {", " \"party\": {", " \"partyIdInfo\": {", - " \"partyIdType\": \"BUSINESS\",", - " \"partyIdentifier\": \"{{merchantID}}\",", + " \"partyIdType\": \"MSISDN\",", + " \"partyIdentifier\": \"17039811907\",", " \"fspId\": \"payeefsp\"", " },", - " \"name\": \"MerchantFirst MerchantLast\",", + " \"name\": \"Siabelo Maroka\",", " \"personalInfo\": {", " \"complexName\": {", - " \"firstName\": \"MerchantFirst\",", - " \"lastName\": \"MerchantLast\"", + " \"firstName\": \"Siabelo\",", + " \"lastName\": \"Maroka\"", " },", - " \"dateOfBirth\": \"2010-10-10\"", + " \"dateOfBirth\": \"3/3/1973\"", " }", " }", "}", "", "const addUserRequest = {", - " url: pm.environment.get(\"HOST_SIMULATOR\")+\"/payeefsp/parties/BUSINESS/\"+pm.environment.get(\"merchantId\"),", + " url: pm.environment.get(\"HOST_SIMULATOR\")+\"/payeefsp/parties/MSISDN/\"+pm.environment.get(\"pathfinderMSISDN\"),", " method: 'POST',", " headers: {", " \"content-type\": \"application/json\",", @@ -3118,14 +3014,14 @@ } ], "url": { - "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/parties/BUSINESS/{{merchantId}}", + "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/parties/MSISDN/{{pathfinderMSISDN}}", "host": [ "{{HOST_ACCOUNT_LOOKUP_SERVICE}}" ], "path": [ "parties", - "BUSINESS", - "{{merchantId}}" + "MSISDN", + "{{pathfinderMSISDN}}" ] } }, @@ -3136,7 +3032,7 @@ "_postman_isSubFolder": true }, { - "name": "400", + "name": "400 - Error Code", "item": [ { "name": "400 - 3101 - Malformed MSISDN", @@ -3191,13 +3087,13 @@ } ], "url": { - "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/parties/BUSINESS/@3456!", + "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/parties/MSISDN/@3456!", "host": [ "{{HOST_ACCOUNT_LOOKUP_SERVICE}}" ], "path": [ "parties", - "BUSINESS", + "MSISDN", "@3456!" ] }, @@ -3334,7 +3230,7 @@ { "key": "FSPIOP-Source", "type": "text", - "value": "{{payerfsp}}" + "value": "{{hub_operator}}" }, { "key": "Content-Type", @@ -3343,13 +3239,13 @@ } ], "url": { - "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/parties/BUSINESS/{{pathfinderMSISDN}}", + "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/parties/MSISDN/{{pathfinderMSISDN}}", "host": [ "{{HOST_ACCOUNT_LOOKUP_SERVICE}}" ], "path": [ "parties", - "BUSINESS", + "MSISDN", "{{pathfinderMSISDN}}" ] }, @@ -3425,13 +3321,13 @@ } ], "url": { - "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/parties/BUSINESS/", + "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/parties/MSISDN/", "host": [ "{{HOST_ACCOUNT_LOOKUP_SERVICE}}" ], "path": [ "parties", - "BUSINESS", + "MSISDN", "" ] } @@ -3508,38 +3404,18 @@ } ], "url": { - "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/parties/BUSINESS/{{pathfinderMSISDN}}", + "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/parties/MSISDN/{{pathfinderMSISDN}}", "host": [ "{{HOST_ACCOUNT_LOOKUP_SERVICE}}" ], "path": [ "parties", - "BUSINESS", + "MSISDN", "{{pathfinderMSISDN}}" ] } }, "response": [] - }, - { - "name": "3107 - Missing mandatory extension parameter", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/participants/BUSINESS/{{receiverMSISDN}}", - "host": [ - "{{HOST_ACCOUNT_LOOKUP_SERVICE}}" - ], - "path": [ - "participants", - "BUSINESS", - "{{receiverMSISDN}}" - ] - }, - "description": "Scheme-mandatory extension parameter was missing." - }, - "response": [] } ], "protocolProfileBehavior": {}, @@ -3606,13 +3482,13 @@ "raw": "{\n \"party\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"MSISDN\",\n \"partyIdentifier\": \"{{pathfinderMSISDN}}\",\n \"fspId\": \"{{payeefsp}}\"\n },\n \"name\": \"{{fullName}}\",\n \"personalInfo\": {\n \"complexName\": {\n \"firstName\": \"{{firstName}}\",\n \"lastName\": \"{{lastName}}\"\n },\n \"dateOfBirth\": \"{{dob}}\"\n }\n }\n}" }, "url": { - "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/parties/BUSINESS/17855501914", + "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/parties/MSISDN/17855501914", "host": [ "{{HOST_ACCOUNT_LOOKUP_SERVICE}}" ], "path": [ "parties", - "BUSINESS", + "MSISDN", "17855501914" ] } @@ -3676,13 +3552,13 @@ "raw": "{\n \"party\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"MSISDN\",\n \"partyIdentifier\": \"{{pathfinderMSISDN}}\",\n \"fspId\": \"{{payeefsp}}\"\n },\n \"name\": \"{{fullName}}\",\n \"personalInfo\": {\n \"complexName\": {\n \"firstName\": \"{{firstName}}\",\n \"lastName\": \"{{lastName}}\"\n },\n \"dateOfBirth\": \"{{dob}}\"\n }\n }\n}" }, "url": { - "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/parties/BUSINESS/17855501914", + "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/parties/MSISDN/17855501914", "host": [ "{{HOST_ACCOUNT_LOOKUP_SERVICE}}" ], "path": [ "parties", - "BUSINESS", + "MSISDN", "17855501914" ] } @@ -3745,13 +3621,13 @@ "raw": "{\n \"party\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"MSISDN\",\n \"partyIdentifier\": \"{{pathfinderMSISDN}}\",\n \"fspId\": \"{{payeefsp}}\"\n },\n \"name\": \"{{fullName}}\",\n \"personalInfo\": {\n \"complexName\": {\n \"firstName\": \"{{firstName}}\",\n \"lastName\": \"{{lastName}}\"\n },\n \"dateOfBirth\": \"{{dob}}\"\n }\n }\n}" }, "url": { - "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/parties/BUSINESS/17855501914", + "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/parties/MSISDN/17855501914", "host": [ "{{HOST_ACCOUNT_LOOKUP_SERVICE}}" ], "path": [ "parties", - "BUSINESS", + "MSISDN", "17855501914" ] } @@ -3822,13 +3698,13 @@ "raw": "{\n \"errorInformation\": {\n \"errorCode\": \"3204\",\n \"errorDescription\": \"Party with the provided identifier, identifier type, and optional sub id or type was not found.\",\n \"extensionList\": [\n {\n \"key\": \"MSISDN\",\n \"value\": \"17855501914\"\n }\n ]\n }\n}" }, "url": { - "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/parties/BUSINESS/17855501914/error", + "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/parties/MSISDN/17855501914/error", "host": [ "{{HOST_ACCOUNT_LOOKUP_SERVICE}}" ], "path": [ "parties", - "BUSINESS", + "MSISDN", "17855501914", "error" ] @@ -3904,13 +3780,13 @@ "raw": "{\n \"errorInformation\": {\n \"errorCode\": \"3204\",\n \"errorDescription\": \"Party with the provided identifier, identifier type, and optional sub id or type was not found.\",\n \"extensionList\": [\n {\n \"key\": \"MSISDN\",\n \"value\": \"17855501914\"\n }\n ]\n }\n}" }, "url": { - "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/parties/BUSINESS/17855501914/error", + "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/parties/MSISDN/17855501914/error", "host": [ "{{HOST_ACCOUNT_LOOKUP_SERVICE}}" ], "path": [ "parties", - "BUSINESS", + "MSISDN", "17855501914", "error" ] @@ -3978,13 +3854,13 @@ "raw": "{\n \"errorInformation\": {\n \"errorCode\": \"3204\",\n \"errorDescription\": \"Party with the provided identifier, identifier type, and optional sub id or type was not found.\",\n \"extensionList\": [\n {\n \"key\": \"MSISDN\",\n \"value\": \"17855501914\"\n }\n ]\n }\n}" }, "url": { - "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/parties/BUSINESS/17855501914/error", + "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/parties/MSISDN/17855501914/error", "host": [ "{{HOST_ACCOUNT_LOOKUP_SERVICE}}" ], "path": [ "parties", - "BUSINESS", + "MSISDN", "17855501914", "error" ] @@ -3997,562 +3873,1292 @@ "_postman_isSubFolder": true } ], + "event": [ + { + "listen": "prerequest", + "script": { + "id": "fed530e9-53e1-4ef6-b9cc-ff3a24e6f82f", + "type": "text/javascript", + "exec": [ + "" + ] + } + }, + { + "listen": "test", + "script": { + "id": "93f5590d-d0af-4dcb-a96b-196f55b96983", + "type": "text/javascript", + "exec": [ + "" + ] + } + } + ], "protocolProfileBehavior": {}, "_postman_isSubFolder": true } ], "protocolProfileBehavior": {}, "_postman_isSubFolder": true - } - ], - "description": "Folder for parties", - "event": [ - { - "listen": "prerequest", - "script": { - "id": "2a43de13-c0e4-47b4-a95a-9b466c556d0d", - "type": "text/javascript", - "exec": [ - "// var requestData = {", - "// \"party\": {", - "// \"partyIdInfo\": {", - "// \"partyIdType\": \"MSISDN\",", - "// \"partyIdentifier\": \"17039811907\",", - "// \"fspId\": \"payeefsp\"", - "// },", - "// \"name\": \"Siabelo Maroka\",", - "// \"personalInfo\": {", - "// \"complexName\": {", - "// \"firstName\": \"Siabelo\",", - "// \"lastName\": \"Maroka\"", - "// },", - "// \"dateOfBirth\": \"3/3/1973\"", - "// }", - "// }", - "// }", - "", - "// const addUserRequest = {", - "// url: pm.environment.get(\"HOST_SIMULATOR\")+\"/payeefsp/parties/MSISDN/\"+pm.environment.get(\"pathfinderMSISDN\"),", - "// method: 'POST',", - "// headers: {", - "// \"content-type\": \"application/json\",", - "// },", - "// json: requestData", - "// };", - "// pm.sendRequest(addUserRequest, function (err, res) {", - "// console.log(err ? err : res.json());", - "// });" - ] - } }, { - "listen": "test", - "script": { - "id": "acda1151-00f5-46f5-ae59-838e0add964d", - "type": "text/javascript", - "exec": [ - "" - ] - } - } - ], - "protocolProfileBehavior": {}, - "_postman_isSubFolder": true - }, - { - "name": "quotes", - "item": [ - { - "name": "quotes", + "name": "/BUSINESS/ID", "item": [ { - "name": "GET", + "name": "GET - PartiesByTypeAndID", "item": [ { - "name": "Send Quote", - "event": [ - { - "listen": "prerequest", - "script": { - "id": "887e4721-3923-41bd-bf8a-3d0cd5eed8ee", - "exec": [ - " ", - " var uuid = require('uuid');", - " var generatedUUID = uuid.v4();", - " pm.environment.set('quoteId2', generatedUUID);", - "", - "", - " pm.environment.set('quoteDate', (new Date()).toUTCString());", - "" - ], - "type": "text/javascript" - } - }, + "name": "202", + "item": [ { - "listen": "test", - "script": { - "id": "095c973b-3b61-453c-992c-21a78b1066dc", - "exec": [ - "pm.test(\"Status code is 202\", function () {", - " pm.response.to.have.status(202);", - "});", - "", - "// pm.test(\"Check that Content-Type is present\", function () {", - "// pm.response.to.have.header(\"Content-Type\");", - "// pm.response.to.be.header(\"Content-Type\", \"application/vnd.interoperability.quotes+json;version=1.0\");", - "// });", - "", - "", - "setTimeout(function () {", - " pm.sendRequest(pm.environment.get(\"HOST_SIMULATOR\")+\"/payerfsp/correlationid/\"+pm.variables.get(\"quoteId2\"), function (err, response) {", - " if(response !== null) {", - " console.log(response.json());", - " pm.test(\"Response ilpPacket is not null\", function () {", - " pm.expect(response.json().ilpPacket).not.equal(null);", - " pm.environment.set(\"ilpPacket2\", response.json().ilpPacket);", - " });", - " ", - " pm.test(\"Response condition is not null\", function () {", - " pm.expect(response.json().condition).not.equal(null);", - " pm.environment.set(\"condition2\", response.json().condition);", - " });", - " } else {", - " pm.test(\"Quote FAILED\", function () {", - " throw new Error('Did not receive response');", - " });", - " postman.setNextRequest(null);", - " }", - " ", - " });", - "}, 3000);", - "", - "", - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [ - { - "key": "Accept", - "value": "application/vnd.interoperability.quotes+json;version=1" - }, - { - "key": "Content-Type", - "name": "Content-Type", - "value": "application/vnd.interoperability.quotes+json;version=1.0", - "type": "text" - }, - { - "key": "Date", - "value": "{{quoteDate}}" - }, - { - "key": "FSPIOP-Source", - "value": "{{payerfsp}}" - }, - { - "key": "FSPIOP-Destination", - "value": "{{payeefsp}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"quoteId\": \"{{quoteId2}}\",\n \"transactionId\": \"{{quoteId2}}\",\n \"payee\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"MSISDN\",\n \"partyIdentifier\": \"{{receiverMSISDN}}\",\n \"fspId\": \"{{payeefsp}}\"\n }\n },\n \"payer\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"MSISDN\",\n \"partyIdentifier\": \"27713803905\",\n \"fspId\": \"{{payerfsp}}\"\n },\n \"personalInfo\": {\n \"complexName\": {\n \"firstName\": \"Mats\",\n \"lastName\": \"Hagman\"\n },\n \"dateOfBirth\": \"1983-10-25\"\n }\n },\n \"amountType\": \"SEND\",\n \"amount\": {\n \"amount\": \"15\" ,\n \"currency\": \"XOF\"\n },\n \"transactionType\": {\n \"scenario\": \"TRANSFER\",\n \"initiator\": \"PAYER\",\n \"initiatorType\": \"CONSUMER\"\n },\n \"note\": \"hej\"\n}" - }, - "url": { - "raw": "{{HOST_QUOTING_SERVICE}}/quotes", - "host": [ - "{{HOST_QUOTING_SERVICE}}" + "name": "202 - Accepted (BUG)", + "event": [ + { + "listen": "test", + "script": { + "id": "fdb13fdb-0720-4c9d-8ff1-d28765c9fa5d", + "exec": [ + "pm.test(\"Status code is 202\", function () {", + " pm.response.to.have.status(202);", + "});", + "", + "//Check data on payee side", + "setTimeout(function () {", + " pm.sendRequest(pm.environment.get(\"HOST_SIMULATOR\")+\"/payeefsp/requests/\"+pm.environment.get(\"merchantId\"), function (err, response) {", + " ", + " if(response.responseSize !== 0) { ", + " //Checking headers", + " // var headers = response.json().headers;", + " // pm.test(\"payeefsp fspiop-source is payerfsp\", function () {", + " // pm.expect(headers['fspiop-source']).to.eql('payerfsp');", + " // });", + " ", + " // pm.test(\"payeefsp fspiop-destination is payeefsp\", function () {", + " // pm.expect(headers['fspiop-destination']).to.eql('payeefsp');", + " // });", + " ", + " // pm.test(\"payeefsp content-type should be application/vnd.interoperability.parties+json;version=1.0\", function () {", + " // pm.expect(headers['content-type']).to.eql('application/vnd.interoperability.parties+json;version=1.0');", + " // });", + " ", + " // //pm.test(\"payeefsp accept should be application/vnd.interoperability.parties+json;version=1\", function () {", + " // // pm.expect(headers['accept']).to.eql('should be application/vnd.interoperability.parties+json;version=1');", + " // //});", + " ", + " ", + " ", + " // //Validate protected header inside Signature", + " // var {signature,protectedHeader} = JSON.parse(headers['fspiop-signature'])", + " // var decodedProtectedHeaders = JSON.parse(atob(protectedHeader))", + " // console.log('decodedProtectedHeaders:',decodedProtectedHeaders)", + " ", + " // pm.test(\"FSPIOP-Signature Protected Header alg to be RS256\", function () {", + " // pm.expect(decodedProtectedHeaders['alg']).to.eql('RS256');", + " // });", + " // pm.test(\"FSPIOP-Signature Protected Header FSPIOP-URI to be /parties\", function () {", + " // pm.expect(decodedProtectedHeaders['FSPIOP-URI']).to.eql('/parties');", + " // });", + " ", + "", + " // pm.test(\"FSPIOP-Signature Protected Header FSPIOP-HTTP-Method to be GET\", function () {", + " // pm.expect(decodedProtectedHeaders['FSPIOP-HTTP-Method']).to.eql('GET');", + " // });", + " // pm.test(\"FSPIOP-Signature Protected Header FSPIOP-Source to be Payerfsp\", function () {", + " // pm.expect(decodedProtectedHeaders['FSPIOP-Source']).to.eql('payerfsp');", + " // });", + " // pm.test(\"FSPIOP-Signature Protected Header FSPIOP-Destination to be payeefsp\", function () {", + " // pm.expect(decodedProtectedHeaders['FSPIOP-Destination']).to.eql('payeefsp');", + " // });", + " // pm.test(\"FSPIOP-Signature Protected Header Date is present\", function () {", + " // pm.expect(decodedProtectedHeaders['Date']).to.not.eql(undefined);", + " // });", + " ", + " // pm.test(\"payeefsp FSPIOP-URI to be /parties\", function () {", + " // pm.expect(headers['fspiop-uri']).to.eql('/parties');", + " // });", + " ", + " // pm.test(\"payeefsp fspiop-http-method is GET\", function () {", + " // pm.expect(headers['fspiop-http-method']).to.eql('GET');", + " // });", + " ", + " ", + " ", + " } else {", + " pm.test(\"Parties FAILED - payeeFSP\", function () {", + " throw new Error('Did not receive response');", + " });", + " ", + " }", + " ", + " });", + "}, 4000)", + "", + "//Check data on payer side", + "setTimeout(function () {", + " pm.sendRequest(pm.environment.get(\"HOST_SIMULATOR\")+\"/payerfsp/callbacks/\"+pm.environment.get(\"pathfinderMSISDN\"), function (err, response) {", + " ", + " if(response.responseSize !== 0) { ", + " //Checking headers", + " var headers = response.json().headers;", + " pm.test(\"payerfsp fspiop-source is payeefsp\", function () {", + " pm.expect(headers['fspiop-source']).to.eql('payeefsp');", + " });", + " ", + " pm.test(\"payerfsp fspiop-destination is payerfsp\", function () {", + " pm.expect(headers['fspiop-destination']).to.eql('payerfsp');", + " });", + " ", + " pm.test(\"payerfsp content-type should be application/vnd.interoperability.parties+json;version=1.0\", function () {", + " pm.expect(headers['content-type']).to.eql('application/vnd.interoperability.parties+json;version=1.0');", + " });", + " ", + " pm.test(\"payerfsp accept is empty\", function () {", + " pm.expect(headers['accept']).to.eql(undefined);", + " });", + " ", + " ", + " ", + " //Validate protected header inside Signature", + " var {signature,protectedHeader} = JSON.parse(headers['fspiop-signature'])", + " var decodedProtectedHeaders = JSON.parse(atob(protectedHeader))", + " console.log('decodedProtectedHeaders:',decodedProtectedHeaders)", + " ", + " // pm.test(\"FSPIOP-Signature signature is returned\", function () {", + " // pm.expect(signature).to.eql(pm.environment.get(\"payeefsp-signature\"));", + " // });", + " ", + " pm.test(\"FSPIOP-Signature Protected Header alg to be RS256\", function () {", + " pm.expect(decodedProtectedHeaders['alg']).to.eql('RS256');", + " });", + " pm.test(\"FSPIOP-Signature Protected Header FSPIOP-URI to be /parties/MSISDN/\"+pm.environment.get(\"pathfinderMSISDN\"), function () {", + " pm.expect(decodedProtectedHeaders['FSPIOP-URI']).to.eql('/parties/MSISDN/'+pm.environment.get(\"pathfinderMSISDN\"));", + " });", + " ", + "", + " pm.test(\"FSPIOP-Signature Protected Header FSPIOP-HTTP-Method to be PUT\", function () {", + " pm.expect(decodedProtectedHeaders['FSPIOP-HTTP-Method']).to.eql('PUT');", + " });", + " pm.test(\"FSPIOP-Signature Protected Header FSPIOP-Source to be mojaloop-sdk\", function () {", + " pm.expect(decodedProtectedHeaders['FSPIOP-Source']).to.eql('payeefsp');", + " });", + " pm.test(\"FSPIOP-Signature Protected Header FSPIOP-Destination to be payerfsp\", function () {", + " pm.expect(decodedProtectedHeaders['FSPIOP-Destination']).to.eql('payerfsp');", + " });", + " pm.test(\"FSPIOP-Signature Protected Header Date is present\", function () {", + " pm.expect(decodedProtectedHeaders['Date']).to.not.eql(undefined);", + " });", + " ", + " //pm.test(\"payerfsp FSPIOP-URI to be /parties/MSISDN/\"+pm.environment.get(\"pathfinderMSISDN\"), function () {", + " // pm.expect(headers['fspiop-uri']).to.eql('/parties/MSISDN/'+pm.environment.get(\"pathfinderMSISDN\"));", + " //});", + " ", + " pm.test(\"payerfsp fspiop-http-method is PUT\", function () {", + " pm.expect(headers['fspiop-http-method']).to.eql('PUT');", + " });", + " ", + " //Checking data", + " var jsonData = response.json().data;", + " pm.test(\"Expected receiver first name is: \"+pm.variables.get(\"expectedFirstName\"), function () {", + " pm.expect(jsonData.party.personalInfo.complexName.firstName).to.eql(pm.variables.get(\"expectedFirstName\"));", + " });", + " pm.test(\"Expected receiver last name is: \"+pm.variables.get(\"expectedLastName\"), function () {", + " pm.expect(jsonData.party.personalInfo.complexName.lastName).to.eql(pm.variables.get(\"expectedLastName\"));", + " });", + " pm.test(\"Expected receiver DOB: \"+pm.variables.get(\"expectedDOB\"), function () {", + " pm.expect(jsonData.party.personalInfo.dateOfBirth).to.eql(pm.variables.get(\"expectedDOB\"));", + " }); ", + " ", + " } else {", + " pm.test(\"Parties FAILED - payerFSP\", function () {", + " throw new Error('Did not receive response');", + " });", + " ", + " }", + " ", + " });", + "}, 4000)", + "", + "" + ], + "type": "text/javascript" + } + }, + { + "listen": "prerequest", + "script": { + "id": "857a50b8-ed16-412f-9798-dd568bfd5a71", + "exec": [ + "pm.variables.set('expectedFspId', 'payeefsp');", + "pm.variables.set('expectedFullName', 'MerchantFirst MerchantLast');", + "pm.variables.set('expectedFirstName', 'MerchantFirst');", + "pm.variables.set('expectedLastName', 'MerchantLast');", + "pm.variables.set('expectedDOB', '2010-10-10');", + "", + "var requestData = {", + " \"party\": {", + " \"partyIdInfo\": {", + " \"partyIdType\": \"BUSINESS\",", + " \"partyIdentifier\": \"{{merchantID}}\",", + " \"fspId\": \"payeefsp\"", + " },", + " \"name\": \"MerchantFirst MerchantLast\",", + " \"personalInfo\": {", + " \"complexName\": {", + " \"firstName\": \"MerchantFirst\",", + " \"lastName\": \"MerchantLast\"", + " },", + " \"dateOfBirth\": \"2010-10-10\"", + " }", + " }", + "}", + "", + "const addUserRequest = {", + " url: pm.environment.get(\"HOST_SIMULATOR\")+\"/payeefsp/parties/BUSINESS/\"+pm.environment.get(\"merchantId\"),", + " method: 'POST',", + " headers: {", + " \"content-type\": \"application/json\",", + " },", + " body: JSON.stringify(requestData)", + "};", + "pm.sendRequest(addUserRequest, function (err, res) {", + " console.log(err ? err : res);", + "});", + "", + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/vnd.interoperability.parties+json;version=1" + }, + { + "key": "Content-Type", + "value": "application/vnd.interoperability.parties+json;version=1.0" + }, + { + "key": "FSPIOP-Source", + "value": "{{payerfsp}}" + }, + { + "key": "Date", + "value": "{{dateHeader}}" + } + ], + "url": { + "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/parties/BUSINESS/{{merchantId}}", + "host": [ + "{{HOST_ACCOUNT_LOOKUP_SERVICE}}" + ], + "path": [ + "parties", + "BUSINESS", + "{{merchantId}}" + ] + } + }, + "response": [] + } + ], + "protocolProfileBehavior": {}, + "_postman_isSubFolder": true + }, + { + "name": "400", + "item": [ + { + "name": "400 - 3101 - Malformed MSISDN", + "event": [ + { + "listen": "prerequest", + "script": { + "id": "9cf7d011-ba2b-48b2-abf4-a2ed7ae0a6e8", + "exec": [ + "pm.environment.set('dateHeader', (new Date()).toUTCString());", + "" + ], + "type": "text/javascript" + } + }, + { + "listen": "test", + "script": { + "id": "3472322e-3146-4049-a128-f281e0be340e", + "exec": [ + "pm.test(\"Status code is 202\", function () {", + " pm.response.to.have.status(202);", + "});", + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/vnd.interoperability.parties+json;version=1", + "type": "text" + }, + { + "key": "Date", + "value": "{{dateHeader}}", + "type": "text" + }, + { + "key": "FSPIOP-Source", + "value": "{{payerfsp}}", + "type": "text" + }, + { + "key": "Content-Type", + "value": "application/vnd.interoperability.parties+json;version=1.0", + "type": "text" + } + ], + "url": { + "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/parties/BUSINESS/@3456!", + "host": [ + "{{HOST_ACCOUNT_LOOKUP_SERVICE}}" + ], + "path": [ + "parties", + "BUSINESS", + "@3456!" + ] + }, + "description": "Format of the parameter is not valid. For example, amount set to 5.ABC. The error description field should specify which information element is erroneous." + }, + "response": [] + }, + { + "name": "400 - 3101 - Malformed Type (BUG)", + "event": [ + { + "listen": "prerequest", + "script": { + "id": "9cf7d011-ba2b-48b2-abf4-a2ed7ae0a6e8", + "exec": [ + "pm.environment.set('dateHeader', (new Date()).toUTCString());", + "" + ], + "type": "text/javascript" + } + }, + { + "listen": "test", + "script": { + "id": "3472322e-3146-4049-a128-f281e0be340e", + "exec": [ + "pm.test(\"Status code is 400\", function () {", + " pm.response.to.have.status(400);", + "});", + "", + "setTimeout(function () {", + " pm.sendRequest(pm.environment.get(\"HOST_SIMULATOR\")+\"/payerfsp/correlationid/\"+pm.variables.get(\"pathfinderMSISDN\"), function (err, response) {", + " //console.log(response.json());", + " pm.test(\"Error message is expected as response.\", function () {", + " pm.expect(response.json().errorCode).to.eql('3101');", + " pm.expect(response.json().errorDescription).to.eql('Malformed Type');", + " });", + " });", + "}, 1000)" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "type": "text", + "value": "application/vnd.interoperability.participants+json;version=1" + }, + { + "key": "Date", + "type": "text", + "value": "{{dateHeader}}" + }, + { + "key": "FSPIOP-Source", + "type": "text", + "value": "{{payerfsp}}" + }, + { + "key": "Content-Type", + "value": "application/vnd.interoperability.participants+json;version=1.0;", + "type": "text" + } + ], + "url": { + "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/parties/XYZ/{{pathfinderMSISDN}}", + "host": [ + "{{HOST_ACCOUNT_LOOKUP_SERVICE}}" + ], + "path": [ + "parties", + "XYZ", + "{{pathfinderMSISDN}}" + ] + }, + "description": "Format of the parameter is not valid. For example, amount set to 5.ABC. The error description field should specify which information element is erroneous." + }, + "response": [] + }, + { + "name": "400 - 3101 - Malformed Header (BUG)", + "event": [ + { + "listen": "prerequest", + "script": { + "id": "9cf7d011-ba2b-48b2-abf4-a2ed7ae0a6e8", + "exec": [ + "pm.environment.set('dateHeader', (new Date()).toUTCString());", + "" + ], + "type": "text/javascript" + } + }, + { + "listen": "test", + "script": { + "id": "3472322e-3146-4049-a128-f281e0be340e", + "exec": [ + "pm.test(\"Status code is 400\", function () {", + " pm.response.to.have.status(400);", + "});", + "", + "setTimeout(function () {", + " pm.sendRequest(pm.environment.get(\"HOST_SIMULATOR\")+\"/payerfsp/correlationid/\"+pm.variables.get(\"pathfinderMSISDN\"), function (err, response) {", + " //console.log(response.json());", + " pm.test(\"Error message is expected as response.\", function () {", + " pm.expect(response.json().errorCode).to.eql('3101');", + " pm.expect(response.json().errorDescription).to.eql('Malformed MSISDN');", + " });", + " });", + "}, 1000)" + ], + "type": "text/javascript" + } + } ], - "path": [ - "quotes" - ] + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "type": "text", + "value": "xyz" + }, + { + "key": "Date", + "type": "text", + "value": "{{dateHeader}}" + }, + { + "key": "FSPIOP-Source", + "type": "text", + "value": "{{payerfsp}}" + }, + { + "key": "Content-Type", + "value": "application/vnd.interoperability.parties+json;version=1.0;", + "type": "text" + } + ], + "url": { + "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/parties/BUSINESS/{{pathfinderMSISDN}}", + "host": [ + "{{HOST_ACCOUNT_LOOKUP_SERVICE}}" + ], + "path": [ + "parties", + "BUSINESS", + "{{pathfinderMSISDN}}" + ] + }, + "description": "Format of the parameter is not valid. For example, amount set to 5.ABC. The error description field should specify which information element is erroneous." + }, + "response": [] + }, + { + "name": "404 - 3102 - Missing Mandatory ID (BUG)", + "event": [ + { + "listen": "test", + "script": { + "id": "df53ac68-44bc-4b61-9296-8857e0fe7c8d", + "exec": [ + "pm.test(\"Status code is 404\", function () {", + " pm.response.to.have.status(404);", + "});", + "", + "// pm.test(\"Check that Content-Type is present\", function () {", + "// pm.response.to.have.header(\"Content-Type\");", + "// pm.response.to.be.header(\"Content-Type\", \"application/vnd.interoperability.parties+json;version=1.0\");", + "// });", + "", + "setTimeout(function () {", + " pm.sendRequest(pm.environment.get(\"HOST_SIMULATOR\")+\"/payerfsp/callbacks/\"+pm.variables.get(\"pathfinderMSISDN\"), function (err, response) {", + " //console.log(response.json());", + " pm.test(\"Expected receiver fspId is: \"+pm.variables.get(\"expectedFspId\"), function () {", + " pm.expect(response.json().party.personalInfo.complexName.firstName).to.eql(pm.variables.get(\"expectedFspId\"));", + " });", + " ", + " ", + " });", + "}, 1000)", + "", + "" + ], + "type": "text/javascript" + } + }, + { + "listen": "prerequest", + "script": { + "id": "0cb60963-9178-4069-9360-82a0664a0db8", + "exec": [ + "pm.variables.set('expectedFspId', 'payeefsp');", + "pm.variables.set('participantDateHeader', (new Date()).toUTCString());", + "", + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/vnd.interoperability.participants+json;version=1" + }, + { + "key": "Content-Type", + "value": "application/vnd.interoperability.participants+json;version=1.0" + }, + { + "key": "FSPIOP-Source", + "value": "{{payerfsp}}" + }, + { + "key": "Date", + "value": "{{dateHeader}}" + } + ], + "url": { + "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/parties/BUSINESS/", + "host": [ + "{{HOST_ACCOUNT_LOOKUP_SERVICE}}" + ], + "path": [ + "parties", + "BUSINESS", + "" + ] + } + }, + "response": [] + }, + { + "name": "400 - 3102 - Missing Mandatory Headers (BUG)", + "event": [ + { + "listen": "test", + "script": { + "id": "df53ac68-44bc-4b61-9296-8857e0fe7c8d", + "exec": [ + "pm.test(\"Status code is 400\", function () {", + " pm.response.to.have.status(400);", + "});", + "", + "// pm.test(\"Check that Content-Type is present\", function () {", + "// pm.response.to.have.header(\"Content-Type\");", + "// pm.response.to.be.header(\"Content-Type\", \"application/vnd.interoperability.parties+json;version=1.0\");", + "// });", + "", + "setTimeout(function () {", + " pm.sendRequest(pm.environment.get(\"HOST_SIMULATOR\")+\"/payerfsp/correlationid/\"+pm.variables.get(\"pathfinderMSISDN\"), function (err, response) {", + " //console.log(response.json());", + " pm.test(\"Error message is expected as response.\", function () {", + " pm.expect(response.json().errorCode).to.eql('3102');", + " pm.expect(response.json().errorDescription).to.eql('Missing Date Header');", + " });", + " ", + " ", + " });", + "}, 1000)", + "", + "" + ], + "type": "text/javascript" + } + }, + { + "listen": "prerequest", + "script": { + "id": "0cb60963-9178-4069-9360-82a0664a0db8", + "exec": [ + "pm.variables.set('expectedFspId', 'payeefsp');", + "pm.variables.set('participantDateHeader', (new Date()).toUTCString());", + "", + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/vnd.interoperability.participants+json;version=1" + }, + { + "key": "Content-Type", + "value": "application/vnd.interoperability.participants+json;version=1.0" + }, + { + "key": "FSPIOP-Source", + "value": "{{payerfsp}}" + }, + { + "key": "Date", + "value": "{{dateHeader}}", + "disabled": true + } + ], + "url": { + "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/parties/BUSINESS/{{pathfinderMSISDN}}", + "host": [ + "{{HOST_ACCOUNT_LOOKUP_SERVICE}}" + ], + "path": [ + "parties", + "BUSINESS", + "{{pathfinderMSISDN}}" + ] + } + }, + "response": [] + }, + { + "name": "3107 - Missing mandatory extension parameter", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/participants/BUSINESS/{{receiverMSISDN}}", + "host": [ + "{{HOST_ACCOUNT_LOOKUP_SERVICE}}" + ], + "path": [ + "participants", + "BUSINESS", + "{{receiverMSISDN}}" + ] + }, + "description": "Scheme-mandatory extension parameter was missing." + }, + "response": [] } - }, - "response": [] - }, + ], + "protocolProfileBehavior": {}, + "_postman_isSubFolder": true + } + ], + "protocolProfileBehavior": {}, + "_postman_isSubFolder": true + }, + { + "name": "PUT - PartiesByTypeAndID", + "item": [ { - "name": "QuotesByID", - "event": [ + "name": "200", + "item": [ { - "listen": "test", - "script": { - "id": "aa07986c-5b41-42d6-9223-157fd4d99a67", - "exec": [ - "pm.test(\"Status code is 202\", function () {", - " pm.response.to.have.status(202);", - "});", - "", - "", - "setTimeout(function () {", - " pm.sendRequest(pm.environment.get(\"HOST_SIMULATOR\")+\"/payerfsp/correlationid/\"+pm.variables.get(\"quoteId2\"), function (err, response) {", - " if(response.responseSize !== 0) {", - " console.log(response.json());", - " pm.test(\"Response transfer amount is valid\", function () {", - " // pm.expect(response.json().ilpPacket).not.equal(null);", - " pm.expect(response.json().transferAmount.amount).to.eql('15');", - " // pm.environment.set(\"ilpPacket\", response.json().ilpPacket);", - " });", - " ", - " pm.test(\"Response condition is not null\", function () {", - " pm.expect(response.json().condition).not.equal(null);", - " //pm.environment.set(\"condition\", response.json().condition);", - " });", - " } else {", - " pm.test(\"Quote FAILED\", function () {", - " throw new Error('Did not receive response');", - " });", - " postman.setNextRequest(null);", - " }", - " ", - " });", - "}, 3000);" + "name": "200 - Valid Request", + "event": [ + { + "listen": "test", + "script": { + "id": "76d6c169-8ddc-4595-8516-b93d15ed72ec", + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "PUT", + "header": [ + { + "key": "Accept", + "type": "text", + "value": "application/vnd.interoperability.parties+json;version=1", + "disabled": true + }, + { + "key": "Date", + "type": "text", + "value": "{{dateHeader}}" + }, + { + "key": "FSPIOP-Source", + "type": "text", + "value": "{{payeefsp}}" + }, + { + "key": "FSPIOP-Destination", + "type": "text", + "value": "{{payerfsp}}" + }, + { + "key": "Content-Type", + "type": "text", + "value": "application/vnd.interoperability.parties+json;version=1.0" + } ], - "type": "text/javascript" - } + "body": { + "mode": "raw", + "raw": "{\n \"party\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"MSISDN\",\n \"partyIdentifier\": \"{{pathfinderMSISDN}}\",\n \"fspId\": \"{{payeefsp}}\"\n },\n \"name\": \"{{fullName}}\",\n \"personalInfo\": {\n \"complexName\": {\n \"firstName\": \"{{firstName}}\",\n \"lastName\": \"{{lastName}}\"\n },\n \"dateOfBirth\": \"{{dob}}\"\n }\n }\n}" + }, + "url": { + "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/parties/BUSINESS/17855501914", + "host": [ + "{{HOST_ACCOUNT_LOOKUP_SERVICE}}" + ], + "path": [ + "parties", + "BUSINESS", + "17855501914" + ] + } + }, + "response": [] } ], - "request": { - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "application/vnd.interoperability.quotes+json;version=1" - }, - { - "key": "Content-Type", - "value": "application/vnd.interoperability.quotes+json;version=1.0" - }, - { - "key": "Date", - "value": "{{quoteDate}}" + "protocolProfileBehavior": {}, + "_postman_isSubFolder": true + }, + { + "name": "400", + "item": [ + { + "name": "Invalid Accept Header ( BUG)", + "event": [ + { + "listen": "test", + "script": { + "id": "76d6c169-8ddc-4595-8516-b93d15ed72ec", + "exec": [ + "pm.test(\"Status code is 400\", function () {", + " pm.response.to.have.status(400);", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "PUT", + "header": [ + { + "key": "Accept", + "type": "text", + "value": "application/vnd.interoperability.parties+json;version=1" + }, + { + "key": "Date", + "type": "text", + "value": "{{dateHeader}}" + }, + { + "key": "FSPIOP-Source", + "type": "text", + "value": "{{payeefsp}}" + }, + { + "key": "FSPIOP-Destination", + "type": "text", + "value": "{{payerfsp}}" + }, + { + "key": "Content-Type", + "type": "text", + "value": "application/vnd.interoperability.parties+json;version=1.0" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"party\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"MSISDN\",\n \"partyIdentifier\": \"{{pathfinderMSISDN}}\",\n \"fspId\": \"{{payeefsp}}\"\n },\n \"name\": \"{{fullName}}\",\n \"personalInfo\": {\n \"complexName\": {\n \"firstName\": \"{{firstName}}\",\n \"lastName\": \"{{lastName}}\"\n },\n \"dateOfBirth\": \"{{dob}}\"\n }\n }\n}" + }, + "url": { + "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/parties/BUSINESS/17855501914", + "host": [ + "{{HOST_ACCOUNT_LOOKUP_SERVICE}}" + ], + "path": [ + "parties", + "BUSINESS", + "17855501914" + ] + } }, - { - "key": "FSPIOP-Source", - "value": "{{payerfsp}}", - "type": "text" + "response": [] + }, + { + "name": "Missing Content-TYpe (BUG)", + "event": [ + { + "listen": "test", + "script": { + "id": "76d6c169-8ddc-4595-8516-b93d15ed72ec", + "exec": [ + "pm.test(\"Status code is 400\", function () {", + " pm.response.to.have.status(400);", + "});", + "", + "var jsonData = pm.response.json();", + "", + "pm.test(\"statusCode is 400\", function () {", + " pm.expect(jsonData.statusCode).to.eql(400);", + "});", + "", + "pm.test(\"errorDescription is Invalid request payload input\", function () {", + " pm.expect(jsonData.message.errorInformation.errorDescription).to.eql('Invalid request payload input');", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "PUT", + "header": [ + { + "key": "Date", + "type": "text", + "value": "{{dateHeader}}" + }, + { + "key": "FSPIOP-Source", + "type": "text", + "value": "{{payeefsp}}" + }, + { + "key": "FSPIOP-Destination", + "type": "text", + "value": "{{payerfsp}}" + }, + { + "key": "Content-Type", + "type": "text", + "value": "application/vnd.interoperability.parties+json;version=1.0", + "disabled": true + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"party\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"MSISDN\",\n \"partyIdentifier\": \"{{pathfinderMSISDN}}\",\n \"fspId\": \"{{payeefsp}}\"\n },\n \"name\": \"{{fullName}}\",\n \"personalInfo\": {\n \"complexName\": {\n \"firstName\": \"{{firstName}}\",\n \"lastName\": \"{{lastName}}\"\n },\n \"dateOfBirth\": \"{{dob}}\"\n }\n }\n}" + }, + "url": { + "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/parties/BUSINESS/17855501914", + "host": [ + "{{HOST_ACCOUNT_LOOKUP_SERVICE}}" + ], + "path": [ + "parties", + "BUSINESS", + "17855501914" + ] + } }, - { - "key": "FSPIOP-Destination", - "value": "{{payeefsp}}", - "type": "text" - } - ], - "url": { - "raw": "{{HOST_QUOTING_SERVICE}}/quotes/{{quoteId2}}", - "host": [ - "{{HOST_QUOTING_SERVICE}}" - ], - "path": [ - "quotes", - "{{quoteId2}}" - ] - }, - "description": "The HTTP request GET /quotes/ is used to get information regarding an earlier created or requested quote. The in the URI should contain the quoteId that was used for the creation of the quote." - }, - "response": [] - }, + "response": [] + } + ], + "protocolProfileBehavior": {}, + "_postman_isSubFolder": true + } + ], + "protocolProfileBehavior": {}, + "_postman_isSubFolder": true + }, + { + "name": "PUT - PartiesByTypeAndIDError", + "item": [ { - "name": "400-Missing Date header", - "event": [ + "name": "200", + "item": [ { - "listen": "test", - "script": { - "id": "aa07986c-5b41-42d6-9223-157fd4d99a67", - "exec": [ - "pm.test(\"Status code is 400\", function () {", - " pm.response.to.have.status(400);", - "});", - "", - "", - "" + "name": "200 - Valid Request (BUG)", + "event": [ + { + "listen": "test", + "script": { + "id": "76d6c169-8ddc-4595-8516-b93d15ed72ec", + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "PUT", + "header": [ + { + "key": "Accept", + "value": "application/vnd.interoperability.parties+json;version=1", + "type": "text" + }, + { + "key": "Date", + "value": "{{dateHeader}}", + "type": "text" + }, + { + "key": "FSPIOP-Source", + "value": "{{payeefsp}}", + "type": "text" + }, + { + "key": "FSPIOP-Destination", + "value": "{{payerfsp}}", + "type": "text" + }, + { + "key": "Content-Type", + "value": "application/vnd.interoperability.parties+json;version=1.0", + "type": "text" + } ], - "type": "text/javascript" - } + "body": { + "mode": "raw", + "raw": "{\n \"errorInformation\": {\n \"errorCode\": \"3204\",\n \"errorDescription\": \"Party with the provided identifier, identifier type, and optional sub id or type was not found.\",\n \"extensionList\": [\n {\n \"key\": \"MSISDN\",\n \"value\": \"17855501914\"\n }\n ]\n }\n}" + }, + "url": { + "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/parties/BUSINESS/17855501914/error", + "host": [ + "{{HOST_ACCOUNT_LOOKUP_SERVICE}}" + ], + "path": [ + "parties", + "BUSINESS", + "17855501914", + "error" + ] + } + }, + "response": [] } ], - "request": { - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "application/vnd.interoperability.quotes+json;version=1" - }, - { - "key": "Content-Type", - "value": "application/vnd.interoperability.quotes+json;version=1.0" - }, - { - "key": "FSPIOP-Source", - "type": "text", - "value": "{{payerfsp}}" - }, - { - "key": "FSPIOP-Destination", - "type": "text", - "value": "{{payeefsp}}" - } - ], - "url": { - "raw": "{{HOST_QUOTING_SERVICE}}/quotes/{{quoteId2}}", - "host": [ - "{{HOST_QUOTING_SERVICE}}" - ], - "path": [ - "quotes", - "{{quoteId2}}" - ] - }, - "description": "The HTTP request GET /quotes/ is used to get information regarding an earlier created or requested quote. The in the URI should contain the quoteId that was used for the creation of the quote." - }, - "response": [] + "protocolProfileBehavior": {}, + "_postman_isSubFolder": true }, { - "name": "400-Missing FSPIOP-Source header", - "event": [ + "name": "400", + "item": [ { - "listen": "test", - "script": { - "id": "aa07986c-5b41-42d6-9223-157fd4d99a67", - "exec": [ - "pm.test(\"Status code is 400\", function () {", - " pm.response.to.have.status(400);", - "});", - "", - "", - "/*setTimeout(function () {", - " pm.sendRequest(pm.environment.get(\"HOST_SIMULATOR\")+\"/payerfsp/correlationid/\"+pm.variables.get(\"quoteId2\"), function (err, response) {", - " if(response !== null) {", - " console.log(response.json());", - " pm.test(\"Response transfer amount is valid\", function () {", - " ", - " pm.expect(response.json().transferAmount.amount).to.eql('15');", - " ", - " });", - " ", - " pm.test(\"Response condition is not null\", function () {", - " pm.expect(response.json().condition).not.equal(null);", - " ", - " });", - " } else {", - " pm.test(\"Quote FAILED\", function () {", - " throw new Error('Did not receive response');", - " });", - " postman.setNextRequest(null);", - " }", - " ", - " });", - "}, 3000);*/" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "application/vnd.interoperability.quotes+json;version=1" - }, - { - "key": "Content-Type", - "value": "application/vnd.interoperability.quotes+json;version=1.0" - }, - { - "key": "Date", - "value": "{{quoteDate}}" + "name": "Missing Content-Type (BUG)", + "event": [ + { + "listen": "test", + "script": { + "id": "76d6c169-8ddc-4595-8516-b93d15ed72ec", + "exec": [ + "pm.test(\"Status code is 400\", function () {", + " pm.response.to.have.status(400);", + "});", + "", + "var jsonData = pm.response.json();", + "", + "pm.test(\"statusCode is 400\", function () {", + " pm.expect(jsonData.statusCode).to.eql(400);", + "});", + "", + "pm.test(\"errorDescription is Invalid request payload input\", function () {", + " pm.expect(jsonData.message.errorInformation.errorDescription).to.eql('Invalid request payload input');", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "PUT", + "header": [ + { + "key": "Accept", + "type": "text", + "value": "application/vnd.interoperability.parties+json;version=1" + }, + { + "key": "Date", + "type": "text", + "value": "{{dateHeader}}" + }, + { + "key": "FSPIOP-Source", + "type": "text", + "value": "{{payeefsp}}" + }, + { + "key": "FSPIOP-Destination", + "type": "text", + "value": "{{payerfsp}}" + }, + { + "key": "Content-Type", + "type": "text", + "value": "application/vnd.interoperability.parties+json;version=1.0", + "disabled": true + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"errorInformation\": {\n \"errorCode\": \"3204\",\n \"errorDescription\": \"Party with the provided identifier, identifier type, and optional sub id or type was not found.\",\n \"extensionList\": [\n {\n \"key\": \"MSISDN\",\n \"value\": \"17855501914\"\n }\n ]\n }\n}" + }, + "url": { + "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/parties/BUSINESS/17855501914/error", + "host": [ + "{{HOST_ACCOUNT_LOOKUP_SERVICE}}" + ], + "path": [ + "parties", + "BUSINESS", + "17855501914", + "error" + ] + } }, - { - "key": "FSPIOP-Destination", - "type": "text", - "value": "{{payeefsp}}" - } - ], - "url": { - "raw": "{{HOST_QUOTING_SERVICE}}/quotes/{{quoteId2}}", - "host": [ - "{{HOST_QUOTING_SERVICE}}" - ], - "path": [ - "quotes", - "{{quoteId2}}" - ] + "response": [] }, - "description": "The HTTP request GET /quotes/ is used to get information regarding an earlier created or requested quote. The in the URI should contain the quoteId that was used for the creation of the quote." - }, - "response": [] - }, - { - "name": "400- Missing Accept header", - "event": [ { - "listen": "test", - "script": { - "id": "aa07986c-5b41-42d6-9223-157fd4d99a67", - "exec": [ - "pm.test(\"Status code is 400\", function () {", - " pm.response.to.have.status(400);", - "});", - "", - "", - "/*setTimeout(function () {", - " pm.sendRequest(pm.environment.get(\"HOST_SIMULATOR\")+\"/payerfsp/correlationid/\"+pm.variables.get(\"quoteId2\"), function (err, response) {", - " if(response !== null) {", - " console.log(response.json());", - " pm.test(\"Response transfer amount is valid\", function () {", - " ", - " pm.expect(response.json().transferAmount.amount).to.eql('15');", - " ", - " });", - " ", - " pm.test(\"Response condition is not null\", function () {", - " pm.expect(response.json().condition).not.equal(null);", - " ", - " });", - " } else {", - " pm.test(\"Quote FAILED\", function () {", - " throw new Error('Did not receive response');", - " });", - " postman.setNextRequest(null);", - " }", - " ", - " });", - "}, 3000);*/" + "name": "Invalid Accept Header", + "event": [ + { + "listen": "test", + "script": { + "id": "76d6c169-8ddc-4595-8516-b93d15ed72ec", + "exec": [ + "pm.test(\"Status code is 400\", function () {", + " pm.response.to.have.status(400);", + "});", + "", + "var jsonData = pm.response.json();", + "", + "pm.test(\"statusCode is 400\", function () {", + " pm.expect(jsonData.statusCode).to.eql(400);", + "});", + "", + "pm.test(\"errorDescription is Invalid request payload input\", function () {", + " pm.expect(jsonData.message.errorInformation.errorDescription).to.eql('Invalid request payload input');", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "PUT", + "header": [ + { + "key": "Accept", + "type": "text", + "value": "application/vnd.interoperability.parties+json;version=1" + }, + { + "key": "Date", + "type": "text", + "value": "{{dateHeader}}" + }, + { + "key": "FSPIOP-Source", + "type": "text", + "value": "{{payeefsp}}" + }, + { + "key": "FSPIOP-Destination", + "type": "text", + "value": "{{payerfsp}}" + }, + { + "key": "Content-Type", + "type": "text", + "value": "application/vnd.interoperability.parties+json;version=1.0" + } ], - "type": "text/javascript" - } + "body": { + "mode": "raw", + "raw": "{\n \"errorInformation\": {\n \"errorCode\": \"3204\",\n \"errorDescription\": \"Party with the provided identifier, identifier type, and optional sub id or type was not found.\",\n \"extensionList\": [\n {\n \"key\": \"MSISDN\",\n \"value\": \"17855501914\"\n }\n ]\n }\n}" + }, + "url": { + "raw": "{{HOST_ACCOUNT_LOOKUP_SERVICE}}/parties/BUSINESS/17855501914/error", + "host": [ + "{{HOST_ACCOUNT_LOOKUP_SERVICE}}" + ], + "path": [ + "parties", + "BUSINESS", + "17855501914", + "error" + ] + } + }, + "response": [] } ], - "request": { - "method": "GET", - "header": [ - { - "key": "Content-Type", - "value": "application/vnd.interoperability.quotes+json;version=1.0" - }, - { - "key": "Date", - "value": "{{quoteDate}}" - }, - { - "key": "FSPIOP-Source", - "type": "text", - "value": "{{payerfsp}}" - }, - { - "key": "FSPIOP-Destination", - "type": "text", - "value": "{{payeefsp}}" - } - ], - "url": { - "raw": "{{HOST_QUOTING_SERVICE}}/quotes/{{quoteId2}}", - "host": [ - "{{HOST_QUOTING_SERVICE}}" - ], - "path": [ - "quotes", - "{{quoteId2}}" - ] - }, - "description": "The HTTP request GET /quotes/ is used to get information regarding an earlier created or requested quote. The in the URI should contain the quoteId that was used for the creation of the quote." - }, - "response": [] - }, + "protocolProfileBehavior": {}, + "_postman_isSubFolder": true + } + ], + "protocolProfileBehavior": {}, + "_postman_isSubFolder": true + } + ], + "protocolProfileBehavior": {}, + "_postman_isSubFolder": true + } + ], + "description": "Folder for parties", + "event": [ + { + "listen": "prerequest", + "script": { + "id": "2a43de13-c0e4-47b4-a95a-9b466c556d0d", + "type": "text/javascript", + "exec": [ + "// var requestData = {", + "// \"party\": {", + "// \"partyIdInfo\": {", + "// \"partyIdType\": \"MSISDN\",", + "// \"partyIdentifier\": \"17039811907\",", + "// \"fspId\": \"payeefsp\"", + "// },", + "// \"name\": \"Siabelo Maroka\",", + "// \"personalInfo\": {", + "// \"complexName\": {", + "// \"firstName\": \"Siabelo\",", + "// \"lastName\": \"Maroka\"", + "// },", + "// \"dateOfBirth\": \"3/3/1973\"", + "// }", + "// }", + "// }", + "", + "// const addUserRequest = {", + "// url: pm.environment.get(\"HOST_SIMULATOR\")+\"/payeefsp/parties/MSISDN/\"+pm.environment.get(\"pathfinderMSISDN\"),", + "// method: 'POST',", + "// headers: {", + "// \"content-type\": \"application/json\",", + "// },", + "// json: requestData", + "// };", + "// pm.sendRequest(addUserRequest, function (err, res) {", + "// console.log(err ? err : res.json());", + "// });" + ] + } + }, + { + "listen": "test", + "script": { + "id": "acda1151-00f5-46f5-ae59-838e0add964d", + "type": "text/javascript", + "exec": [ + "" + ] + } + } + ], + "protocolProfileBehavior": {}, + "_postman_isSubFolder": true + }, + { + "name": "quotes", + "item": [ + { + "name": "quotes", + "item": [ + { + "name": "GET - Moved to New Collection", + "item": [ { - "name": "404-No ID in the URI", + "name": "Send Quote", "event": [ { - "listen": "test", + "listen": "prerequest", "script": { - "id": "aa07986c-5b41-42d6-9223-157fd4d99a67", + "id": "887e4721-3923-41bd-bf8a-3d0cd5eed8ee", "exec": [ - "pm.test(\"Status code is 404\", function () {", - " pm.response.to.have.status(404);", - "});", - "", - " var jsonData = pm.response.json();", + " ", + " var uuid = require('uuid');", + " var generatedUUID = uuid.v4();", + " pm.environment.set('quoteId2', generatedUUID);", "", - "pm.test(\"Error code is 3002\", function () {", - " pm.expect(jsonData.errorInformation.errorCode).to.eql('3002');", - "});", "", - "pm.test(\"Error Description is Unknown URI - Not Found\", function () {", - " pm.expect(jsonData.errorInformation.errorDescription).to.include(\"Unknown URI - Not Found\");", - "});" + " pm.environment.set('quoteDate', (new Date()).toUTCString());", + "" ], "type": "text/javascript" } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "application/vnd.interoperability.quotes+json;version=1" - }, - { - "key": "Content-Type", - "value": "application/vnd.interoperability.quotes+json;version=1.0" - }, - { - "key": "Date", - "value": "{{quoteDate}}" - }, - { - "key": "FSPIOP-Source", - "type": "text", - "value": "{{payerfsp}}" - }, - { - "key": "FSPIOP-Destination", - "type": "text", - "value": "{{payeefsp}}" - } - ], - "url": { - "raw": "{{HOST_QUOTING_SERVICE}}/quotes/", - "host": [ - "{{HOST_QUOTING_SERVICE}}" - ], - "path": [ - "quotes", - "" - ] }, - "description": "The HTTP request GET /quotes/ is used to get information regarding an earlier created or requested quote. The in the URI should contain the quoteId that was used for the creation of the quote." - }, - "response": [] - }, - { - "name": "400- Malformed ID", - "event": [ { "listen": "test", "script": { - "id": "aa07986c-5b41-42d6-9223-157fd4d99a67", + "id": "095c973b-3b61-453c-992c-21a78b1066dc", "exec": [ - "pm.test(\"Status code is 400\", function () {", - " pm.response.to.have.status(400);", + "pm.test(\"Status code is 202\", function () {", + " pm.response.to.have.status(202);", "});", "", - "var jsonData = pm.response.json();", - " ", - "pm.test(\"Check Malformed ID - 000000\", function () {", - " pm.expect(jsonData.errorInformation.errorDescription).to.include('Malformed syntax');", - "}); ", - " ", - "pm.test(\"Check Error code 3101\", function () {", - " pm.expect(jsonData.errorInformation.errorCode).to.eql('3101');", - "});", + "// pm.test(\"Check that Content-Type is present\", function () {", + "// pm.response.to.have.header(\"Content-Type\");", + "// pm.response.to.be.header(\"Content-Type\", \"application/vnd.interoperability.quotes+json;version=1.0\");", + "// });", "", "", + "setTimeout(function () {", + " pm.sendRequest(pm.environment.get(\"HOST_SIMULATOR\")+\"/payerfsp/correlationid/\"+pm.variables.get(\"quoteId2\"), function (err, response) {", + " if(response !== null) {", + " console.log(response.json());", + " pm.test(\"Response ilpPacket is not null\", function () {", + " pm.expect(response.json().ilpPacket).not.equal(null);", + " pm.environment.set(\"ilpPacket2\", response.json().ilpPacket);", + " });", + " ", + " pm.test(\"Response condition is not null\", function () {", + " pm.expect(response.json().condition).not.equal(null);", + " pm.environment.set(\"condition2\", response.json().condition);", + " });", + " } else {", + " pm.test(\"Quote FAILED\", function () {", + " throw new Error('Did not receive response');", + " });", + " postman.setNextRequest(null);", + " }", + " ", + " });", + "}, 3000);", "", "", "" @@ -4562,7 +5168,7 @@ } ], "request": { - "method": "GET", + "method": "POST", "header": [ { "key": "Accept", @@ -4570,7 +5176,9 @@ }, { "key": "Content-Type", - "value": "application/vnd.interoperability.quotes+json;version=1.0" + "name": "Content-Type", + "value": "application/vnd.interoperability.quotes+json;version=1.0", + "type": "text" }, { "key": "Date", @@ -4578,54 +5186,65 @@ }, { "key": "FSPIOP-Source", - "type": "text", "value": "{{payerfsp}}" }, { "key": "FSPIOP-Destination", - "type": "text", "value": "{{payeefsp}}" } ], + "body": { + "mode": "raw", + "raw": "{\n \"quoteId\": \"{{quoteId2}}\",\n \"transactionId\": \"{{quoteId2}}\",\n \"payee\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"MSISDN\",\n \"partyIdentifier\": \"{{receiverMSISDN}}\",\n \"fspId\": \"{{payeefsp}}\"\n }\n },\n \"payer\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"MSISDN\",\n \"partyIdentifier\": \"27713803905\",\n \"fspId\": \"{{payerfsp}}\"\n },\n \"personalInfo\": {\n \"complexName\": {\n \"firstName\": \"Mats\",\n \"lastName\": \"Hagman\"\n },\n \"dateOfBirth\": \"1983-10-25\"\n }\n },\n \"amountType\": \"SEND\",\n \"amount\": {\n \"amount\": \"15\" ,\n \"currency\": \"XOF\"\n },\n \"transactionType\": {\n \"scenario\": \"TRANSFER\",\n \"initiator\": \"PAYER\",\n \"initiatorType\": \"CONSUMER\"\n },\n \"note\": \"hej\"\n}" + }, "url": { - "raw": "{{HOST_QUOTING_SERVICE}}/quotes/000000", + "raw": "{{HOST_QUOTING_SERVICE}}/quotes", "host": [ "{{HOST_QUOTING_SERVICE}}" ], "path": [ - "quotes", - "000000" + "quotes" ] - }, - "description": "The HTTP request GET /quotes/ is used to get information regarding an earlier created or requested quote. The in the URI should contain the quoteId that was used for the creation of the quote." + } }, "response": [] }, { - "name": "400-Malformed ID", + "name": "QuotesByID", "event": [ { "listen": "test", "script": { "id": "aa07986c-5b41-42d6-9223-157fd4d99a67", "exec": [ - "pm.test(\"Status code is 400\", function () {", - " pm.response.to.have.status(400);", - "});", - "", - "var jsonData = pm.response.json();", - " ", - "pm.test(\"Check Malformed ID - 482f5eb4-67b6-####-9737-c77b0@$4706c\", function () {", - " pm.expect(jsonData.errorInformation.errorDescription).to.include('Malformed syntax');", - "}); ", - " ", - "pm.test(\"Check Error code 3101\", function () {", - " pm.expect(jsonData.errorInformation.errorCode).to.eql('3101');", + "pm.test(\"Status code is 202\", function () {", + " pm.response.to.have.status(202);", "});", "", "", - "", - "" + "setTimeout(function () {", + " pm.sendRequest(pm.environment.get(\"HOST_SIMULATOR\")+\"/payerfsp/correlationid/\"+pm.variables.get(\"quoteId2\"), function (err, response) {", + " if(response.responseSize !== 0) {", + " console.log(response.json());", + " pm.test(\"Response transfer amount is valid\", function () {", + " // pm.expect(response.json().ilpPacket).not.equal(null);", + " pm.expect(response.json().transferAmount.amount).to.eql('15');", + " // pm.environment.set(\"ilpPacket\", response.json().ilpPacket);", + " });", + " ", + " pm.test(\"Response condition is not null\", function () {", + " pm.expect(response.json().condition).not.equal(null);", + " //pm.environment.set(\"condition\", response.json().condition);", + " });", + " } else {", + " pm.test(\"Quote FAILED\", function () {", + " throw new Error('Did not receive response');", + " });", + " postman.setNextRequest(null);", + " }", + " ", + " });", + "}, 3000);" ], "type": "text/javascript" } @@ -4648,72 +5267,42 @@ }, { "key": "FSPIOP-Source", - "type": "text", - "value": "{{payerfsp}}" + "value": "{{payerfsp}}", + "type": "text" }, { "key": "FSPIOP-Destination", - "type": "text", - "value": "{{payeefsp}}" + "value": "{{payeefsp}}", + "type": "text" } ], "url": { - "raw": "{{HOST_QUOTING_SERVICE}}/quotes/482f5eb4-67b6-####-9737-c77b0@$4706c", + "raw": "{{HOST_QUOTING_SERVICE}}/quotes/{{quoteId2}}", "host": [ "{{HOST_QUOTING_SERVICE}}" ], "path": [ "quotes", - "482f5eb4-67b6-" - ], - "hash": "###-9737-c77b0@$4706c" + "{{quoteId2}}" + ] }, "description": "The HTTP request GET /quotes/ is used to get information regarding an earlier created or requested quote. The in the URI should contain the quoteId that was used for the creation of the quote." }, "response": [] }, { - "name": "202-Unexistent ID-3000", + "name": "400-Missing Date header", "event": [ { "listen": "test", "script": { "id": "aa07986c-5b41-42d6-9223-157fd4d99a67", "exec": [ - "pm.test(\"Status code is 202\", function () {", - " pm.response.to.have.status(202);", + "pm.test(\"Status code is 400\", function () {", + " pm.response.to.have.status(400);", "});", "", "", - "// FROM API Spec: 3205 - Quote ID not found -\tProvided Quote ID was not found in the server.", - "setTimeout(function () {", - " pm.sendRequest(pm.environment.get(\"HOST_SIMULATOR\")+\"/payerfsp/callbacks/482f5ea4-67b6-431a-9737-c77b0123706c\", function (err, response) {", - " if(response.responseSize !== 0) {", - " console.log(response.json());", - " ", - " pm.test(\"Response condition is not null\", function () {", - " pm.expect(response.json().condition).not.equal(null);", - " });", - " ", - " var jsonData = response.json().data;", - " ", - " pm.test(\"Check Error code 3000\", function () {", - " pm.expect(jsonData.errorInformation.errorCode).to.eql('3000');", - " });", - " ", - " pm.test(\"Check Generic client error\", function () {", - " pm.expect(jsonData.errorInformation.errorDescription).to.include('Generic client error');", - " });", - " ", - " } else {", - " pm.test(\"Quote FAILED\", function () {", - " throw new Error('Did not receive response');", - " });", - " postman.setNextRequest(null);", - " }", - " ", - " });", - "}, 3000);", "" ], "type": "text/javascript" @@ -4731,10 +5320,6 @@ "key": "Content-Type", "value": "application/vnd.interoperability.quotes+json;version=1.0" }, - { - "key": "Date", - "value": "{{quoteDate}}" - }, { "key": "FSPIOP-Source", "type": "text", @@ -4747,71 +5332,62 @@ } ], "url": { - "raw": "{{HOST_QUOTING_SERVICE}}/quotes/482f5ea4-67b6-431a-9737-c77b0123706c", + "raw": "{{HOST_QUOTING_SERVICE}}/quotes/{{quoteId2}}", "host": [ "{{HOST_QUOTING_SERVICE}}" ], "path": [ "quotes", - "482f5ea4-67b6-431a-9737-c77b0123706c" + "{{quoteId2}}" ] }, "description": "The HTTP request GET /quotes/ is used to get information regarding an earlier created or requested quote. The in the URI should contain the quoteId that was used for the creation of the quote." }, "response": [] - } - ], - "protocolProfileBehavior": {}, - "_postman_isSubFolder": true - }, - { - "name": "POST", - "item": [ - { - "name": "RC 400 - EC 3102 Missing mandatory element - empty quote id", - "event": [ - { - "listen": "prerequest", - "script": { - "id": "887e4721-3923-41bd-bf8a-3d0cd5eed8ee", - "exec": [ - " ", - " var uuid = require('uuid');", - " var generatedUUID = uuid.v4();", - " pm.environment.set('quoteId2', generatedUUID);", - "", - "", - " pm.environment.set('quoteDate', (new Date()).toUTCString());", - "" - ], - "type": "text/javascript" - } - }, + }, + { + "name": "400-Missing FSPIOP-Source header", + "event": [ { "listen": "test", "script": { - "id": "095c973b-3b61-453c-992c-21a78b1066dc", + "id": "aa07986c-5b41-42d6-9223-157fd4d99a67", "exec": [ "pm.test(\"Status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", - "var jsonData = pm.response.json();", - " ", - "pm.test(\"Check Missing mandatory element - QuoteId\", function () {", - " pm.expect(jsonData.errorInformation.errorDescription).to.include('Missing mandatory element ');", - "}); ", - " ", - "pm.test(\"Check Error code 3102\", function () {", - " pm.expect(jsonData.errorInformation.errorCode).to.eql('3102');", - "});" + "", + "/*setTimeout(function () {", + " pm.sendRequest(pm.environment.get(\"HOST_SIMULATOR\")+\"/payerfsp/correlationid/\"+pm.variables.get(\"quoteId2\"), function (err, response) {", + " if(response !== null) {", + " console.log(response.json());", + " pm.test(\"Response transfer amount is valid\", function () {", + " ", + " pm.expect(response.json().transferAmount.amount).to.eql('15');", + " ", + " });", + " ", + " pm.test(\"Response condition is not null\", function () {", + " pm.expect(response.json().condition).not.equal(null);", + " ", + " });", + " } else {", + " pm.test(\"Quote FAILED\", function () {", + " throw new Error('Did not receive response');", + " });", + " postman.setNextRequest(null);", + " }", + " ", + " });", + "}, 3000);*/" ], "type": "text/javascript" } } ], "request": { - "method": "POST", + "method": "GET", "header": [ { "key": "Accept", @@ -4819,95 +5395,79 @@ }, { "key": "Content-Type", - "name": "Content-Type", - "value": "application/vnd.interoperability.quotes+json;version=1.0", - "type": "text" + "value": "application/vnd.interoperability.quotes+json;version=1.0" }, { "key": "Date", "value": "{{quoteDate}}" }, - { - "key": "FSPIOP-Source", - "value": "{{payerfsp}}" - }, { "key": "FSPIOP-Destination", + "type": "text", "value": "{{payeefsp}}" } ], - "body": { - "mode": "raw", - "raw": "{\n \"quoteId\": \"\",\n \"transactionId\": \"{{quoteId2}}\",\n \"payee\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"MSISDN\",\n \"partyIdentifier\": \"{{receiverMSISDN}}\",\n \"fspId\": \"{{payeefsp}}\"\n }\n },\n \"payer\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"MSISDN\",\n \"partyIdentifier\": \"27713803905\",\n \"fspId\": \"{{payerfsp}}\"\n },\n \"personalInfo\": {\n \"complexName\": {\n \"firstName\": \"Mats\",\n \"lastName\": \"Hagman\"\n },\n \"dateOfBirth\": \"1983-10-25\"\n }\n },\n \"amountType\": \"SEND\",\n \"amount\": {\n \"amount\": \"15\" ,\n \"currency\": \"XOF\"\n },\n \"transactionType\": {\n \"scenario\": \"TRANSFER\",\n \"initiator\": \"PAYER\",\n \"initiatorType\": \"CONSUMER\"\n },\n \"note\": \"hej\"\n}" - }, "url": { - "raw": "{{HOST_QUOTING_SERVICE}}/quotes", + "raw": "{{HOST_QUOTING_SERVICE}}/quotes/{{quoteId2}}", "host": [ "{{HOST_QUOTING_SERVICE}}" ], "path": [ - "quotes" + "quotes", + "{{quoteId2}}" ] - } + }, + "description": "The HTTP request GET /quotes/ is used to get information regarding an earlier created or requested quote. The in the URI should contain the quoteId that was used for the creation of the quote." }, "response": [] }, { - "name": "RC 406 - EC 3001 - Unacceptable version", + "name": "400- Missing Accept header", "event": [ - { - "listen": "prerequest", - "script": { - "id": "887e4721-3923-41bd-bf8a-3d0cd5eed8ee", - "exec": [ - "if (pm.environment.get('CONFIG_GENERATE_NEW_TRANSFER_UUID_ON_PREPARE') === 'true') {", - " var uuid = require('uuid');", - " var generatedUUID = uuid.v4();", - " pm.environment.set('quoteId2', generatedUUID);", - "}", - "", - "if (pm.environment.get('CONFIG_GENERATE_NEW_PREPARE_DATE') === 'true') {", - " pm.environment.set('quoteDate', (new Date()).toUTCString());", - "}" - ], - "type": "text/javascript" - } - }, { "listen": "test", "script": { - "id": "095c973b-3b61-453c-992c-21a78b1066dc", + "id": "aa07986c-5b41-42d6-9223-157fd4d99a67", "exec": [ - "pm.test(\"Status code is 406\", function () {", - " pm.response.to.have.status(406);", + "pm.test(\"Status code is 400\", function () {", + " pm.response.to.have.status(400);", "});", "", - "var jsonData = pm.response.json();", - " ", - "pm.test(\"Check Unacceptable version requested\", function () {", - " pm.expect(jsonData.errorInformation.errorDescription).to.include('Unacceptable version requested');", - "}); ", - " ", - "pm.test(\"Check Error code 3001\", function () {", - " pm.expect(jsonData.errorInformation.errorCode).to.eql('3001');", - "});" + "", + "/*setTimeout(function () {", + " pm.sendRequest(pm.environment.get(\"HOST_SIMULATOR\")+\"/payerfsp/correlationid/\"+pm.variables.get(\"quoteId2\"), function (err, response) {", + " if(response !== null) {", + " console.log(response.json());", + " pm.test(\"Response transfer amount is valid\", function () {", + " ", + " pm.expect(response.json().transferAmount.amount).to.eql('15');", + " ", + " });", + " ", + " pm.test(\"Response condition is not null\", function () {", + " pm.expect(response.json().condition).not.equal(null);", + " ", + " });", + " } else {", + " pm.test(\"Quote FAILED\", function () {", + " throw new Error('Did not receive response');", + " });", + " postman.setNextRequest(null);", + " }", + " ", + " });", + "}, 3000);*/" ], "type": "text/javascript" } } ], "request": { - "method": "POST", + "method": "GET", "header": [ - { - "key": "Accept", - "value": "application/vnd.interoperability.quotes+json;version=5000" - }, { "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/vnd.interoperability.quotes+json;version=5000.0" + "value": "application/vnd.interoperability.quotes+json;version=1.0" }, { "key": "Date", @@ -4915,83 +5475,57 @@ }, { "key": "FSPIOP-Source", + "type": "text", "value": "{{payerfsp}}" }, { "key": "FSPIOP-Destination", + "type": "text", "value": "{{payeefsp}}" } ], - "body": { - "mode": "raw", - "raw": "{\n \"quoteId\": \"{{quoteId2}}\",\n \"transactionId\": \"{{quoteId2}}\",\n \"payee\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"MSISDN\",\n \"partyIdentifier\": \"{{receiverMSISDN}}\",\n \"fspId\": \"{{payeefsp}}\"\n }\n },\n \"payer\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"MSISDN\",\n \"partyIdentifier\": \"27713803905\",\n \"fspId\": \"{{payerfsp}}\"\n },\n \"personalInfo\": {\n \"complexName\": {\n \"firstName\": \"Mats\",\n \"lastName\": \"Hagman\"\n },\n \"dateOfBirth\": \"1983-10-25\"\n }\n },\n \"amountType\": \"SEND\",\n \"amount\": {\n \"amount\": \"15\",\n \"currency\": \"XOF\"\n },\n \"transactionType\": {\n \"scenario\": \"TRANSFER\",\n \"initiator\": \"PAYER\",\n \"initiatorType\": \"CONSUMER\"\n },\n \"note\": \"hej\"\n}" - }, "url": { - "raw": "{{HOST_QUOTING_SERVICE}}/quotes", + "raw": "{{HOST_QUOTING_SERVICE}}/quotes/{{quoteId2}}", "host": [ "{{HOST_QUOTING_SERVICE}}" ], "path": [ - "quotes" + "quotes", + "{{quoteId2}}" ] }, - "description": "Expected should be this:\r\n{\r\n \"errorInformation\": {\r\n \"errorCode\": \"3001\",\r\n \"errorDescription\": \"The Client requested an unsupported version, see extension list for supported version(s).\",\r\n \"extensionList\": [\r\n { \"key\": \"1\", \"value\": \"0\" },\r\n { \"key\": \"2\", \"value\": \"1\" },\r\n { \"key\": \"4\", \"value\": \"2\" }\r\n ]\r\n }\r\n}" + "description": "The HTTP request GET /quotes/ is used to get information regarding an earlier created or requested quote. The in the URI should contain the quoteId that was used for the creation of the quote." }, "response": [] }, { - "name": "RC 400 - EC 3101 Malformed QuoteId", + "name": "404-No ID in the URI", "event": [ - { - "listen": "prerequest", - "script": { - "id": "887e4721-3923-41bd-bf8a-3d0cd5eed8ee", - "exec": [ - "", - " var uuid = require('uuid');", - " var generatedUUID = uuid.v4();", - " pm.environment.set('quoteId2', generatedUUID);", - "", - "", - "", - " pm.environment.set('quoteDate', (new Date()).toUTCString());", - "" - ], - "type": "text/javascript" - } - }, { "listen": "test", "script": { - "id": "095c973b-3b61-453c-992c-21a78b1066dc", + "id": "aa07986c-5b41-42d6-9223-157fd4d99a67", "exec": [ - "pm.test(\"Status code is 400\", function () {", - " pm.response.to.have.status(400);", + "pm.test(\"Status code is 404\", function () {", + " pm.response.to.have.status(404);", "});", "", + " var jsonData = pm.response.json();", "", - "var jsonData = pm.response.json();", - " ", - "pm.test(\"Check Malformed syntax - Quote ID\", function () {", - " pm.expect(jsonData.errorInformation.errorDescription).to.include('Malformed syntax');", - "}); ", - " ", - "pm.test(\"Check Error code 3101\", function () {", - " pm.expect(jsonData.errorInformation.errorCode).to.eql('3101');", + "pm.test(\"Error code is 3002\", function () {", + " pm.expect(jsonData.errorInformation.errorCode).to.eql('3002');", "});", "", - "", - "", - "", - "", - "" + "pm.test(\"Error Description is Unknown URI - Not Found\", function () {", + " pm.expect(jsonData.errorInformation.errorDescription).to.include(\"Unknown URI - Not Found\");", + "});" ], "type": "text/javascript" } } ], "request": { - "method": "POST", + "method": "GET", "header": [ { "key": "Accept", @@ -4999,8 +5533,6 @@ }, { "key": "Content-Type", - "name": "Content-Type", - "type": "text", "value": "application/vnd.interoperability.quotes+json;version=1.0" }, { @@ -5009,77 +5541,62 @@ }, { "key": "FSPIOP-Source", + "type": "text", "value": "{{payerfsp}}" }, { "key": "FSPIOP-Destination", + "type": "text", "value": "{{payeefsp}}" } ], - "body": { - "mode": "raw", - "raw": "{\n \"quoteId\": \"@123#59\",\n \"transactionId\": \"{{quoteId2}}\",\n \"payee\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"MSISDN\",\n \"partyIdentifier\": \"{{receiverMSISDN}}\",\n \"fspId\": \"{{payeefsp}}\"\n }\n },\n \"payer\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"MSISDN\",\n \"partyIdentifier\": \"27713803905\",\n \"fspId\": \"{{payerfsp}}\"\n },\n \"personalInfo\": {\n \"complexName\": {\n \"firstName\": \"Mats\",\n \"lastName\": \"Hagman\"\n },\n \"dateOfBirth\": \"1983-10-25\"\n }\n },\n \"amountType\": \"SEND\",\n \"amount\": {\n \"amount\": \"17\",\n \"currency\": \"XOF\"\n },\n \"transactionType\": {\n \"scenario\": \"TRANSFER\",\n \"initiator\": \"PAYER\",\n \"initiatorType\": \"CONSUMER\"\n },\n \"note\": \"hej\"\n}" - }, "url": { - "raw": "{{HOST_QUOTING_SERVICE}}/quotes", + "raw": "{{HOST_QUOTING_SERVICE}}/quotes/", "host": [ "{{HOST_QUOTING_SERVICE}}" ], "path": [ - "quotes" + "quotes", + "" ] }, - "description": "This is the log at simulators: I see 2 error msgs in which one is appropriate \" invalid guid format quoteID\" but the other is abt transfer expirty date.. which I do not understand.\n\n[d1741-simulator-85448cd97d-jbc74] 2019-08-29T21:28:51.026Z - info: L1p-Trace-Id=undefined - Method: post Path: /payeefsp/quotes Query: {} \n[d1741-simulator-85448cd97d-jbc74] 2019-08-29T21:28:51.026Z - info: L1p-Trace-Id=undefined - Headers: {\"host\":\"dev1-simulator.mojaloop.live\",\"connection\":\"close\",\"x-request-id\":\"b3c628cbc0b801c12e0901d6a4db76b4\",\"x-real-ip\":\"10.1.2.185\",\"x-forwarded-for\":\"10.1.2.185\",\"x-forwarded-host\":\"dev1-simulator.mojaloop.live\",\"x-forwarded-port\":\"80\",\"x-forwarded-proto\":\"http\",\"x-original-uri\":\"/payeefsp/quotes\",\"x-scheme\":\"http\",\"content-length\":\"546\",\"content-type\":\"application/vnd.interoperability.quotes+json;version=1.0\",\"date\":\"Thu, 29 Aug 2019 21:28:51 GMT\",\"fspiop-source\":\"payerfsp\",\"fspiop-destination\":\"payeefsp\",\"accept\":\"application/vnd.interoperability.quotes+json;version=1\",\"user-agent\":\"node-fetch/1.0 (+https://github.com/bitinn/node-fetch)\",\"accept-encoding\":\"gzip,deflate\"} \n[d1741-simulator-85448cd97d-jbc74] 2019-08-29T21:28:51.029Z - info: L1p-Trace-Id=undefined - Response: ValidationError: child \"@ Quote Id must be in a valid GUID format. @\" fails because [\"@ Quote Id must be in a valid GUID format. @\" must be a valid GUID] \n[d1741-simulator-85448cd97d-jbc74] 2019-08-29T21:28:51.044Z - info: L1p-Trace-Id=undefined - Method: put Path: /payerfsp/quotes/@123 Query: {} \n[d1741-simulator-85448cd97d-jbc74] 2019-08-29T21:28:51.045Z - info: L1p-Trace-Id=undefined - Headers: {\"host\":\"dev1-simulator.mojaloop.live\",\"connection\":\"close\",\"x-request-id\":\"368abe999b812644e001df12752be5f8\",\"x-real-ip\":\"10.1.2.185\",\"x-forwarded-for\":\"10.1.2.185\",\"x-forwarded-host\":\"dev1-simulator.mojaloop.live\",\"x-forwarded-port\":\"80\",\"x-forwarded-proto\":\"http\",\"x-original-uri\":\"/payerfsp/quotes/@123\",\"x-scheme\":\"http\",\"content-length\":\"1727\",\"content-type\":\"application/vnd.interoperability.quotes+json;version=1.0\",\"date\":\"Thu, 29 Aug 2019 21:28:51 GMT\",\"fspiop-source\":\"switch\",\"fspiop-destination\":\"payerfsp\",\"fspiop-http-method\":\"PUT\",\"user-agent\":\"axios/0.19.0\"} \n[d1741-simulator-85448cd97d-jbc74] 2019-08-29T21:28:51.048Z - info: L1p-Trace-Id=undefined - Response: ValidationError: child \"@ A valid transfer expiry date must be supplied. @\" fails because [\"@ A valid transfer expiry date must be supplied. @\" is required]" + "description": "The HTTP request GET /quotes/ is used to get information regarding an earlier created or requested quote. The in the URI should contain the quoteId that was used for the creation of the quote." }, "response": [] }, { - "name": "RC 400 - EC 3101 Malformed TransactionId", + "name": "400- Malformed ID", "event": [ - { - "listen": "prerequest", - "script": { - "id": "887e4721-3923-41bd-bf8a-3d0cd5eed8ee", - "exec": [ - "if (pm.environment.get('CONFIG_GENERATE_NEW_TRANSFER_UUID_ON_PREPARE') === 'true') {", - " var uuid = require('uuid');", - " var generatedUUID = uuid.v4();", - " pm.environment.set('quoteId2', generatedUUID);", - "}", - "", - "if (pm.environment.get('CONFIG_GENERATE_NEW_PREPARE_DATE') === 'true') {", - " pm.environment.set('quoteDate', (new Date()).toUTCString());", - "}" - ], - "type": "text/javascript" - } - }, { "listen": "test", "script": { - "id": "095c973b-3b61-453c-992c-21a78b1066dc", + "id": "aa07986c-5b41-42d6-9223-157fd4d99a67", "exec": [ "pm.test(\"Status code is 400\", function () {", " pm.response.to.have.status(400);", "});", "", - "", "var jsonData = pm.response.json();", " ", - "pm.test(\"Check Malformed syntax - Transaction ID\", function () {", + "pm.test(\"Check Malformed ID - 000000\", function () {", " pm.expect(jsonData.errorInformation.errorDescription).to.include('Malformed syntax');", "}); ", " ", "pm.test(\"Check Error code 3101\", function () {", " pm.expect(jsonData.errorInformation.errorCode).to.eql('3101');", - "});" + "});", + "", + "", + "", + "", + "" ], "type": "text/javascript" } } ], "request": { - "method": "POST", + "method": "GET", "header": [ { "key": "Accept", @@ -5087,8 +5604,6 @@ }, { "key": "Content-Type", - "name": "Content-Type", - "type": "text", "value": "application/vnd.interoperability.quotes+json;version=1.0" }, { @@ -5097,74 +5612,61 @@ }, { "key": "FSPIOP-Source", + "type": "text", "value": "{{payerfsp}}" }, { "key": "FSPIOP-Destination", + "type": "text", "value": "{{payeefsp}}" } ], - "body": { - "mode": "raw", - "raw": "{\n \"quoteId\": \"{{quoteId2}}\",\n \"transactionId\": \"@123\",\n \"payee\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"MSISDN\",\n \"partyIdentifier\": \"{{receiverMSISDN}}\",\n \"fspId\": \"{{payeefsp}}\"\n }\n },\n \"payer\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"MSISDN\",\n \"partyIdentifier\": \"27713803905\",\n \"fspId\": \"{{payerfsp}}\"\n },\n \"personalInfo\": {\n \"complexName\": {\n \"firstName\": \"Mats\",\n \"lastName\": \"Hagman\"\n },\n \"dateOfBirth\": \"1983-10-25\"\n }\n },\n \"amountType\": \"SEND\",\n \"amount\": {\n \"amount\": \"17\",\n \"currency\": \"XOF\"\n },\n \"transactionType\": {\n \"scenario\": \"TRANSFER\",\n \"initiator\": \"PAYER\",\n \"initiatorType\": \"CONSUMER\"\n },\n \"note\": \"hej\"\n}" - }, "url": { - "raw": "{{HOST_QUOTING_SERVICE}}/quotes", + "raw": "{{HOST_QUOTING_SERVICE}}/quotes/000000", "host": [ "{{HOST_QUOTING_SERVICE}}" ], "path": [ - "quotes" + "quotes", + "000000" ] - } + }, + "description": "The HTTP request GET /quotes/ is used to get information regarding an earlier created or requested quote. The in the URI should contain the quoteId that was used for the creation of the quote." }, "response": [] }, { - "name": "RC 400 - Error 3101 Malformed Syntax - invalid payeePartyIdType", + "name": "400-Malformed ID", "event": [ - { - "listen": "prerequest", - "script": { - "id": "887e4721-3923-41bd-bf8a-3d0cd5eed8ee", - "exec": [ - "if (pm.environment.get('CONFIG_GENERATE_NEW_TRANSFER_UUID_ON_PREPARE') === 'true') {", - " var uuid = require('uuid');", - " var generatedUUID = uuid.v4();", - " pm.environment.set('quoteId2', generatedUUID);", - "}", - "", - "if (pm.environment.get('CONFIG_GENERATE_NEW_PREPARE_DATE') === 'true') {", - " pm.environment.set('quoteDate', (new Date()).toUTCString());", - "}" - ], - "type": "text/javascript" - } - }, { "listen": "test", "script": { - "id": "095c973b-3b61-453c-992c-21a78b1066dc", + "id": "aa07986c-5b41-42d6-9223-157fd4d99a67", "exec": [ "pm.test(\"Status code is 400\", function () {", " pm.response.to.have.status(400);", "});", + "", "var jsonData = pm.response.json();", " ", - "pm.test(\"Check Malformed syntax - PayeePartyIdTypeEnum\", function () {", - " pm.expect(jsonData.errorInformation.errorDescription).to.include('PartyIdTypeEnum');", + "pm.test(\"Check Malformed ID - 482f5eb4-67b6-####-9737-c77b0@$4706c\", function () {", + " pm.expect(jsonData.errorInformation.errorDescription).to.include('Malformed syntax');", "}); ", " ", "pm.test(\"Check Error code 3101\", function () {", " pm.expect(jsonData.errorInformation.errorCode).to.eql('3101');", - "});" + "});", + "", + "", + "", + "" ], "type": "text/javascript" } } ], "request": { - "method": "POST", + "method": "GET", "header": [ { "key": "Accept", @@ -5172,8 +5674,6 @@ }, { "key": "Content-Type", - "name": "Content-Type", - "type": "text", "value": "application/vnd.interoperability.quotes+json;version=1.0" }, { @@ -5182,75 +5682,70 @@ }, { "key": "FSPIOP-Source", + "type": "text", "value": "{{payerfsp}}" }, { "key": "FSPIOP-Destination", + "type": "text", "value": "{{payeefsp}}" } ], - "body": { - "mode": "raw", - "raw": "{\n \"quoteId\": \"{{quoteId2}}\",\n \"transactionId\": \"{{quoteId2}}\",\n \"payee\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"CELLNM\",\n \"partyIdentifier\": \"{{receiverMSISDN}}\",\n \"fspId\": \"{{payeefsp}}\"\n }\n },\n \"payer\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"MSISDN\",\n \"partyIdentifier\": \"27713803905\",\n \"fspId\": \"{{payerfsp}}\"\n },\n \"personalInfo\": {\n \"complexName\": {\n \"firstName\": \"Mats\",\n \"lastName\": \"Hagman\"\n },\n \"dateOfBirth\": \"1983-10-25\"\n }\n },\n \"amountType\": \"SEND\",\n \"amount\": {\n \"amount\": \"17\",\n \"currency\": \"XOF\"\n },\n \"transactionType\": {\n \"scenario\": \"TRANSFER\",\n \"initiator\": \"PAYER\",\n \"initiatorType\": \"CONSUMER\"\n },\n \"note\": \"hej\"\n}" - }, "url": { - "raw": "{{HOST_QUOTING_SERVICE}}/quotes", + "raw": "{{HOST_QUOTING_SERVICE}}/quotes/482f5eb4-67b6-####-9737-c77b0@$4706c", "host": [ "{{HOST_QUOTING_SERVICE}}" ], "path": [ - "quotes" - ] - } + "quotes", + "482f5eb4-67b6-" + ], + "hash": "###-9737-c77b0@$4706c" + }, + "description": "The HTTP request GET /quotes/ is used to get information regarding an earlier created or requested quote. The in the URI should contain the quoteId that was used for the creation of the quote." }, "response": [] }, { - "name": "RC 400 - Error 3101 Malformed Syntax - invalid payerPartyIdType", + "name": "202- Non-existent ID-1178", "event": [ - { - "listen": "prerequest", - "script": { - "id": "887e4721-3923-41bd-bf8a-3d0cd5eed8ee", - "exec": [ - "if (pm.environment.get('CONFIG_GENERATE_NEW_TRANSFER_UUID_ON_PREPARE') === 'true') {", - " var uuid = require('uuid');", - " var generatedUUID = uuid.v4();", - " pm.environment.set('quoteId2', generatedUUID);", - "}", - "", - "if (pm.environment.get('CONFIG_GENERATE_NEW_PREPARE_DATE') === 'true') {", - " pm.environment.set('quoteDate', (new Date()).toUTCString());", - "}" - ], - "type": "text/javascript" - } - }, { "listen": "test", "script": { - "id": "095c973b-3b61-453c-992c-21a78b1066dc", + "id": "aa07986c-5b41-42d6-9223-157fd4d99a67", "exec": [ - "pm.test(\"Status code is 400\", function () {", - " pm.response.to.have.status(400);", + "pm.test(\"Status code is 202\", function () {", + " pm.response.to.have.status(202);", "});", "", - "var jsonData = pm.response.json();", - " ", - "pm.test(\"Check Malformed syntax - PayerPartyIdTypeEnum\", function () {", - " pm.expect(jsonData.errorInformation.errorDescription).to.include('PartyIdTypeEnum');", - "}); ", - " ", - "pm.test(\"Check Error code 3101\", function () {", - " pm.expect(jsonData.errorInformation.errorCode).to.eql('3101');", - "});" + "", + "// FROM API Spec: 3205 - Quote ID not found -\tProvided Quote ID was not found in the server.", + "setTimeout(function () {", + " pm.sendRequest(pm.environment.get(\"HOST_SIMULATOR\")+\"/payerfsp/callbacks/482f5ea4-67b6-431a-9737-c77b0123706d\", function (err, response) {", + " if(response.responseSize === 0) {", + " ", + " pm.test(\"Response condition is null\", function () {", + " pm.expect(response.responseSize).equal(0);", + " });", + " ", + " ", + " } else {", + " pm.test(\"Quote FAILED\", function () {", + " throw new Error('received response');", + " });", + " postman.setNextRequest(null);", + " }", + " ", + " });", + "}, 3000);", + "" ], "type": "text/javascript" } } ], "request": { - "method": "POST", + "method": "GET", "header": [ { "key": "Accept", @@ -5258,8 +5753,6 @@ }, { "key": "Content-Type", - "name": "Content-Type", - "type": "text", "value": "application/vnd.interoperability.quotes+json;version=1.0" }, { @@ -5268,573 +5761,1154 @@ }, { "key": "FSPIOP-Source", + "type": "text", "value": "{{payerfsp}}" }, - { - "key": "FSPIOP-Destination", - "value": "{{payeefsp}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"quoteId\": \"{{quoteId2}}\",\n \"transactionId\": \"{{quoteId2}}\",\n \"payee\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"MSISDN\",\n \"partyIdentifier\": \"{{receiverMSISDN}}\",\n \"fspId\": \"{{payeefsp}}\"\n }\n },\n \"payer\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"CELLSD\",\n \"partyIdentifier\": \"27713803905\",\n \"fspId\": \"{{payerfsp}}\"\n },\n \"personalInfo\": {\n \"complexName\": {\n \"firstName\": \"Mats\",\n \"lastName\": \"Hagman\"\n },\n \"dateOfBirth\": \"1983-10-25\"\n }\n },\n \"amountType\": \"SEND\",\n \"amount\": {\n \"amount\": \"19\",\n \"currency\": \"XOF\"\n },\n \"transactionType\": {\n \"scenario\": \"TRANSFER\",\n \"initiator\": \"PAYER\",\n \"initiatorType\": \"CONSUMER\"\n },\n \"note\": \"hej\"\n}" + { + "key": "FSPIOP-Destination", + "type": "text", + "value": "{{payeefsp}}" + } + ], + "url": { + "raw": "{{HOST_QUOTING_SERVICE}}/quotes/482f5ea4-67b6-431a-9737-c77b0123706d", + "host": [ + "{{HOST_QUOTING_SERVICE}}" + ], + "path": [ + "quotes", + "482f5ea4-67b6-431a-9737-c77b0123706d" + ] + } + }, + "response": [] + } + ], + "event": [ + { + "listen": "prerequest", + "script": { + "id": "e063f5fb-ad5a-40b6-88bf-4688f82497b6", + "type": "text/javascript", + "exec": [ + "" + ] + } + }, + { + "listen": "test", + "script": { + "id": "27c556d2-3dfd-4a1c-b1de-aba01586280f", + "type": "text/javascript", + "exec": [ + "" + ] + } + } + ], + "protocolProfileBehavior": {}, + "_postman_isSubFolder": true + }, + { + "name": "POST", + "item": [ + { + "name": "Validated - Moved to New Collection", + "item": [ + { + "name": "RC 400 - EC 3102 Missing mandatory element - empty quote id", + "event": [ + { + "listen": "prerequest", + "script": { + "id": "887e4721-3923-41bd-bf8a-3d0cd5eed8ee", + "exec": [ + " ", + " var uuid = require('uuid');", + " var generatedUUID = uuid.v4();", + " pm.environment.set('quoteId2', generatedUUID);", + "", + "", + " pm.environment.set('quoteDate', (new Date()).toUTCString());", + "" + ], + "type": "text/javascript" + } + }, + { + "listen": "test", + "script": { + "id": "095c973b-3b61-453c-992c-21a78b1066dc", + "exec": [ + "pm.test(\"Status code is 400\", function () {", + " pm.response.to.have.status(400);", + "});", + "", + "var jsonData = pm.response.json();", + " ", + "pm.test(\"Check Missing mandatory element - QuoteId\", function () {", + " pm.expect(jsonData.errorInformation.errorDescription).to.include('Missing mandatory element ');", + "}); ", + " ", + "pm.test(\"Check Error code 3102\", function () {", + " pm.expect(jsonData.errorInformation.errorCode).to.eql('3102');", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Accept", + "value": "application/vnd.interoperability.quotes+json;version=1" + }, + { + "key": "Content-Type", + "name": "Content-Type", + "value": "application/vnd.interoperability.quotes+json;version=1.0", + "type": "text" + }, + { + "key": "Date", + "value": "{{quoteDate}}" + }, + { + "key": "FSPIOP-Source", + "value": "{{payerfsp}}" + }, + { + "key": "FSPIOP-Destination", + "value": "{{payeefsp}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"quoteId\": \"\",\n \"transactionId\": \"{{quoteId2}}\",\n \"payee\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"MSISDN\",\n \"partyIdentifier\": \"{{receiverMSISDN}}\",\n \"fspId\": \"{{payeefsp}}\"\n }\n },\n \"payer\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"MSISDN\",\n \"partyIdentifier\": \"27713803905\",\n \"fspId\": \"{{payerfsp}}\"\n },\n \"personalInfo\": {\n \"complexName\": {\n \"firstName\": \"Mats\",\n \"lastName\": \"Hagman\"\n },\n \"dateOfBirth\": \"1983-10-25\"\n }\n },\n \"amountType\": \"SEND\",\n \"amount\": {\n \"amount\": \"15\" ,\n \"currency\": \"XOF\"\n },\n \"transactionType\": {\n \"scenario\": \"TRANSFER\",\n \"initiator\": \"PAYER\",\n \"initiatorType\": \"CONSUMER\"\n },\n \"note\": \"hej\"\n}" + }, + "url": { + "raw": "{{HOST_QUOTING_SERVICE}}/quotes", + "host": [ + "{{HOST_QUOTING_SERVICE}}" + ], + "path": [ + "quotes" + ] + } + }, + "response": [] + }, + { + "name": "RC 406 - EC 3001 - Unacceptable version", + "event": [ + { + "listen": "prerequest", + "script": { + "id": "887e4721-3923-41bd-bf8a-3d0cd5eed8ee", + "exec": [ + "if (pm.environment.get('CONFIG_GENERATE_NEW_TRANSFER_UUID_ON_PREPARE') === 'true') {", + " var uuid = require('uuid');", + " var generatedUUID = uuid.v4();", + " pm.environment.set('quoteId2', generatedUUID);", + "}", + "", + "if (pm.environment.get('CONFIG_GENERATE_NEW_PREPARE_DATE') === 'true') {", + " pm.environment.set('quoteDate', (new Date()).toUTCString());", + "}" + ], + "type": "text/javascript" + } + }, + { + "listen": "test", + "script": { + "id": "095c973b-3b61-453c-992c-21a78b1066dc", + "exec": [ + "pm.test(\"Status code is 406\", function () {", + " pm.response.to.have.status(406);", + "});", + "", + "var jsonData = pm.response.json();", + " ", + "pm.test(\"Check Unacceptable version requested\", function () {", + " pm.expect(jsonData.errorInformation.errorDescription).to.include('Unacceptable version requested');", + "}); ", + " ", + "pm.test(\"Check Error code 3001\", function () {", + " pm.expect(jsonData.errorInformation.errorCode).to.eql('3001');", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Accept", + "value": "application/vnd.interoperability.quotes+json;version=5000" + }, + { + "key": "Content-Type", + "name": "Content-Type", + "type": "text", + "value": "application/vnd.interoperability.quotes+json;version=5000.0" + }, + { + "key": "Date", + "value": "{{quoteDate}}" + }, + { + "key": "FSPIOP-Source", + "value": "{{payerfsp}}" + }, + { + "key": "FSPIOP-Destination", + "value": "{{payeefsp}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"quoteId\": \"{{quoteId2}}\",\n \"transactionId\": \"{{quoteId2}}\",\n \"payee\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"MSISDN\",\n \"partyIdentifier\": \"{{receiverMSISDN}}\",\n \"fspId\": \"{{payeefsp}}\"\n }\n },\n \"payer\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"MSISDN\",\n \"partyIdentifier\": \"27713803905\",\n \"fspId\": \"{{payerfsp}}\"\n },\n \"personalInfo\": {\n \"complexName\": {\n \"firstName\": \"Mats\",\n \"lastName\": \"Hagman\"\n },\n \"dateOfBirth\": \"1983-10-25\"\n }\n },\n \"amountType\": \"SEND\",\n \"amount\": {\n \"amount\": \"15\",\n \"currency\": \"XOF\"\n },\n \"transactionType\": {\n \"scenario\": \"TRANSFER\",\n \"initiator\": \"PAYER\",\n \"initiatorType\": \"CONSUMER\"\n },\n \"note\": \"hej\"\n}" + }, + "url": { + "raw": "{{HOST_QUOTING_SERVICE}}/quotes", + "host": [ + "{{HOST_QUOTING_SERVICE}}" + ], + "path": [ + "quotes" + ] + }, + "description": "Expected should be this:\r\n{\r\n \"errorInformation\": {\r\n \"errorCode\": \"3001\",\r\n \"errorDescription\": \"The Client requested an unsupported version, see extension list for supported version(s).\",\r\n \"extensionList\": [\r\n { \"key\": \"1\", \"value\": \"0\" },\r\n { \"key\": \"2\", \"value\": \"1\" },\r\n { \"key\": \"4\", \"value\": \"2\" }\r\n ]\r\n }\r\n}" + }, + "response": [] }, - "url": { - "raw": "{{HOST_QUOTING_SERVICE}}/quotes", - "host": [ - "{{HOST_QUOTING_SERVICE}}" - ], - "path": [ - "quotes" - ] - } - }, - "response": [] - }, - { - "name": "RC 400 - Error 3102 Missing mandatory element - QuoteId", - "event": [ { - "listen": "prerequest", - "script": { - "id": "887e4721-3923-41bd-bf8a-3d0cd5eed8ee", - "exec": [ - "if (pm.environment.get('CONFIG_GENERATE_NEW_TRANSFER_UUID_ON_PREPARE') === 'true') {", - " var uuid = require('uuid');", - " var generatedUUID = uuid.v4();", - " pm.environment.set('quoteId2', generatedUUID);", - "}", - "", - "if (pm.environment.get('CONFIG_GENERATE_NEW_PREPARE_DATE') === 'true') {", - " pm.environment.set('quoteDate', (new Date()).toUTCString());", - "}" + "name": "RC 400 - EC 3101 Malformed QuoteId", + "event": [ + { + "listen": "prerequest", + "script": { + "id": "887e4721-3923-41bd-bf8a-3d0cd5eed8ee", + "exec": [ + "", + " var uuid = require('uuid');", + " var generatedUUID = uuid.v4();", + " pm.environment.set('quoteId2', generatedUUID);", + "", + "", + "", + " pm.environment.set('quoteDate', (new Date()).toUTCString());", + "" + ], + "type": "text/javascript" + } + }, + { + "listen": "test", + "script": { + "id": "095c973b-3b61-453c-992c-21a78b1066dc", + "exec": [ + "pm.test(\"Status code is 400\", function () {", + " pm.response.to.have.status(400);", + "});", + "", + "", + "var jsonData = pm.response.json();", + " ", + "pm.test(\"Check Malformed syntax - Quote ID\", function () {", + " pm.expect(jsonData.errorInformation.errorDescription).to.include('Malformed syntax');", + "}); ", + " ", + "pm.test(\"Check Error code 3101\", function () {", + " pm.expect(jsonData.errorInformation.errorCode).to.eql('3101');", + "});", + "", + "", + "", + "", + "", + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Accept", + "value": "application/vnd.interoperability.quotes+json;version=1" + }, + { + "key": "Content-Type", + "name": "Content-Type", + "type": "text", + "value": "application/vnd.interoperability.quotes+json;version=1.0" + }, + { + "key": "Date", + "value": "{{quoteDate}}" + }, + { + "key": "FSPIOP-Source", + "value": "{{payerfsp}}" + }, + { + "key": "FSPIOP-Destination", + "value": "{{payeefsp}}" + } ], - "type": "text/javascript" - } + "body": { + "mode": "raw", + "raw": "{\n \"quoteId\": \"@123#59\",\n \"transactionId\": \"{{quoteId2}}\",\n \"payee\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"MSISDN\",\n \"partyIdentifier\": \"{{receiverMSISDN}}\",\n \"fspId\": \"{{payeefsp}}\"\n }\n },\n \"payer\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"MSISDN\",\n \"partyIdentifier\": \"27713803905\",\n \"fspId\": \"{{payerfsp}}\"\n },\n \"personalInfo\": {\n \"complexName\": {\n \"firstName\": \"Mats\",\n \"lastName\": \"Hagman\"\n },\n \"dateOfBirth\": \"1983-10-25\"\n }\n },\n \"amountType\": \"SEND\",\n \"amount\": {\n \"amount\": \"17\",\n \"currency\": \"XOF\"\n },\n \"transactionType\": {\n \"scenario\": \"TRANSFER\",\n \"initiator\": \"PAYER\",\n \"initiatorType\": \"CONSUMER\"\n },\n \"note\": \"hej\"\n}" + }, + "url": { + "raw": "{{HOST_QUOTING_SERVICE}}/quotes", + "host": [ + "{{HOST_QUOTING_SERVICE}}" + ], + "path": [ + "quotes" + ] + }, + "description": "This is the log at simulators: I see 2 error msgs in which one is appropriate \" invalid guid format quoteID\" but the other is abt transfer expirty date.. which I do not understand.\n\n[d1741-simulator-85448cd97d-jbc74] 2019-08-29T21:28:51.026Z - info: L1p-Trace-Id=undefined - Method: post Path: /payeefsp/quotes Query: {} \n[d1741-simulator-85448cd97d-jbc74] 2019-08-29T21:28:51.026Z - info: L1p-Trace-Id=undefined - Headers: {\"host\":\"dev1-simulator.mojaloop.live\",\"connection\":\"close\",\"x-request-id\":\"b3c628cbc0b801c12e0901d6a4db76b4\",\"x-real-ip\":\"10.1.2.185\",\"x-forwarded-for\":\"10.1.2.185\",\"x-forwarded-host\":\"dev1-simulator.mojaloop.live\",\"x-forwarded-port\":\"80\",\"x-forwarded-proto\":\"http\",\"x-original-uri\":\"/payeefsp/quotes\",\"x-scheme\":\"http\",\"content-length\":\"546\",\"content-type\":\"application/vnd.interoperability.quotes+json;version=1.0\",\"date\":\"Thu, 29 Aug 2019 21:28:51 GMT\",\"fspiop-source\":\"payerfsp\",\"fspiop-destination\":\"payeefsp\",\"accept\":\"application/vnd.interoperability.quotes+json;version=1\",\"user-agent\":\"node-fetch/1.0 (+https://github.com/bitinn/node-fetch)\",\"accept-encoding\":\"gzip,deflate\"} \n[d1741-simulator-85448cd97d-jbc74] 2019-08-29T21:28:51.029Z - info: L1p-Trace-Id=undefined - Response: ValidationError: child \"@ Quote Id must be in a valid GUID format. @\" fails because [\"@ Quote Id must be in a valid GUID format. @\" must be a valid GUID] \n[d1741-simulator-85448cd97d-jbc74] 2019-08-29T21:28:51.044Z - info: L1p-Trace-Id=undefined - Method: put Path: /payerfsp/quotes/@123 Query: {} \n[d1741-simulator-85448cd97d-jbc74] 2019-08-29T21:28:51.045Z - info: L1p-Trace-Id=undefined - Headers: {\"host\":\"dev1-simulator.mojaloop.live\",\"connection\":\"close\",\"x-request-id\":\"368abe999b812644e001df12752be5f8\",\"x-real-ip\":\"10.1.2.185\",\"x-forwarded-for\":\"10.1.2.185\",\"x-forwarded-host\":\"dev1-simulator.mojaloop.live\",\"x-forwarded-port\":\"80\",\"x-forwarded-proto\":\"http\",\"x-original-uri\":\"/payerfsp/quotes/@123\",\"x-scheme\":\"http\",\"content-length\":\"1727\",\"content-type\":\"application/vnd.interoperability.quotes+json;version=1.0\",\"date\":\"Thu, 29 Aug 2019 21:28:51 GMT\",\"fspiop-source\":\"switch\",\"fspiop-destination\":\"payerfsp\",\"fspiop-http-method\":\"PUT\",\"user-agent\":\"axios/0.19.0\"} \n[d1741-simulator-85448cd97d-jbc74] 2019-08-29T21:28:51.048Z - info: L1p-Trace-Id=undefined - Response: ValidationError: child \"@ A valid transfer expiry date must be supplied. @\" fails because [\"@ A valid transfer expiry date must be supplied. @\" is required]" + }, + "response": [] }, { - "listen": "test", - "script": { - "id": "095c973b-3b61-453c-992c-21a78b1066dc", - "exec": [ - "pm.test(\"Status code is 400\", function () {", - " pm.response.to.have.status(400);", - "});", - "", - "var jsonData = pm.response.json();", - " ", - "pm.test(\"Check Missing mandatory element - QuoteID\", function () {", - " pm.expect(jsonData.errorInformation.errorDescription).to.include('Missing mandatory element');", - "}); ", - " ", - "pm.test(\"Check Error code 3102\", function () {", - " pm.expect(jsonData.errorInformation.errorCode).to.eql('3102');", - "});", - "", - "", - "", - "", - "" + "name": "RC 400 - EC 3101 Malformed TransactionId", + "event": [ + { + "listen": "prerequest", + "script": { + "id": "887e4721-3923-41bd-bf8a-3d0cd5eed8ee", + "exec": [ + "if (pm.environment.get('CONFIG_GENERATE_NEW_TRANSFER_UUID_ON_PREPARE') === 'true') {", + " var uuid = require('uuid');", + " var generatedUUID = uuid.v4();", + " pm.environment.set('quoteId2', generatedUUID);", + "}", + "", + "if (pm.environment.get('CONFIG_GENERATE_NEW_PREPARE_DATE') === 'true') {", + " pm.environment.set('quoteDate', (new Date()).toUTCString());", + "}" + ], + "type": "text/javascript" + } + }, + { + "listen": "test", + "script": { + "id": "095c973b-3b61-453c-992c-21a78b1066dc", + "exec": [ + "pm.test(\"Status code is 400\", function () {", + " pm.response.to.have.status(400);", + "});", + "", + "", + "var jsonData = pm.response.json();", + " ", + "pm.test(\"Check Malformed syntax - Transaction ID\", function () {", + " pm.expect(jsonData.errorInformation.errorDescription).to.include('Malformed syntax');", + "}); ", + " ", + "pm.test(\"Check Error code 3101\", function () {", + " pm.expect(jsonData.errorInformation.errorCode).to.eql('3101');", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Accept", + "value": "application/vnd.interoperability.quotes+json;version=1" + }, + { + "key": "Content-Type", + "name": "Content-Type", + "type": "text", + "value": "application/vnd.interoperability.quotes+json;version=1.0" + }, + { + "key": "Date", + "value": "{{quoteDate}}" + }, + { + "key": "FSPIOP-Source", + "value": "{{payerfsp}}" + }, + { + "key": "FSPIOP-Destination", + "value": "{{payeefsp}}" + } ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [ - { - "key": "Accept", - "value": "application/vnd.interoperability.quotes+json;version=1" - }, - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/vnd.interoperability.quotes+json;version=1.0" - }, - { - "key": "Date", - "value": "{{quoteDate}}" - }, - { - "key": "FSPIOP-Source", - "value": "{{payerfsp}}" + "body": { + "mode": "raw", + "raw": "{\n \"quoteId\": \"{{quoteId2}}\",\n \"transactionId\": \"@123\",\n \"payee\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"MSISDN\",\n \"partyIdentifier\": \"{{receiverMSISDN}}\",\n \"fspId\": \"{{payeefsp}}\"\n }\n },\n \"payer\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"MSISDN\",\n \"partyIdentifier\": \"27713803905\",\n \"fspId\": \"{{payerfsp}}\"\n },\n \"personalInfo\": {\n \"complexName\": {\n \"firstName\": \"Mats\",\n \"lastName\": \"Hagman\"\n },\n \"dateOfBirth\": \"1983-10-25\"\n }\n },\n \"amountType\": \"SEND\",\n \"amount\": {\n \"amount\": \"17\",\n \"currency\": \"XOF\"\n },\n \"transactionType\": {\n \"scenario\": \"TRANSFER\",\n \"initiator\": \"PAYER\",\n \"initiatorType\": \"CONSUMER\"\n },\n \"note\": \"hej\"\n}" + }, + "url": { + "raw": "{{HOST_QUOTING_SERVICE}}/quotes", + "host": [ + "{{HOST_QUOTING_SERVICE}}" + ], + "path": [ + "quotes" + ] + } }, - { - "key": "FSPIOP-Destination", - "value": "{{payeefsp}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \n \"transactionId\": \"{{quoteId2}}\",\n \"payee\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"MSISDN\",\n \"partyIdentifier\": \"{{receiverMSISDN}}\",\n \"fspId\": \"{{payeefsp}}\"\n }\n },\n \"payer\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"MSISDN\",\n \"partyIdentifier\": \"27713803905\",\n \"fspId\": \"{{payerfsp}}\"\n },\n \"personalInfo\": {\n \"complexName\": {\n \"firstName\": \"Mats\",\n \"lastName\": \"Hagman\"\n },\n \"dateOfBirth\": \"1983-10-25\"\n }\n },\n \"amountType\": \"SEND\",\n \"amount\": {\n \"amount\": \"17\",\n \"currency\": \"XOF\"\n },\n \"transactionType\": {\n \"scenario\": \"TRANSFER\",\n \"initiator\": \"PAYER\",\n \"initiatorType\": \"CONSUMER\"\n },\n \"note\": \"hej\"\n}" + "response": [] }, - "url": { - "raw": "{{HOST_QUOTING_SERVICE}}/quotes", - "host": [ - "{{HOST_QUOTING_SERVICE}}" - ], - "path": [ - "quotes" - ] - } - }, - "response": [] - }, - { - "name": "RC 400 - Error 3102 Missing mandatory element - TransactionId", - "event": [ { - "listen": "prerequest", - "script": { - "id": "887e4721-3923-41bd-bf8a-3d0cd5eed8ee", - "exec": [ - "if (pm.environment.get('CONFIG_GENERATE_NEW_TRANSFER_UUID_ON_PREPARE') === 'true') {", - " var uuid = require('uuid');", - " var generatedUUID = uuid.v4();", - " pm.environment.set('quoteId2', generatedUUID);", - "}", - "", - "if (pm.environment.get('CONFIG_GENERATE_NEW_PREPARE_DATE') === 'true') {", - " pm.environment.set('quoteDate', (new Date()).toUTCString());", - "}" + "name": "RC 400 - Error 3101 Malformed Syntax - invalid payeePartyIdType", + "event": [ + { + "listen": "prerequest", + "script": { + "id": "887e4721-3923-41bd-bf8a-3d0cd5eed8ee", + "exec": [ + "if (pm.environment.get('CONFIG_GENERATE_NEW_TRANSFER_UUID_ON_PREPARE') === 'true') {", + " var uuid = require('uuid');", + " var generatedUUID = uuid.v4();", + " pm.environment.set('quoteId2', generatedUUID);", + "}", + "", + "if (pm.environment.get('CONFIG_GENERATE_NEW_PREPARE_DATE') === 'true') {", + " pm.environment.set('quoteDate', (new Date()).toUTCString());", + "}" + ], + "type": "text/javascript" + } + }, + { + "listen": "test", + "script": { + "id": "095c973b-3b61-453c-992c-21a78b1066dc", + "exec": [ + "pm.test(\"Status code is 400\", function () {", + " pm.response.to.have.status(400);", + "});", + "var jsonData = pm.response.json();", + " ", + "pm.test(\"Check Malformed syntax - PayeePartyIdTypeEnum\", function () {", + " pm.expect(jsonData.errorInformation.errorDescription).to.include('PartyIdTypeEnum');", + "}); ", + " ", + "pm.test(\"Check Error code 3101\", function () {", + " pm.expect(jsonData.errorInformation.errorCode).to.eql('3101');", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Accept", + "value": "application/vnd.interoperability.quotes+json;version=1" + }, + { + "key": "Content-Type", + "name": "Content-Type", + "type": "text", + "value": "application/vnd.interoperability.quotes+json;version=1.0" + }, + { + "key": "Date", + "value": "{{quoteDate}}" + }, + { + "key": "FSPIOP-Source", + "value": "{{payerfsp}}" + }, + { + "key": "FSPIOP-Destination", + "value": "{{payeefsp}}" + } ], - "type": "text/javascript" - } + "body": { + "mode": "raw", + "raw": "{\n \"quoteId\": \"{{quoteId2}}\",\n \"transactionId\": \"{{quoteId2}}\",\n \"payee\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"CELLNM\",\n \"partyIdentifier\": \"{{receiverMSISDN}}\",\n \"fspId\": \"{{payeefsp}}\"\n }\n },\n \"payer\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"MSISDN\",\n \"partyIdentifier\": \"27713803905\",\n \"fspId\": \"{{payerfsp}}\"\n },\n \"personalInfo\": {\n \"complexName\": {\n \"firstName\": \"Mats\",\n \"lastName\": \"Hagman\"\n },\n \"dateOfBirth\": \"1983-10-25\"\n }\n },\n \"amountType\": \"SEND\",\n \"amount\": {\n \"amount\": \"17\",\n \"currency\": \"XOF\"\n },\n \"transactionType\": {\n \"scenario\": \"TRANSFER\",\n \"initiator\": \"PAYER\",\n \"initiatorType\": \"CONSUMER\"\n },\n \"note\": \"hej\"\n}" + }, + "url": { + "raw": "{{HOST_QUOTING_SERVICE}}/quotes", + "host": [ + "{{HOST_QUOTING_SERVICE}}" + ], + "path": [ + "quotes" + ] + } + }, + "response": [] }, { - "listen": "test", - "script": { - "id": "095c973b-3b61-453c-992c-21a78b1066dc", - "exec": [ - "pm.test(\"Status code is 400\", function () {", - " pm.response.to.have.status(400);", - "});", - "", - "var jsonData = pm.response.json();", - " ", - "pm.test(\"Check Missing mandatory element - TransactionID\", function () {", - " pm.expect(jsonData.errorInformation.errorDescription).to.include('Missing mandatory element');", - "}); ", - " ", - "pm.test(\"Check Error code 3102\", function () {", - " pm.expect(jsonData.errorInformation.errorCode).to.eql('3102');", - "});", - "", - "", - "", - "", - "", - "", - "" + "name": "RC 400 - Error 3101 Malformed Syntax - invalid payerPartyIdType", + "event": [ + { + "listen": "prerequest", + "script": { + "id": "887e4721-3923-41bd-bf8a-3d0cd5eed8ee", + "exec": [ + "if (pm.environment.get('CONFIG_GENERATE_NEW_TRANSFER_UUID_ON_PREPARE') === 'true') {", + " var uuid = require('uuid');", + " var generatedUUID = uuid.v4();", + " pm.environment.set('quoteId2', generatedUUID);", + "}", + "", + "if (pm.environment.get('CONFIG_GENERATE_NEW_PREPARE_DATE') === 'true') {", + " pm.environment.set('quoteDate', (new Date()).toUTCString());", + "}" + ], + "type": "text/javascript" + } + }, + { + "listen": "test", + "script": { + "id": "095c973b-3b61-453c-992c-21a78b1066dc", + "exec": [ + "pm.test(\"Status code is 400\", function () {", + " pm.response.to.have.status(400);", + "});", + "", + "var jsonData = pm.response.json();", + " ", + "pm.test(\"Check Malformed syntax - PayerPartyIdTypeEnum\", function () {", + " pm.expect(jsonData.errorInformation.errorDescription).to.include('PartyIdTypeEnum');", + "}); ", + " ", + "pm.test(\"Check Error code 3101\", function () {", + " pm.expect(jsonData.errorInformation.errorCode).to.eql('3101');", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Accept", + "value": "application/vnd.interoperability.quotes+json;version=1" + }, + { + "key": "Content-Type", + "name": "Content-Type", + "type": "text", + "value": "application/vnd.interoperability.quotes+json;version=1.0" + }, + { + "key": "Date", + "value": "{{quoteDate}}" + }, + { + "key": "FSPIOP-Source", + "value": "{{payerfsp}}" + }, + { + "key": "FSPIOP-Destination", + "value": "{{payeefsp}}" + } ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [ - { - "key": "Accept", - "value": "application/vnd.interoperability.quotes+json;version=1" - }, - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/vnd.interoperability.quotes+json;version=1.0" - }, - { - "key": "Date", - "value": "{{quoteDate}}" - }, - { - "key": "FSPIOP-Source", - "value": "{{payerfsp}}" + "body": { + "mode": "raw", + "raw": "{\n \"quoteId\": \"{{quoteId2}}\",\n \"transactionId\": \"{{quoteId2}}\",\n \"payee\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"MSISDN\",\n \"partyIdentifier\": \"{{receiverMSISDN}}\",\n \"fspId\": \"{{payeefsp}}\"\n }\n },\n \"payer\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"CELLSD\",\n \"partyIdentifier\": \"27713803905\",\n \"fspId\": \"{{payerfsp}}\"\n },\n \"personalInfo\": {\n \"complexName\": {\n \"firstName\": \"Mats\",\n \"lastName\": \"Hagman\"\n },\n \"dateOfBirth\": \"1983-10-25\"\n }\n },\n \"amountType\": \"SEND\",\n \"amount\": {\n \"amount\": \"19\",\n \"currency\": \"XOF\"\n },\n \"transactionType\": {\n \"scenario\": \"TRANSFER\",\n \"initiator\": \"PAYER\",\n \"initiatorType\": \"CONSUMER\"\n },\n \"note\": \"hej\"\n}" + }, + "url": { + "raw": "{{HOST_QUOTING_SERVICE}}/quotes", + "host": [ + "{{HOST_QUOTING_SERVICE}}" + ], + "path": [ + "quotes" + ] + } }, - { - "key": "FSPIOP-Destination", - "value": "{{payeefsp}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"quoteId\": \"{{quoteId2}}\",\n \n \"payee\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"MSISDN\",\n \"partyIdentifier\": \"{{receiverMSISDN}}\",\n \"fspId\": \"{{payeefsp}}\"\n }\n },\n \"payer\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"MSISDN\",\n \"partyIdentifier\": \"27713803905\",\n \"fspId\": \"{{payerfsp}}\"\n },\n \"personalInfo\": {\n \"complexName\": {\n \"firstName\": \"Mats\",\n \"lastName\": \"Hagman\"\n },\n \"dateOfBirth\": \"1983-10-25\"\n }\n },\n \"amountType\": \"SEND\",\n \"amount\": {\n \"amount\": \"17\",\n \"currency\": \"XOF\"\n },\n \"transactionType\": {\n \"scenario\": \"TRANSFER\",\n \"initiator\": \"PAYER\",\n \"initiatorType\": \"CONSUMER\"\n },\n \"note\": \"hej\"\n}" + "response": [] }, - "url": { - "raw": "{{HOST_QUOTING_SERVICE}}/quotes", - "host": [ - "{{HOST_QUOTING_SERVICE}}" + { + "name": "RC 400 - Error 3102 Missing mandatory element - QuoteId", + "event": [ + { + "listen": "prerequest", + "script": { + "id": "887e4721-3923-41bd-bf8a-3d0cd5eed8ee", + "exec": [ + "if (pm.environment.get('CONFIG_GENERATE_NEW_TRANSFER_UUID_ON_PREPARE') === 'true') {", + " var uuid = require('uuid');", + " var generatedUUID = uuid.v4();", + " pm.environment.set('quoteId2', generatedUUID);", + "}", + "", + "if (pm.environment.get('CONFIG_GENERATE_NEW_PREPARE_DATE') === 'true') {", + " pm.environment.set('quoteDate', (new Date()).toUTCString());", + "}" + ], + "type": "text/javascript" + } + }, + { + "listen": "test", + "script": { + "id": "095c973b-3b61-453c-992c-21a78b1066dc", + "exec": [ + "pm.test(\"Status code is 400\", function () {", + " pm.response.to.have.status(400);", + "});", + "", + "var jsonData = pm.response.json();", + " ", + "pm.test(\"Check Missing mandatory element - QuoteID\", function () {", + " pm.expect(jsonData.errorInformation.errorDescription).to.include('Missing mandatory element');", + "}); ", + " ", + "pm.test(\"Check Error code 3102\", function () {", + " pm.expect(jsonData.errorInformation.errorCode).to.eql('3102');", + "});", + "", + "", + "", + "", + "" + ], + "type": "text/javascript" + } + } ], - "path": [ - "quotes" - ] - } - }, - "response": [] - }, - { - "name": "RC 400 - Error 3102 Missing mandatory element - payeePartyIdType", - "event": [ - { - "listen": "prerequest", - "script": { - "id": "887e4721-3923-41bd-bf8a-3d0cd5eed8ee", - "exec": [ - "if (pm.environment.get('CONFIG_GENERATE_NEW_TRANSFER_UUID_ON_PREPARE') === 'true') {", - " var uuid = require('uuid');", - " var generatedUUID = uuid.v4();", - " pm.environment.set('quoteId2', generatedUUID);", - "}", - "", - "if (pm.environment.get('CONFIG_GENERATE_NEW_PREPARE_DATE') === 'true') {", - " pm.environment.set('quoteDate', (new Date()).toUTCString());", - "}" + "request": { + "method": "POST", + "header": [ + { + "key": "Accept", + "value": "application/vnd.interoperability.quotes+json;version=1" + }, + { + "key": "Content-Type", + "name": "Content-Type", + "type": "text", + "value": "application/vnd.interoperability.quotes+json;version=1.0" + }, + { + "key": "Date", + "value": "{{quoteDate}}" + }, + { + "key": "FSPIOP-Source", + "value": "{{payerfsp}}" + }, + { + "key": "FSPIOP-Destination", + "value": "{{payeefsp}}" + } ], - "type": "text/javascript" - } + "body": { + "mode": "raw", + "raw": "{\n \n \"transactionId\": \"{{quoteId2}}\",\n \"payee\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"MSISDN\",\n \"partyIdentifier\": \"{{receiverMSISDN}}\",\n \"fspId\": \"{{payeefsp}}\"\n }\n },\n \"payer\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"MSISDN\",\n \"partyIdentifier\": \"27713803905\",\n \"fspId\": \"{{payerfsp}}\"\n },\n \"personalInfo\": {\n \"complexName\": {\n \"firstName\": \"Mats\",\n \"lastName\": \"Hagman\"\n },\n \"dateOfBirth\": \"1983-10-25\"\n }\n },\n \"amountType\": \"SEND\",\n \"amount\": {\n \"amount\": \"17\",\n \"currency\": \"XOF\"\n },\n \"transactionType\": {\n \"scenario\": \"TRANSFER\",\n \"initiator\": \"PAYER\",\n \"initiatorType\": \"CONSUMER\"\n },\n \"note\": \"hej\"\n}" + }, + "url": { + "raw": "{{HOST_QUOTING_SERVICE}}/quotes", + "host": [ + "{{HOST_QUOTING_SERVICE}}" + ], + "path": [ + "quotes" + ] + } + }, + "response": [] }, { - "listen": "test", - "script": { - "id": "095c973b-3b61-453c-992c-21a78b1066dc", - "exec": [ - "pm.test(\"Status code is 400\", function () {", - " pm.response.to.have.status(400);", - "});", - "", - "var jsonData = pm.response.json();", - " ", - "pm.test(\"Check Missing mandatory element - PartyIdTypeEnum\", function () {", - " pm.expect(jsonData.errorInformation.errorDescription).to.include('Missing mandatory element');", - "}); ", - " ", - "pm.test(\"Check Error code 3102\", function () {", - " pm.expect(jsonData.errorInformation.errorCode).to.eql('3102');", - "});", - "", - "", - "", - "", - "", - "" + "name": "RC 400 - Error 3102 Missing mandatory element - TransactionId", + "event": [ + { + "listen": "prerequest", + "script": { + "id": "887e4721-3923-41bd-bf8a-3d0cd5eed8ee", + "exec": [ + "if (pm.environment.get('CONFIG_GENERATE_NEW_TRANSFER_UUID_ON_PREPARE') === 'true') {", + " var uuid = require('uuid');", + " var generatedUUID = uuid.v4();", + " pm.environment.set('quoteId2', generatedUUID);", + "}", + "", + "if (pm.environment.get('CONFIG_GENERATE_NEW_PREPARE_DATE') === 'true') {", + " pm.environment.set('quoteDate', (new Date()).toUTCString());", + "}" + ], + "type": "text/javascript" + } + }, + { + "listen": "test", + "script": { + "id": "095c973b-3b61-453c-992c-21a78b1066dc", + "exec": [ + "pm.test(\"Status code is 400\", function () {", + " pm.response.to.have.status(400);", + "});", + "", + "var jsonData = pm.response.json();", + " ", + "pm.test(\"Check Missing mandatory element - TransactionID\", function () {", + " pm.expect(jsonData.errorInformation.errorDescription).to.include('Missing mandatory element');", + "}); ", + " ", + "pm.test(\"Check Error code 3102\", function () {", + " pm.expect(jsonData.errorInformation.errorCode).to.eql('3102');", + "});", + "", + "", + "", + "", + "", + "", + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Accept", + "value": "application/vnd.interoperability.quotes+json;version=1" + }, + { + "key": "Content-Type", + "name": "Content-Type", + "type": "text", + "value": "application/vnd.interoperability.quotes+json;version=1.0" + }, + { + "key": "Date", + "value": "{{quoteDate}}" + }, + { + "key": "FSPIOP-Source", + "value": "{{payerfsp}}" + }, + { + "key": "FSPIOP-Destination", + "value": "{{payeefsp}}" + } ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [ - { - "key": "Accept", - "value": "application/vnd.interoperability.quotes+json;version=1" - }, - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/vnd.interoperability.quotes+json;version=1.0" - }, - { - "key": "Date", - "value": "{{quoteDate}}" - }, - { - "key": "FSPIOP-Source", - "value": "{{payerfsp}}" + "body": { + "mode": "raw", + "raw": "{\n \"quoteId\": \"{{quoteId2}}\",\n \n \"payee\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"MSISDN\",\n \"partyIdentifier\": \"{{receiverMSISDN}}\",\n \"fspId\": \"{{payeefsp}}\"\n }\n },\n \"payer\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"MSISDN\",\n \"partyIdentifier\": \"27713803905\",\n \"fspId\": \"{{payerfsp}}\"\n },\n \"personalInfo\": {\n \"complexName\": {\n \"firstName\": \"Mats\",\n \"lastName\": \"Hagman\"\n },\n \"dateOfBirth\": \"1983-10-25\"\n }\n },\n \"amountType\": \"SEND\",\n \"amount\": {\n \"amount\": \"17\",\n \"currency\": \"XOF\"\n },\n \"transactionType\": {\n \"scenario\": \"TRANSFER\",\n \"initiator\": \"PAYER\",\n \"initiatorType\": \"CONSUMER\"\n },\n \"note\": \"hej\"\n}" + }, + "url": { + "raw": "{{HOST_QUOTING_SERVICE}}/quotes", + "host": [ + "{{HOST_QUOTING_SERVICE}}" + ], + "path": [ + "quotes" + ] + } }, - { - "key": "FSPIOP-Destination", - "value": "{{payeefsp}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"quoteId\": \"{{quoteId2}}\",\n \"transactionId\": \"{{quoteId2}}\",\n \"payee\": {\n \"partyIdInfo\": {\n \n \"partyIdentifier\": \"{{receiverMSISDN}}\",\n \"fspId\": \"{{payeefsp}}\"\n }\n },\n \"payer\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"MSISDN\",\n \"partyIdentifier\": \"27713803905\",\n \"fspId\": \"{{payerfsp}}\"\n },\n \"personalInfo\": {\n \"complexName\": {\n \"firstName\": \"Mats\",\n \"lastName\": \"Hagman\"\n },\n \"dateOfBirth\": \"1983-10-25\"\n }\n },\n \"amountType\": \"SEND\",\n \"amount\": {\n \"amount\": \"17\",\n \"currency\": \"XOF\"\n },\n \"transactionType\": {\n \"scenario\": \"TRANSFER\",\n \"initiator\": \"PAYER\",\n \"initiatorType\": \"CONSUMER\"\n },\n \"note\": \"hej\"\n}" + "response": [] }, - "url": { - "raw": "{{HOST_QUOTING_SERVICE}}/quotes", - "host": [ - "{{HOST_QUOTING_SERVICE}}" - ], - "path": [ - "quotes" - ] - } - }, - "response": [] - }, - { - "name": "RC 400 - Error 3102 Missing mandatory element - payeePartyIdentifier", - "event": [ { - "listen": "prerequest", - "script": { - "id": "887e4721-3923-41bd-bf8a-3d0cd5eed8ee", - "exec": [ - "if (pm.environment.get('CONFIG_GENERATE_NEW_TRANSFER_UUID_ON_PREPARE') === 'true') {", - " var uuid = require('uuid');", - " var generatedUUID = uuid.v4();", - " pm.environment.set('quoteId2', generatedUUID);", - "}", - "", - "if (pm.environment.get('CONFIG_GENERATE_NEW_PREPARE_DATE') === 'true') {", - " pm.environment.set('quoteDate', (new Date()).toUTCString());", - "}" + "name": "RC 400 - Error 3102 Missing mandatory element - payeePartyIdType", + "event": [ + { + "listen": "prerequest", + "script": { + "id": "887e4721-3923-41bd-bf8a-3d0cd5eed8ee", + "exec": [ + "if (pm.environment.get('CONFIG_GENERATE_NEW_TRANSFER_UUID_ON_PREPARE') === 'true') {", + " var uuid = require('uuid');", + " var generatedUUID = uuid.v4();", + " pm.environment.set('quoteId2', generatedUUID);", + "}", + "", + "if (pm.environment.get('CONFIG_GENERATE_NEW_PREPARE_DATE') === 'true') {", + " pm.environment.set('quoteDate', (new Date()).toUTCString());", + "}" + ], + "type": "text/javascript" + } + }, + { + "listen": "test", + "script": { + "id": "095c973b-3b61-453c-992c-21a78b1066dc", + "exec": [ + "pm.test(\"Status code is 400\", function () {", + " pm.response.to.have.status(400);", + "});", + "", + "var jsonData = pm.response.json();", + " ", + "pm.test(\"Check Missing mandatory element - PartyIdTypeEnum\", function () {", + " pm.expect(jsonData.errorInformation.errorDescription).to.include('Missing mandatory element');", + "}); ", + " ", + "pm.test(\"Check Error code 3102\", function () {", + " pm.expect(jsonData.errorInformation.errorCode).to.eql('3102');", + "});", + "", + "", + "", + "", + "", + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Accept", + "value": "application/vnd.interoperability.quotes+json;version=1" + }, + { + "key": "Content-Type", + "name": "Content-Type", + "type": "text", + "value": "application/vnd.interoperability.quotes+json;version=1.0" + }, + { + "key": "Date", + "value": "{{quoteDate}}" + }, + { + "key": "FSPIOP-Source", + "value": "{{payerfsp}}" + }, + { + "key": "FSPIOP-Destination", + "value": "{{payeefsp}}" + } ], - "type": "text/javascript" - } + "body": { + "mode": "raw", + "raw": "{\n \"quoteId\": \"{{quoteId2}}\",\n \"transactionId\": \"{{quoteId2}}\",\n \"payee\": {\n \"partyIdInfo\": {\n \n \"partyIdentifier\": \"{{receiverMSISDN}}\",\n \"fspId\": \"{{payeefsp}}\"\n }\n },\n \"payer\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"MSISDN\",\n \"partyIdentifier\": \"27713803905\",\n \"fspId\": \"{{payerfsp}}\"\n },\n \"personalInfo\": {\n \"complexName\": {\n \"firstName\": \"Mats\",\n \"lastName\": \"Hagman\"\n },\n \"dateOfBirth\": \"1983-10-25\"\n }\n },\n \"amountType\": \"SEND\",\n \"amount\": {\n \"amount\": \"17\",\n \"currency\": \"XOF\"\n },\n \"transactionType\": {\n \"scenario\": \"TRANSFER\",\n \"initiator\": \"PAYER\",\n \"initiatorType\": \"CONSUMER\"\n },\n \"note\": \"hej\"\n}" + }, + "url": { + "raw": "{{HOST_QUOTING_SERVICE}}/quotes", + "host": [ + "{{HOST_QUOTING_SERVICE}}" + ], + "path": [ + "quotes" + ] + } + }, + "response": [] }, { - "listen": "test", - "script": { - "id": "095c973b-3b61-453c-992c-21a78b1066dc", - "exec": [ - "pm.test(\"Status code is 400\", function () {", - " pm.response.to.have.status(400);", - "});", - "", - "var jsonData = pm.response.json();", - " ", - "pm.test(\"Check Missing mandatory element - PartyIdTypeEnum\", function () {", - " pm.expect(jsonData.errorInformation.errorDescription).to.include('Missing mandatory element');", - "}); ", - " ", - "pm.test(\"Check Error code 3102\", function () {", - " pm.expect(jsonData.errorInformation.errorCode).to.eql('3102');", - "});", - "", - "", - "", - "", - "", - "" + "name": "RC 400 - Error 3102 Missing mandatory element - payeePartyIdentifier", + "event": [ + { + "listen": "prerequest", + "script": { + "id": "887e4721-3923-41bd-bf8a-3d0cd5eed8ee", + "exec": [ + "if (pm.environment.get('CONFIG_GENERATE_NEW_TRANSFER_UUID_ON_PREPARE') === 'true') {", + " var uuid = require('uuid');", + " var generatedUUID = uuid.v4();", + " pm.environment.set('quoteId2', generatedUUID);", + "}", + "", + "if (pm.environment.get('CONFIG_GENERATE_NEW_PREPARE_DATE') === 'true') {", + " pm.environment.set('quoteDate', (new Date()).toUTCString());", + "}" + ], + "type": "text/javascript" + } + }, + { + "listen": "test", + "script": { + "id": "095c973b-3b61-453c-992c-21a78b1066dc", + "exec": [ + "pm.test(\"Status code is 400\", function () {", + " pm.response.to.have.status(400);", + "});", + "", + "var jsonData = pm.response.json();", + " ", + "pm.test(\"Check Missing mandatory element - PartyIdTypeEnum\", function () {", + " pm.expect(jsonData.errorInformation.errorDescription).to.include('Missing mandatory element');", + "}); ", + " ", + "pm.test(\"Check Error code 3102\", function () {", + " pm.expect(jsonData.errorInformation.errorCode).to.eql('3102');", + "});", + "", + "", + "", + "", + "", + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Accept", + "value": "application/vnd.interoperability.quotes+json;version=1" + }, + { + "key": "Content-Type", + "name": "Content-Type", + "type": "text", + "value": "application/vnd.interoperability.quotes+json;version=1.0" + }, + { + "key": "Date", + "value": "{{quoteDate}}" + }, + { + "key": "FSPIOP-Source", + "value": "{{payerfsp}}" + }, + { + "key": "FSPIOP-Destination", + "value": "{{payeefsp}}" + } ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [ - { - "key": "Accept", - "value": "application/vnd.interoperability.quotes+json;version=1" - }, - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/vnd.interoperability.quotes+json;version=1.0" - }, - { - "key": "Date", - "value": "{{quoteDate}}" - }, - { - "key": "FSPIOP-Source", - "value": "{{payerfsp}}" + "body": { + "mode": "raw", + "raw": "{\n \"quoteId\": \"{{quoteId2}}\",\n \"transactionId\": \"{{quoteId2}}\",\n \"payee\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"MSISDN\",\n \n \"fspId\": \"{{payeefsp}}\"\n }\n },\n \"payer\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"MSISDN\",\n \"partyIdentifier\": \"27713803905\",\n \"fspId\": \"{{payerfsp}}\"\n },\n \"personalInfo\": {\n \"complexName\": {\n \"firstName\": \"Mats\",\n \"lastName\": \"Hagman\"\n },\n \"dateOfBirth\": \"1983-10-25\"\n }\n },\n \"amountType\": \"SEND\",\n \"amount\": {\n \"amount\": \"18\",\n \"currency\": \"XOF\"\n },\n \"transactionType\": {\n \"scenario\": \"TRANSFER\",\n \"initiator\": \"PAYER\",\n \"initiatorType\": \"CONSUMER\"\n },\n \"note\": \"hej\"\n}" + }, + "url": { + "raw": "{{HOST_QUOTING_SERVICE}}/quotes", + "host": [ + "{{HOST_QUOTING_SERVICE}}" + ], + "path": [ + "quotes" + ] + } }, - { - "key": "FSPIOP-Destination", - "value": "{{payeefsp}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"quoteId\": \"{{quoteId2}}\",\n \"transactionId\": \"{{quoteId2}}\",\n \"payee\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"MSISDN\",\n \n \"fspId\": \"{{payeefsp}}\"\n }\n },\n \"payer\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"MSISDN\",\n \"partyIdentifier\": \"27713803905\",\n \"fspId\": \"{{payerfsp}}\"\n },\n \"personalInfo\": {\n \"complexName\": {\n \"firstName\": \"Mats\",\n \"lastName\": \"Hagman\"\n },\n \"dateOfBirth\": \"1983-10-25\"\n }\n },\n \"amountType\": \"SEND\",\n \"amount\": {\n \"amount\": \"18\",\n \"currency\": \"XOF\"\n },\n \"transactionType\": {\n \"scenario\": \"TRANSFER\",\n \"initiator\": \"PAYER\",\n \"initiatorType\": \"CONSUMER\"\n },\n \"note\": \"hej\"\n}" + "response": [] }, - "url": { - "raw": "{{HOST_QUOTING_SERVICE}}/quotes", - "host": [ - "{{HOST_QUOTING_SERVICE}}" - ], - "path": [ - "quotes" - ] - } - }, - "response": [] - }, - { - "name": "RC 400 - Error 3102 Missing mandatory element - payerPartyIdType", - "event": [ { - "listen": "prerequest", - "script": { - "id": "887e4721-3923-41bd-bf8a-3d0cd5eed8ee", - "exec": [ - "if (pm.environment.get('CONFIG_GENERATE_NEW_TRANSFER_UUID_ON_PREPARE') === 'true') {", - " var uuid = require('uuid');", - " var generatedUUID = uuid.v4();", - " pm.environment.set('quoteId2', generatedUUID);", - "}", - "", - "if (pm.environment.get('CONFIG_GENERATE_NEW_PREPARE_DATE') === 'true') {", - " pm.environment.set('quoteDate', (new Date()).toUTCString());", - "}" + "name": "RC 400 - Error 3102 Missing mandatory element - payerPartyIdType", + "event": [ + { + "listen": "prerequest", + "script": { + "id": "887e4721-3923-41bd-bf8a-3d0cd5eed8ee", + "exec": [ + "if (pm.environment.get('CONFIG_GENERATE_NEW_TRANSFER_UUID_ON_PREPARE') === 'true') {", + " var uuid = require('uuid');", + " var generatedUUID = uuid.v4();", + " pm.environment.set('quoteId2', generatedUUID);", + "}", + "", + "if (pm.environment.get('CONFIG_GENERATE_NEW_PREPARE_DATE') === 'true') {", + " pm.environment.set('quoteDate', (new Date()).toUTCString());", + "}" + ], + "type": "text/javascript" + } + }, + { + "listen": "test", + "script": { + "id": "095c973b-3b61-453c-992c-21a78b1066dc", + "exec": [ + "pm.test(\"Status code is 400\", function () {", + " pm.response.to.have.status(400);", + "});", + "", + "var jsonData = pm.response.json();", + " ", + "pm.test(\"Check Missing mandatory element - PartyIdTypeEnum\", function () {", + " pm.expect(jsonData.errorInformation.errorDescription).to.include('Missing mandatory element');", + "}); ", + " ", + "pm.test(\"Check Error code 3102\", function () {", + " pm.expect(jsonData.errorInformation.errorCode).to.eql('3102');", + "});", + "", + "", + "", + "", + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Accept", + "value": "application/vnd.interoperability.quotes+json;version=1" + }, + { + "key": "Content-Type", + "name": "Content-Type", + "type": "text", + "value": "application/vnd.interoperability.quotes+json;version=1.0" + }, + { + "key": "Date", + "value": "{{quoteDate}}" + }, + { + "key": "FSPIOP-Source", + "value": "{{payerfsp}}" + }, + { + "key": "FSPIOP-Destination", + "value": "{{payeefsp}}" + } ], - "type": "text/javascript" - } + "body": { + "mode": "raw", + "raw": "{\n \"quoteId\": \"{{quoteId2}}\",\n \"transactionId\": \"{{quoteId2}}\",\n \"payee\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"MSISDN\",\n \"partyIdentifier\": \"{{receiverMSISDN}}\",\n \"fspId\": \"{{payeefsp}}\"\n }\n },\n \"payer\": {\n \"partyIdInfo\": {\n \n \"partyIdentifier\": \"27713803905\",\n \"fspId\": \"{{payerfsp}}\"\n },\n \"personalInfo\": {\n \"complexName\": {\n \"firstName\": \"Mats\",\n \"lastName\": \"Hagman\"\n },\n \"dateOfBirth\": \"1983-10-25\"\n }\n },\n \"amountType\": \"SEND\",\n \"amount\": {\n \"amount\": \"19\",\n \"currency\": \"XOF\"\n },\n \"transactionType\": {\n \"scenario\": \"TRANSFER\",\n \"initiator\": \"PAYER\",\n \"initiatorType\": \"CONSUMER\"\n },\n \"note\": \"hej\"\n}" + }, + "url": { + "raw": "{{HOST_QUOTING_SERVICE}}/quotes", + "host": [ + "{{HOST_QUOTING_SERVICE}}" + ], + "path": [ + "quotes" + ] + } + }, + "response": [] }, { - "listen": "test", - "script": { - "id": "095c973b-3b61-453c-992c-21a78b1066dc", - "exec": [ - "pm.test(\"Status code is 400\", function () {", - " pm.response.to.have.status(400);", - "});", - "", - "var jsonData = pm.response.json();", - " ", - "pm.test(\"Check Missing mandatory element - PartyIdTypeEnum\", function () {", - " pm.expect(jsonData.errorInformation.errorDescription).to.include('Missing mandatory element');", - "}); ", - " ", - "pm.test(\"Check Error code 3102\", function () {", - " pm.expect(jsonData.errorInformation.errorCode).to.eql('3102');", - "});", - "", - "", - "", - "", - "" + "name": "RC 400 - Error 3102 Missing mandatory element - payerPartyIdentifier", + "event": [ + { + "listen": "prerequest", + "script": { + "id": "887e4721-3923-41bd-bf8a-3d0cd5eed8ee", + "exec": [ + "if (pm.environment.get('CONFIG_GENERATE_NEW_TRANSFER_UUID_ON_PREPARE') === 'true') {", + " var uuid = require('uuid');", + " var generatedUUID = uuid.v4();", + " pm.environment.set('quoteId2', generatedUUID);", + "}", + "", + "if (pm.environment.get('CONFIG_GENERATE_NEW_PREPARE_DATE') === 'true') {", + " pm.environment.set('quoteDate', (new Date()).toUTCString());", + "}" + ], + "type": "text/javascript" + } + }, + { + "listen": "test", + "script": { + "id": "095c973b-3b61-453c-992c-21a78b1066dc", + "exec": [ + "pm.test(\"Status code is 400\", function () {", + " pm.response.to.have.status(400);", + "});", + "", + "var jsonData = pm.response.json();", + " ", + "pm.test(\"Check Missing mandatory element - PartyIdTypeEnum\", function () {", + " pm.expect(jsonData.errorInformation.errorDescription).to.include('Missing mandatory element');", + "}); ", + " ", + "pm.test(\"Check Error code 3102\", function () {", + " pm.expect(jsonData.errorInformation.errorCode).to.eql('3102');", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Accept", + "value": "application/vnd.interoperability.quotes+json;version=1" + }, + { + "key": "Content-Type", + "name": "Content-Type", + "type": "text", + "value": "application/vnd.interoperability.quotes+json;version=1.0" + }, + { + "key": "Date", + "value": "{{quoteDate}}" + }, + { + "key": "FSPIOP-Source", + "value": "{{payerfsp}}" + }, + { + "key": "FSPIOP-Destination", + "value": "{{payeefsp}}" + } ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [ - { - "key": "Accept", - "value": "application/vnd.interoperability.quotes+json;version=1" - }, - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/vnd.interoperability.quotes+json;version=1.0" - }, - { - "key": "Date", - "value": "{{quoteDate}}" - }, - { - "key": "FSPIOP-Source", - "value": "{{payerfsp}}" + "body": { + "mode": "raw", + "raw": "{\n \"quoteId\": \"{{quoteId2}}\",\n \"transactionId\": \"{{quoteId2}}\",\n \"payee\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"MSISDN\",\n \"partyIdentifier\": \"{{receiverMSISDN}}\",\n \"fspId\": \"{{payeefsp}}\"\n }\n },\n \"payer\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"MSISDN\",\n \n \"fspId\": \"{{payerfsp}}\"\n },\n \"personalInfo\": {\n \"complexName\": {\n \"firstName\": \"Mats\",\n \"lastName\": \"Hagman\"\n },\n \"dateOfBirth\": \"1983-10-25\"\n }\n },\n \"amountType\": \"SEND\",\n \"amount\": {\n \"amount\": \"19\",\n \"currency\": \"XOF\"\n },\n \"transactionType\": {\n \"scenario\": \"TRANSFER\",\n \"initiator\": \"PAYER\",\n \"initiatorType\": \"CONSUMER\"\n },\n \"note\": \"hej\"\n}" + }, + "url": { + "raw": "{{HOST_QUOTING_SERVICE}}/quotes", + "host": [ + "{{HOST_QUOTING_SERVICE}}" + ], + "path": [ + "quotes" + ] + } }, - { - "key": "FSPIOP-Destination", - "value": "{{payeefsp}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"quoteId\": \"{{quoteId2}}\",\n \"transactionId\": \"{{quoteId2}}\",\n \"payee\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"MSISDN\",\n \"partyIdentifier\": \"{{receiverMSISDN}}\",\n \"fspId\": \"{{payeefsp}}\"\n }\n },\n \"payer\": {\n \"partyIdInfo\": {\n \n \"partyIdentifier\": \"27713803905\",\n \"fspId\": \"{{payerfsp}}\"\n },\n \"personalInfo\": {\n \"complexName\": {\n \"firstName\": \"Mats\",\n \"lastName\": \"Hagman\"\n },\n \"dateOfBirth\": \"1983-10-25\"\n }\n },\n \"amountType\": \"SEND\",\n \"amount\": {\n \"amount\": \"19\",\n \"currency\": \"XOF\"\n },\n \"transactionType\": {\n \"scenario\": \"TRANSFER\",\n \"initiator\": \"PAYER\",\n \"initiatorType\": \"CONSUMER\"\n },\n \"note\": \"hej\"\n}" - }, - "url": { - "raw": "{{HOST_QUOTING_SERVICE}}/quotes", - "host": [ - "{{HOST_QUOTING_SERVICE}}" - ], - "path": [ - "quotes" - ] + "response": [] } - }, - "response": [] - }, - { - "name": "RC 400 - Error 3102 Missing mandatory element - payerPartyIdentifier", + ], "event": [ { "listen": "prerequest", "script": { - "id": "887e4721-3923-41bd-bf8a-3d0cd5eed8ee", + "id": "f2cd5233-249e-4489-8a1f-c36b080d2981", + "type": "text/javascript", "exec": [ - "if (pm.environment.get('CONFIG_GENERATE_NEW_TRANSFER_UUID_ON_PREPARE') === 'true') {", - " var uuid = require('uuid');", - " var generatedUUID = uuid.v4();", - " pm.environment.set('quoteId2', generatedUUID);", - "}", - "", - "if (pm.environment.get('CONFIG_GENERATE_NEW_PREPARE_DATE') === 'true') {", - " pm.environment.set('quoteDate', (new Date()).toUTCString());", - "}" - ], - "type": "text/javascript" + "" + ] } }, { "listen": "test", "script": { - "id": "095c973b-3b61-453c-992c-21a78b1066dc", + "id": "56472403-f183-467b-80fb-e4d978bb2689", + "type": "text/javascript", "exec": [ - "pm.test(\"Status code is 400\", function () {", - " pm.response.to.have.status(400);", - "});", - "", - "var jsonData = pm.response.json();", - " ", - "pm.test(\"Check Missing mandatory element - PartyIdTypeEnum\", function () {", - " pm.expect(jsonData.errorInformation.errorDescription).to.include('Missing mandatory element');", - "}); ", - " ", - "pm.test(\"Check Error code 3102\", function () {", - " pm.expect(jsonData.errorInformation.errorCode).to.eql('3102');", - "});" - ], - "type": "text/javascript" + "" + ] } } ], - "request": { - "method": "POST", - "header": [ - { - "key": "Accept", - "value": "application/vnd.interoperability.quotes+json;version=1" - }, - { - "key": "Content-Type", - "name": "Content-Type", - "type": "text", - "value": "application/vnd.interoperability.quotes+json;version=1.0" - }, - { - "key": "Date", - "value": "{{quoteDate}}" - }, - { - "key": "FSPIOP-Source", - "value": "{{payerfsp}}" - }, - { - "key": "FSPIOP-Destination", - "value": "{{payeefsp}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"quoteId\": \"{{quoteId2}}\",\n \"transactionId\": \"{{quoteId2}}\",\n \"payee\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"MSISDN\",\n \"partyIdentifier\": \"{{receiverMSISDN}}\",\n \"fspId\": \"{{payeefsp}}\"\n }\n },\n \"payer\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"MSISDN\",\n \n \"fspId\": \"{{payerfsp}}\"\n },\n \"personalInfo\": {\n \"complexName\": {\n \"firstName\": \"Mats\",\n \"lastName\": \"Hagman\"\n },\n \"dateOfBirth\": \"1983-10-25\"\n }\n },\n \"amountType\": \"SEND\",\n \"amount\": {\n \"amount\": \"19\",\n \"currency\": \"XOF\"\n },\n \"transactionType\": {\n \"scenario\": \"TRANSFER\",\n \"initiator\": \"PAYER\",\n \"initiatorType\": \"CONSUMER\"\n },\n \"note\": \"hej\"\n}" - }, - "url": { - "raw": "{{HOST_QUOTING_SERVICE}}/quotes", - "host": [ - "{{HOST_QUOTING_SERVICE}}" - ], - "path": [ - "quotes" - ] - } - }, - "response": [] + "protocolProfileBehavior": {}, + "_postman_isSubFolder": true }, { "name": "Check_RC 400 - Error 3106 Modified request - payeePartyIdType - Quote1", @@ -6006,7 +7080,7 @@ "response": [] }, { - "name": "RaiseBug_RC 400 - Error 3201 Destination fsp cannot be found", + "name": "RC 400 - Error 3100 Destination fsp not supported", "event": [ { "listen": "prerequest", @@ -6044,15 +7118,15 @@ " pm.environment.set(\"ilpPacket2\", response.json().ilpPacket);", " });", " ", - " // var jsonData = response.json().errorinformation();", + " var jsonData = response.json().data.errorInformation;", " ", - " // pm.test(\"Check Missing mandatory element - Destination fsp not found\", function (){", - " // pm.expect(jsonData.errorInformation.errorDescription).to.include('Unsupported participan');", - " // }); ", + " pm.test(\"Check Generic validation error - Unsupported participant\", function (){", + " pm.expect(jsonData.errorDescription).to.include('Unsupported participan');", + " }); ", " ", - " // pm.test(\"Check Error code 3100\", function () {", - " // pm.expect(jsonData.errorInformation.errorCode).to.eql('3100');", - " // });", + " pm.test(\"Check Error code 3100\", function () {", + " pm.expect(jsonData.errorCode).to.eql('3100');", + " });", " ", " } else {", " pm.test(\"Quote FAILED\", function () {", @@ -6102,7 +7176,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"quoteId\": \"{{quoteId2}}\",\n \"transactionId\": \"{{quoteId2}}\",\n \"payee\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"MSISDN\",\n \"partyIdentifier\": \"{{receiverMSISDN}}\",\n \"fspId\": \"blah\"\n }\n },\n \"payer\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"MSISDN\",\n \"partyIdentifier\": \"27713803905\",\n \"fspId\": \"{{payerfsp}}\"\n },\n \"personalInfo\": {\n \"complexName\": {\n \"firstName\": \"Mats\",\n \"lastName\": \"Hagman\"\n },\n \"dateOfBirth\": \"1983-10-25\"\n }\n },\n \"amountType\": \"SEND\",\n \"amount\": {\n \"amount\": \"15\",\n \"currency\": \"XOF\"\n },\n \"transactionType\": {\n \"scenario\": \"TRANSFER\",\n \"initiator\": \"PAYER\",\n \"initiatorType\": \"CONSUMER\"\n },\n \"note\": \"hej\"\n}" + "raw": "{\n \"quoteId\": \"{{quoteId2}}\",\n \"transactionId\": \"{{quoteId2}}\",\n \"payee\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"MSISDN\",\n \"partyIdentifier\": \"{{receiverMSISDN}}\",\n \"fspId\": \"blah\"\n }\n },\n \"payer\": {\n \"partyIdInfo\": {\n \"partyIdType\": \"MSISDN\",\n \"partyIdentifier\": \"27713803905\",\n \"fspId\": \"{{payerfsp}}\"\n },\n \"personalInfo\": {\n \"complexName\": {\n \"firstName\": \"Mats\",\n \"lastName\": \"Hagman\"\n },\n \"dateOfBirth\": \"1983-10-25\"\n }\n },\n \"amountType\": \"SEND\",\n \"amount\": {\n \"amount\": \"15\",\n \"currency\": \"USD\"\n },\n \"transactionType\": {\n \"scenario\": \"TRANSFER\",\n \"initiator\": \"PAYER\",\n \"initiatorType\": \"CONSUMER\"\n },\n \"note\": \"hej\"\n}" }, "url": { "raw": "{{HOST_QUOTING_SERVICE}}/quotes",