@mojaloop/sdk-scheme-adapter 12.3.0 → 13.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.example +3 -0
- package/CHANGELOG.md +25 -0
- package/docker/ml-testing-toolkit/spec_files/api_definitions/fspiop_1.1/trigger_templates/transaction_request_followup.json +2 -2
- package/docker/ml-testing-toolkit/spec_files/rules_callback/default.json +7 -7
- package/docker/ml-testing-toolkit/spec_files/rules_response/default.json +16 -16
- package/docker/ml-testing-toolkit/spec_files/rules_response/default_pisp_rules.json +5 -5
- package/docker/ml-testing-toolkit/spec_files/rules_validation/default.json +10 -10
- package/package.json +3 -3
- package/src/InboundServer/handlers.js +114 -52
- package/src/OutboundServer/api.yaml +105 -32
- package/src/OutboundServer/api_interfaces/openapi.d.ts +46 -16
- package/src/OutboundServer/api_template/components/schemas/accountsResponse.yaml +9 -0
- package/src/OutboundServer/api_template/components/schemas/partiesByIdResponse.yaml +10 -3
- package/src/OutboundServer/api_template/components/schemas/quotesPostResponse.yaml +42 -34
- package/src/OutboundServer/api_template/components/schemas/simpleTransfersPostResponse.yaml +9 -2
- package/src/OutboundServer/api_template/components/schemas/transferRequest.yaml +3 -0
- package/src/OutboundServer/api_template/components/schemas/transferResponse.yaml +28 -2
- package/src/OutboundServer/api_template/components/schemas/transferStatusResponse.yaml +8 -1
- package/src/OutboundServer/handlers.js +1 -1
- package/src/config.js +1 -1
- package/src/lib/model/AccountsModel.js +13 -11
- package/src/lib/model/InboundTransfersModel.js +166 -24
- package/src/lib/model/OutboundRequestToPayModel.js +5 -6
- package/src/lib/model/OutboundRequestToPayTransferModel.js +2 -2
- package/src/lib/model/OutboundTransfersModel.js +261 -56
- package/src/lib/model/PartiesModel.js +15 -2
- package/src/lib/model/common/BackendError.js +28 -4
- package/src/lib/model/common/index.js +2 -1
- package/test/__mocks__/@mojaloop/sdk-standard-components.js +3 -2
- package/test/integration/lib/Outbound/parties.test.js +2 -0
- package/test/integration/lib/Outbound/quotes.test.js +2 -0
- package/test/integration/lib/Outbound/simpleTransfers.test.js +2 -0
- package/test/unit/InboundServer.test.js +9 -9
- package/test/unit/TestServer.test.js +11 -13
- package/test/unit/api/accounts/data/postAccountsErrorMojaloopResponse.json +11 -3
- package/test/unit/api/accounts/data/postAccountsSuccessResponse.json +14 -0
- package/test/unit/api/accounts/data/postAccountsSuccessResponseWithError1.json +13 -0
- package/test/unit/api/accounts/data/postAccountsSuccessResponseWithError2.json +18 -0
- package/test/unit/api/accounts/utils.js +15 -1
- package/test/unit/api/transfers/data/getTransfersCommittedResponse.json +18 -15
- package/test/unit/api/transfers/data/getTransfersErrorNotFound.json +1 -0
- package/test/unit/api/transfers/data/postTransfersErrorMojaloopResponse.json +9 -0
- package/test/unit/api/transfers/data/postTransfersErrorTimeoutResponse.json +1 -0
- package/test/unit/api/transfers/data/postTransfersSuccessResponse.json +74 -47
- package/test/unit/api/transfers/utils.js +85 -4
- package/test/unit/data/commonHttpHeaders.json +1 -0
- package/test/unit/inboundApi/handlers.test.js +45 -14
- package/test/unit/lib/model/AccountsModel.test.js +9 -6
- package/test/unit/lib/model/InboundTransfersModel.test.js +210 -30
- package/test/unit/lib/model/OutboundRequestToPayModel.test.js +1 -1
- package/test/unit/lib/model/OutboundRequestToPayTransferModel.test.js +3 -3
- package/test/unit/lib/model/OutboundTransfersModel.test.js +826 -157
- package/test/unit/lib/model/PartiesModel.test.js +13 -7
- package/test/unit/lib/model/QuotesModel.test.js +8 -2
- package/test/unit/lib/model/TransfersModel.test.js +8 -2
- package/test/unit/lib/model/data/defaultConfig.json +9 -9
- package/test/unit/lib/model/data/mockArguments.json +97 -40
- package/test/unit/lib/model/data/payeeParty.json +13 -11
- package/test/unit/lib/model/data/quoteResponse.json +36 -25
- package/test/unit/lib/model/data/transferFulfil.json +5 -3
|
@@ -14,6 +14,8 @@ describe('/parties', () => {
|
|
|
14
14
|
expect(res.status).toEqual(200);
|
|
15
15
|
expect(res.data.currentState).toEqual('COMPLETED');
|
|
16
16
|
expect(typeof res.data.party).toEqual('object');
|
|
17
|
+
expect(typeof res.data.party.body).toEqual('object');
|
|
18
|
+
expect(typeof res.data.party.headers).toEqual('object');
|
|
17
19
|
});
|
|
18
20
|
|
|
19
21
|
test('get - timeout', (done) => {
|
|
@@ -30,6 +30,8 @@ describe('/quotes', () => {
|
|
|
30
30
|
expect(res.status).toEqual(200);
|
|
31
31
|
expect(res.data.currentState).toEqual('COMPLETED');
|
|
32
32
|
expect(typeof res.data.quotes).toEqual('object');
|
|
33
|
+
expect(typeof res.data.quotes.body).toEqual('object');
|
|
34
|
+
expect(typeof res.data.quotes.headers).toEqual('object');
|
|
33
35
|
});
|
|
34
36
|
|
|
35
37
|
test('post - timeout', (done) => {
|
|
@@ -39,6 +39,8 @@ describe('/simpleTransfers', () => {
|
|
|
39
39
|
expect(res.status).toEqual(200);
|
|
40
40
|
expect(res.data.currentState).toEqual('COMPLETED');
|
|
41
41
|
expect(typeof res.data.transfer).toEqual('object');
|
|
42
|
+
expect(typeof res.data.transfer.body).toEqual('object');
|
|
43
|
+
expect(typeof res.data.transfer.headers).toEqual('object');
|
|
42
44
|
});
|
|
43
45
|
|
|
44
46
|
test('post - timeout', async () => {
|
|
@@ -51,7 +51,7 @@ describe('Inbound Server', () => {
|
|
|
51
51
|
await supertest(svr._server)
|
|
52
52
|
.put('/parties/MSISDN/123456789')
|
|
53
53
|
.send(putPartiesBody)
|
|
54
|
-
.set('content-type', 'application/vnd.interoperability.parties+json;version=1.
|
|
54
|
+
.set('content-type', 'application/vnd.interoperability.parties+json;version=1.1')
|
|
55
55
|
.set('fspiop-http-method', 'PUT')
|
|
56
56
|
.set('fspiop-uri', '/parties/MSISDN/123456789')
|
|
57
57
|
.set('date', new Date().toISOString());
|
|
@@ -93,7 +93,7 @@ describe('Inbound Server', () => {
|
|
|
93
93
|
testPartiesJwsValidation(false, true, 0));
|
|
94
94
|
|
|
95
95
|
test('processes parties request with valid content-type headers successfully', async () => {
|
|
96
|
-
await testPartiesHeaderValidation('application/vnd.interoperability.parties+json;version=1.
|
|
96
|
+
await testPartiesHeaderValidation('application/vnd.interoperability.parties+json;version=1.1', 200);
|
|
97
97
|
});
|
|
98
98
|
|
|
99
99
|
test('returns error on invalid parties content-type headers', async () => {
|
|
@@ -108,7 +108,7 @@ describe('Inbound Server', () => {
|
|
|
108
108
|
}
|
|
109
109
|
);
|
|
110
110
|
await testPartiesHeaderValidation(
|
|
111
|
-
'application/vnd.interoperability.test+json;version=1.
|
|
111
|
+
'application/vnd.interoperability.test+json;version=1.1',
|
|
112
112
|
400,
|
|
113
113
|
{
|
|
114
114
|
'errorInformation': {
|
|
@@ -148,7 +148,7 @@ describe('Inbound Server', () => {
|
|
|
148
148
|
.post('/quotes')
|
|
149
149
|
.send(postQuotesBody)
|
|
150
150
|
.set(commonHttpHeaders)
|
|
151
|
-
.set('content-type', 'application/vnd.interoperability.quotes+json;version=1.
|
|
151
|
+
.set('content-type', 'application/vnd.interoperability.quotes+json;version=1.1')
|
|
152
152
|
.set('fspiop-http-method', 'POST')
|
|
153
153
|
.set('fspiop-uri', '/quotes')
|
|
154
154
|
.set('date', new Date().toISOString());
|
|
@@ -183,7 +183,7 @@ describe('Inbound Server', () => {
|
|
|
183
183
|
testQuotesJwsValidation(true, true, 1));
|
|
184
184
|
|
|
185
185
|
test('processes quotes request with valid content-type headers successfully', async () => {
|
|
186
|
-
await testQuotesHeaderValidation('application/vnd.interoperability.quotes+json;version=1.
|
|
186
|
+
await testQuotesHeaderValidation('application/vnd.interoperability.quotes+json;version=1.1', 202);
|
|
187
187
|
});
|
|
188
188
|
|
|
189
189
|
test('returns error on invalid quotes content-type headers', async () => {
|
|
@@ -198,7 +198,7 @@ describe('Inbound Server', () => {
|
|
|
198
198
|
}
|
|
199
199
|
);
|
|
200
200
|
await testQuotesHeaderValidation(
|
|
201
|
-
'application/vnd.interoperability.parties+json;version=1.
|
|
201
|
+
'application/vnd.interoperability.parties+json;version=1.1',
|
|
202
202
|
400,
|
|
203
203
|
{
|
|
204
204
|
'errorInformation': {
|
|
@@ -239,7 +239,7 @@ describe('Inbound Server', () => {
|
|
|
239
239
|
.put('/participants/00000000-0000-1000-a000-000000000002')
|
|
240
240
|
.send(putParticipantsBody)
|
|
241
241
|
.set(commonHttpHeaders)
|
|
242
|
-
.set('content-type', 'application/vnd.interoperability.participants+json;version=1.
|
|
242
|
+
.set('content-type', 'application/vnd.interoperability.participants+json;version=1.1')
|
|
243
243
|
.set('fspiop-http-method', 'PUT')
|
|
244
244
|
.set('fspiop-uri', '/participants/00000000-0000-1000-a000-000000000002')
|
|
245
245
|
.set('date', new Date().toISOString());
|
|
@@ -274,7 +274,7 @@ describe('Inbound Server', () => {
|
|
|
274
274
|
testParticipantsJwsValidation(false, false, 0));
|
|
275
275
|
|
|
276
276
|
test('processes participants request with valid content-type headers successfully', async () => {
|
|
277
|
-
await testParticipantsHeaderValidation('application/vnd.interoperability.participants+json;version=1.
|
|
277
|
+
await testParticipantsHeaderValidation('application/vnd.interoperability.participants+json;version=1.1', 200);
|
|
278
278
|
});
|
|
279
279
|
|
|
280
280
|
test('returns error on invalid participants content-type headers', async () => {
|
|
@@ -289,7 +289,7 @@ describe('Inbound Server', () => {
|
|
|
289
289
|
}
|
|
290
290
|
);
|
|
291
291
|
await testParticipantsHeaderValidation(
|
|
292
|
-
'application/vnd.interoperability.parties+json;version=1.
|
|
292
|
+
'application/vnd.interoperability.parties+json;version=1.1',
|
|
293
293
|
400,
|
|
294
294
|
{
|
|
295
295
|
'errorInformation': {
|
|
@@ -104,7 +104,7 @@ describe('Test Server', () => {
|
|
|
104
104
|
.put(`/parties/MSISDN/${MSISDN}`)
|
|
105
105
|
.send(putPartiesBody)
|
|
106
106
|
.set(commonHttpHeaders)
|
|
107
|
-
.set('content-type', 'application/vnd.interoperability.parties+json;version=1.
|
|
107
|
+
.set('content-type', 'application/vnd.interoperability.parties+json;version=1.1')
|
|
108
108
|
.set('fspiop-http-method', 'PUT')
|
|
109
109
|
.set('fspiop-uri', `/parties/MSISDN/${MSISDN}`)
|
|
110
110
|
.set('date', new Date().toISOString());
|
|
@@ -119,7 +119,7 @@ describe('Test Server', () => {
|
|
|
119
119
|
.post('/quotes')
|
|
120
120
|
.send(postQuotesBody)
|
|
121
121
|
.set(commonHttpHeaders)
|
|
122
|
-
.set('content-type', 'application/vnd.interoperability.quotes+json;version=1.
|
|
122
|
+
.set('content-type', 'application/vnd.interoperability.quotes+json;version=1.1')
|
|
123
123
|
.set('fspiop-http-method', 'POST')
|
|
124
124
|
.set('fspiop-uri', '/quotes')
|
|
125
125
|
.set('date', new Date().toISOString());
|
|
@@ -136,7 +136,7 @@ describe('Test Server', () => {
|
|
|
136
136
|
.put(`/participants/${participantId}`)
|
|
137
137
|
.send(putParticipantsBody)
|
|
138
138
|
.set(commonHttpHeaders)
|
|
139
|
-
.set('content-type', 'application/vnd.interoperability.participants+json;version=1.
|
|
139
|
+
.set('content-type', 'application/vnd.interoperability.participants+json;version=1.1')
|
|
140
140
|
.set('fspiop-http-method', 'PUT')
|
|
141
141
|
.set('fspiop-uri', `/participants/${participantId}`)
|
|
142
142
|
.set('date', new Date().toISOString());
|
|
@@ -159,7 +159,7 @@ describe('Test Server', () => {
|
|
|
159
159
|
|
|
160
160
|
const headers = {
|
|
161
161
|
...commonHttpHeaders,
|
|
162
|
-
'content-type': 'application/vnd.interoperability.participants+json;version=1.
|
|
162
|
+
'content-type': 'application/vnd.interoperability.participants+json;version=1.1',
|
|
163
163
|
'fspiop-http-method': 'PUT',
|
|
164
164
|
'fspiop-uri': `/participants/${participantId}`,
|
|
165
165
|
'date': new Date().toISOString(),
|
|
@@ -231,7 +231,7 @@ describe('Test Server', () => {
|
|
|
231
231
|
test('WebSocket /requests and / endpoint triggers send to client when callback received to inbound server', async () => {
|
|
232
232
|
const headers = {
|
|
233
233
|
...commonHttpHeaders,
|
|
234
|
-
'content-type': 'application/vnd.interoperability.quotes+json;version=1.
|
|
234
|
+
'content-type': 'application/vnd.interoperability.quotes+json;version=1.1',
|
|
235
235
|
'fspiop-http-method': 'POST',
|
|
236
236
|
'fspiop-uri': '/quotes',
|
|
237
237
|
'date': new Date().toISOString(),
|
|
@@ -270,8 +270,7 @@ describe('Test Server', () => {
|
|
|
270
270
|
.send(postQuotesBody)
|
|
271
271
|
.set(headers);
|
|
272
272
|
|
|
273
|
-
|
|
274
|
-
expect(inboundServer._api._cache.set).toHaveBeenCalledTimes(3);
|
|
273
|
+
expect(inboundServer._api._cache.set).toHaveBeenCalledTimes(4);
|
|
275
274
|
expect(inboundServer._api._cache.set).toHaveBeenCalledWith(
|
|
276
275
|
`${testServer._wsapi._cache.REQUEST_PREFIX}${postQuotesBody.quoteId}`,
|
|
277
276
|
{
|
|
@@ -304,7 +303,7 @@ describe('Test Server', () => {
|
|
|
304
303
|
test('Websocket / endpoint receives both callbacks and requests', async () => {
|
|
305
304
|
const quoteRequestHeaders = {
|
|
306
305
|
...commonHttpHeaders,
|
|
307
|
-
'content-type': 'application/vnd.interoperability.quotes+json;version=1.
|
|
306
|
+
'content-type': 'application/vnd.interoperability.quotes+json;version=1.1',
|
|
308
307
|
'fspiop-http-method': 'POST',
|
|
309
308
|
'fspiop-uri': '/quotes',
|
|
310
309
|
'date': new Date().toISOString(),
|
|
@@ -332,8 +331,7 @@ describe('Test Server', () => {
|
|
|
332
331
|
.send(postQuotesBody)
|
|
333
332
|
.set(quoteRequestHeaders);
|
|
334
333
|
|
|
335
|
-
|
|
336
|
-
expect(inboundServer._api._cache.set).toHaveBeenCalledTimes(3);
|
|
334
|
+
expect(inboundServer._api._cache.set).toHaveBeenCalledTimes(4);
|
|
337
335
|
expect(inboundServer._api._cache.set).toHaveBeenCalledWith(
|
|
338
336
|
`${testServer._wsapi._cache.REQUEST_PREFIX}${postQuotesBody.quoteId}`,
|
|
339
337
|
{
|
|
@@ -362,7 +360,7 @@ describe('Test Server', () => {
|
|
|
362
360
|
|
|
363
361
|
const putParticipantsHeaders = {
|
|
364
362
|
...commonHttpHeaders,
|
|
365
|
-
'content-type': 'application/vnd.interoperability.participants+json;version=1.
|
|
363
|
+
'content-type': 'application/vnd.interoperability.participants+json;version=1.1',
|
|
366
364
|
'fspiop-http-method': 'PUT',
|
|
367
365
|
'fspiop-uri': `/participants/${participantId}`,
|
|
368
366
|
'date': new Date().toISOString(),
|
|
@@ -375,8 +373,8 @@ describe('Test Server', () => {
|
|
|
375
373
|
|
|
376
374
|
// Called thrice for the quote request earlier in this test, another time now for the put
|
|
377
375
|
// participants request
|
|
378
|
-
expect(inboundServer._api._cache.set).toHaveBeenCalledTimes(
|
|
379
|
-
expect(inboundServer._api._cache.set.mock.calls[
|
|
376
|
+
expect(inboundServer._api._cache.set).toHaveBeenCalledTimes(5);
|
|
377
|
+
expect(inboundServer._api._cache.set.mock.calls[4]).toEqual([
|
|
380
378
|
`${testServer._wsapi._cache.CALLBACK_PREFIX}${participantId}`,
|
|
381
379
|
{
|
|
382
380
|
data: putParticipantsBody,
|
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
{
|
|
2
|
+
"message": "Got an error response creating accounts: {\n errorInformation: { errorCode: '3204', errorDescription: 'Party not found' }\n}",
|
|
3
|
+
"statusCode": "3204",
|
|
2
4
|
"executionState": {
|
|
5
|
+
"postAccountsResponse": {
|
|
6
|
+
"body": {
|
|
7
|
+
"errorInformation": {
|
|
8
|
+
"errorCode": "3204",
|
|
9
|
+
"errorDescription": "Party not found"
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
},
|
|
3
13
|
"accounts": [
|
|
4
14
|
{
|
|
5
15
|
"currency": "USD",
|
|
@@ -19,7 +29,5 @@
|
|
|
19
29
|
},
|
|
20
30
|
"modelId": "00000000-0000-1000-8000-000000000001",
|
|
21
31
|
"response": []
|
|
22
|
-
}
|
|
23
|
-
"message": "Got an error response creating accounts: {\n errorInformation: { errorCode: '3204', errorDescription: 'Party not found' }\n}",
|
|
24
|
-
"statusCode": "3204"
|
|
32
|
+
}
|
|
25
33
|
}
|
|
@@ -8,6 +8,20 @@
|
|
|
8
8
|
],
|
|
9
9
|
"currentState": "COMPLETED",
|
|
10
10
|
"modelId": "00000000-0000-1000-8000-000000000001",
|
|
11
|
+
"postAccountsResponse": {
|
|
12
|
+
"body": {
|
|
13
|
+
"currency": "USD",
|
|
14
|
+
"partyList": [
|
|
15
|
+
{
|
|
16
|
+
"partyId": {
|
|
17
|
+
"fspId": "mojaloop-sdk",
|
|
18
|
+
"partyIdType": "MSISDN",
|
|
19
|
+
"partyIdentifier": "123456789"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
},
|
|
11
25
|
"response": [
|
|
12
26
|
{
|
|
13
27
|
"idType": "MSISDN",
|
|
@@ -8,6 +8,19 @@
|
|
|
8
8
|
],
|
|
9
9
|
"currentState": "COMPLETED",
|
|
10
10
|
"modelId": "00000000-0000-1000-8000-000000000001",
|
|
11
|
+
"postAccountsResponse": {
|
|
12
|
+
"body": {
|
|
13
|
+
"partyList": [
|
|
14
|
+
{
|
|
15
|
+
"partyId": {
|
|
16
|
+
"fspId": "mojaloop-sdk",
|
|
17
|
+
"partyIdType": "MSISDN",
|
|
18
|
+
"partyIdentifier": "123456789"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
]
|
|
22
|
+
}
|
|
23
|
+
},
|
|
11
24
|
"response": [
|
|
12
25
|
{
|
|
13
26
|
"error": {
|
|
@@ -8,6 +8,24 @@
|
|
|
8
8
|
],
|
|
9
9
|
"currentState": "COMPLETED",
|
|
10
10
|
"modelId": "00000000-0000-1000-8000-000000000001",
|
|
11
|
+
"postAccountsResponse": {
|
|
12
|
+
"body": {
|
|
13
|
+
"currency": "USD",
|
|
14
|
+
"partyList": [
|
|
15
|
+
{
|
|
16
|
+
"errorInformation": {
|
|
17
|
+
"errorCode": "3204",
|
|
18
|
+
"errorDescription": "Party not found"
|
|
19
|
+
},
|
|
20
|
+
"partyId": {
|
|
21
|
+
"fspId": "mojaloop-sdk",
|
|
22
|
+
"partyIdType": "MSISDN",
|
|
23
|
+
"partyIdentifier": "123456789"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
}
|
|
28
|
+
},
|
|
11
29
|
"response": [
|
|
12
30
|
{
|
|
13
31
|
"error": {
|
|
@@ -36,7 +36,7 @@ function createPostAccountsTester({ reqInbound, reqOutbound, apiSpecsOutbound })
|
|
|
36
36
|
return reqInbound.put(putUrl)
|
|
37
37
|
.send(putBody)
|
|
38
38
|
.set('Date', new Date().toISOString())
|
|
39
|
-
.set('content-type', 'application/vnd.interoperability.participants+json;version=1.
|
|
39
|
+
.set('content-type', 'application/vnd.interoperability.participants+json;version=1.1')
|
|
40
40
|
.set('fspiop-source', 'mojaloop-sdk')
|
|
41
41
|
.expect(200);
|
|
42
42
|
};
|
|
@@ -50,6 +50,20 @@ function createPostAccountsTester({ reqInbound, reqOutbound, apiSpecsOutbound })
|
|
|
50
50
|
const res = await reqOutbound.post('/accounts').send(postAccountsBody);
|
|
51
51
|
const {body} = res;
|
|
52
52
|
expect(res.statusCode).toEqual(responseCode);
|
|
53
|
+
|
|
54
|
+
// remove elements of the response we do not want/need to compare for correctness.
|
|
55
|
+
// timestamps on requests/responses for example will be set by the HTTP framework
|
|
56
|
+
// and we dont want to compare against static values.
|
|
57
|
+
if (body.executionState) {
|
|
58
|
+
if(body.executionState.postAccountsResponse) {
|
|
59
|
+
delete body.executionState.postAccountsResponse.headers;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
if(body.postAccountsResponse) {
|
|
64
|
+
delete body.postAccountsResponse.headers;
|
|
65
|
+
}
|
|
66
|
+
|
|
53
67
|
expect(body).toEqual(responseBody);
|
|
54
68
|
const responseValidator = new OpenAPIResponseValidator(apiSpecsOutbound.paths['/accounts'].post);
|
|
55
69
|
const err = responseValidator.validateResponse(responseCode, body);
|
|
@@ -1,21 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"currentState": "COMPLETED",
|
|
3
|
+
"direction": "OUTBOUND",
|
|
3
4
|
"fulfil": {
|
|
4
|
-
"
|
|
5
|
-
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
5
|
+
"body": {
|
|
6
|
+
"completedTimestamp": "2017-11-15T14:16:09.663+01:00",
|
|
7
|
+
"extensionList": {
|
|
8
|
+
"extension": [
|
|
9
|
+
{
|
|
10
|
+
"key": "treskey1",
|
|
11
|
+
"value": "tresvalue1"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"key": "treskey2",
|
|
15
|
+
"value": "tresvalue2"
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
},
|
|
19
|
+
"fulfilment": "87mm1reS3SAi8oIWXgBkLmgWc1MkZ_yLbFDX5XAdo5o",
|
|
20
|
+
"transferState": "COMMITTED"
|
|
21
|
+
}
|
|
19
22
|
},
|
|
20
23
|
"transferId": "00000000-0000-1000-8000-000000000001"
|
|
21
24
|
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
"message": "Got an error response resolving party: {\n errorInformation: { errorCode: '3204', errorDescription: 'Party not found' }\n}",
|
|
3
3
|
"statusCode": "3204",
|
|
4
4
|
"transferState": {
|
|
5
|
+
"direction": "OUTBOUND",
|
|
5
6
|
"amount": "100",
|
|
6
7
|
"amountType": "SEND",
|
|
7
8
|
"currency": "USD",
|
|
@@ -11,6 +12,14 @@
|
|
|
11
12
|
"idType": "MSISDN",
|
|
12
13
|
"idValue": "123456789"
|
|
13
14
|
},
|
|
15
|
+
"getPartiesResponse": {
|
|
16
|
+
"body": {
|
|
17
|
+
"errorInformation": {
|
|
18
|
+
"errorCode": "3204",
|
|
19
|
+
"errorDescription": "Party not found"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
},
|
|
14
23
|
"homeTransactionId": "123ABC",
|
|
15
24
|
"lastError": {
|
|
16
25
|
"httpStatusCode": 500,
|
|
@@ -3,27 +3,52 @@
|
|
|
3
3
|
"amountType": "SEND",
|
|
4
4
|
"currency": "USD",
|
|
5
5
|
"currentState": "COMPLETED",
|
|
6
|
+
"direction": "OUTBOUND",
|
|
6
7
|
"from": {
|
|
7
8
|
"displayName": "John Doe",
|
|
8
9
|
"idType": "MSISDN",
|
|
9
10
|
"idValue": "123456789"
|
|
10
11
|
},
|
|
11
12
|
"fulfil": {
|
|
12
|
-
"
|
|
13
|
-
|
|
14
|
-
"
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
"body": {
|
|
14
|
+
"completedTimestamp": "2017-11-15T14:16:09.663+01:00",
|
|
15
|
+
"extensionList": {
|
|
16
|
+
"extension": [
|
|
17
|
+
{
|
|
18
|
+
"key": "treskey1",
|
|
19
|
+
"value": "tresvalue1"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"key": "treskey2",
|
|
23
|
+
"value": "tresvalue2"
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
},
|
|
27
|
+
"fulfilment": "87mm1reS3SAi8oIWXgBkLmgWc1MkZ_yLbFDX5XAdo5o",
|
|
28
|
+
"transferState": "COMMITTED"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"getPartiesResponse": {
|
|
32
|
+
"body": {
|
|
33
|
+
"party": {
|
|
34
|
+
"merchantClassificationCode": "1234",
|
|
35
|
+
"name": "John Doe",
|
|
36
|
+
"partyIdInfo": {
|
|
37
|
+
"fspId": "sim",
|
|
38
|
+
"partyIdType": "PERSONAL_ID",
|
|
39
|
+
"partyIdentifier": "987654321",
|
|
40
|
+
"partySubIdOrType": "PASSPORT"
|
|
18
41
|
},
|
|
19
|
-
{
|
|
20
|
-
"
|
|
21
|
-
|
|
42
|
+
"personalInfo": {
|
|
43
|
+
"complexName": {
|
|
44
|
+
"firstName": "John",
|
|
45
|
+
"lastName": "Doe",
|
|
46
|
+
"middleName": "Someone"
|
|
47
|
+
},
|
|
48
|
+
"dateOfBirth": "1980-01-01"
|
|
22
49
|
}
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
"fulfilment": "87mm1reS3SAi8oIWXgBkLmgWc1MkZ_yLbFDX5XAdo5o",
|
|
26
|
-
"transferState": "COMMITTED"
|
|
50
|
+
}
|
|
51
|
+
}
|
|
27
52
|
},
|
|
28
53
|
"homeTransactionId": "123ABC",
|
|
29
54
|
"note": "test payment",
|
|
@@ -39,40 +64,42 @@
|
|
|
39
64
|
}
|
|
40
65
|
],
|
|
41
66
|
"quoteResponse": {
|
|
42
|
-
"
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
"
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
"
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
"
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
"
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
"
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
"
|
|
75
|
-
|
|
67
|
+
"body": {
|
|
68
|
+
"condition": "fH9pAYDQbmoZLPbvv3CSW2RfjU4jvM4ApG_fqGnR7Xs",
|
|
69
|
+
"expiration": "2017-11-15T14:17:09.663+01:00",
|
|
70
|
+
"extensionList": {
|
|
71
|
+
"extension": [
|
|
72
|
+
{
|
|
73
|
+
"key": "qreskey1",
|
|
74
|
+
"value": "qresvalue1"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"key": "qreskey2",
|
|
78
|
+
"value": "qresvalue2"
|
|
79
|
+
}
|
|
80
|
+
]
|
|
81
|
+
},
|
|
82
|
+
"geoCode": {
|
|
83
|
+
"latitude": "53.295971",
|
|
84
|
+
"longitude": "-0.038500"
|
|
85
|
+
},
|
|
86
|
+
"ilpPacket": "AQAAAAAAACasIWcuc2UubW9iaWxlbW9uZXkubXNpc2RuLjEyMzQ1Njc4OYIEIXsNCiAgICAidHJhbnNhY3Rpb25JZCI6ICI4NWZlYWMyZi0zOWIyLTQ5MWItODE3ZS00YTAzMjAzZDRmMTQiLA0KICAgICJxdW90ZUlkIjogIjdjMjNlODBjLWQwNzgtNDA3Ny04MjYzLTJjMDQ3ODc2ZmNmNiIsDQogICAgInBheWVlIjogew0KICAgICAgICAicGFydHlJZEluZm8iOiB7DQogICAgICAgICAgICAicGFydHlJZFR5cGUiOiAiTVNJU0ROIiwNCiAgICAgICAgICAgICJwYXJ0eUlkZW50aWZpZXIiOiAiMTIzNDU2Nzg5IiwNCiAgICAgICAgICAgICJmc3BJZCI6ICJNb2JpbGVNb25leSINCiAgICAgICAgfSwNCiAgICAgICAgInBlcnNvbmFsSW5mbyI6IHsNCiAgICAgICAgICAgICJjb21wbGV4TmFtZSI6IHsNCiAgICAgICAgICAgICAgICAiZmlyc3ROYW1lIjogIkhlbnJpayIsDQogICAgICAgICAgICAgICAgImxhc3ROYW1lIjogIkthcmxzc29uIg0KICAgICAgICAgICAgfQ0KICAgICAgICB9DQogICAgfSwNCiAgICAicGF5ZXIiOiB7DQogICAgICAgICJwZXJzb25hbEluZm8iOiB7DQogICAgICAgICAgICAiY29tcGxleE5hbWUiOiB7DQogICAgICAgICAgICAgICAgImZpcnN0TmFtZSI6ICJNYXRzIiwNCiAgICAgICAgICAgICAgICAibGFzdE5hbWUiOiAiSGFnbWFuIg0KICAgICAgICAgICAgfQ0KICAgICAgICB9LA0KICAgICAgICAicGFydHlJZEluZm8iOiB7DQogICAgICAgICAgICAicGFydHlJZFR5cGUiOiAiSUJBTiIsDQogICAgICAgICAgICAicGFydHlJZGVudGlmaWVyIjogIlNFNDU1MDAwMDAwMDA1ODM5ODI1NzQ2NiIsDQogICAgICAgICAgICAiZnNwSWQiOiAiQmFua05yT25lIg0KICAgICAgICB9DQogICAgfSwNCiAgICAiYW1vdW50Ijogew0KICAgICAgICAiYW1vdW50IjogIjEwMCIsDQogICAgICAgICJjdXJyZW5jeSI6ICJVU0QiDQogICAgfSwNCiAgICAidHJhbnNhY3Rpb25UeXBlIjogew0KICAgICAgICAic2NlbmFyaW8iOiAiVFJBTlNGRVIiLA0KICAgICAgICAiaW5pdGlhdG9yIjogIlBBWUVSIiwNCiAgICAgICAgImluaXRpYXRvclR5cGUiOiAiQ09OU1VNRVIiDQogICAgfSwNCiAgICAibm90ZSI6ICJGcm9tIE1hdHMiDQp9DQo==",
|
|
87
|
+
"payeeFspCommission": {
|
|
88
|
+
"amount": "5",
|
|
89
|
+
"currency": "USD"
|
|
90
|
+
},
|
|
91
|
+
"payeeFspFee": {
|
|
92
|
+
"amount": "5",
|
|
93
|
+
"currency": "USD"
|
|
94
|
+
},
|
|
95
|
+
"payeeReceiveAmount": {
|
|
96
|
+
"amount": "490",
|
|
97
|
+
"currency": "USD"
|
|
98
|
+
},
|
|
99
|
+
"transferAmount": {
|
|
100
|
+
"amount": "500",
|
|
101
|
+
"currency": "USD"
|
|
102
|
+
}
|
|
76
103
|
}
|
|
77
104
|
},
|
|
78
105
|
"quoteResponseSource": "mojaloop-sdk",
|