mojaloop / pisp-project

PISP - Payment Initiation Service Provider integration with Mojaloop
Other
9 stars 12 forks source link

feature: added requests to add new TP endpoints #57

Closed kleyow closed 4 years ago

kleyow commented 4 years ago

I know postman collection is pretty un-reviewable. Here are the endpoints when you ping the ledger. I'm not sure if should leave the url params as {{ID}} fo now or make them more specific.

PISP - Endpoints

[
  {
    "type":"FSPIOP_CALLBACK_URL_PARTICIPANT_PUT",
    "value":"http://host.docker.internal:7000/participants/{{partyIdType}}/{{partyIdentifier}}"
  },
  {
    "type":"FSPIOP_CALLBACK_URL_PARTICIPANT_PUT_ERROR",
    "value":"http://host.docker.internal:7000/participants/{{partyIdType}}/{{partyIdentifier}}/error"
  },
  {
    "type":"FSPIOP_CALLBACK_URL_PARTICIPANT_BATCH_PUT",
    "value":"http://host.docker.internal:7000/participants/{{requestId}}"
  },
  {
    "type":"FSPIOP_CALLBACK_URL_PARTICIPANT_BATCH_PUT_ERROR",
    "value":"http://host.docker.internal:7000/participants/{{requestId}}/error"
  },
  {
    "type":"FSPIOP_CALLBACK_URL_PARTIES_GET",
    "value":"http://host.docker.internal:7000/parties/{{partyIdType}}/{{partyIdentifier}}"
  },
  {
    "type":"FSPIOP_CALLBACK_URL_PARTIES_PUT",
    "value":"http://host.docker.internal:7000/parties/{{partyIdType}}/{{partyIdentifier}}"
  },
  {
    "type":"FSPIOP_CALLBACK_URL_PARTIES_PUT_ERROR",
    "value":"http://host.docker.internal:7000/parties/{{partyIdType}}/{{partyIdentifier}}/error"
  },
  {
    "type":"FSPIOP_CALLBACK_URL_QUOTES",
    "value":"http://host.docker.internal:7000"
  },
  {
    "type":"FSPIOP_CALLBACK_URL_TRANSFER_POST",
    "value":"http://host.docker.internal:7000/transfers"
  },
  {
    "type":"FSPIOP_CALLBACK_URL_AUTHORIZATIONS",
    "value":"http://host.docker.internal:7000"
  },
  {
    "type":"FSPIOP_CALLBACK_URL_TRANSFER_PUT",
    "value":"http://host.docker.internal:7000/transfers/{{transferId}}"
  },
  {
    "type":"FSPIOP_CALLBACK_URL_TRANSFER_ERROR",
    "value":"http://host.docker.internal:7000/transfers/{{transferId}}/error"
  },
  {
    "type":"NET_DEBIT_CAP_ADJUSTMENT_EMAIL",
    "value":"sridevi.miriyala@modusbox.com"
  },
  {
    "type":"SETTLEMENT_TRANSFER_POSITION_CHANGE_EMAIL",
    "value":"sridevi.miriyala@modusbox.com"
  },
  {
    "type":"NET_DEBIT_CAP_THRESHOLD_BREACH_EMAIL",
    "value":"sridevi.miriyala@modusbox.com"
  },
  {
    "type":"FSPIOP_CALLBACK_URL_BULK_TRANSFER_POST",
    "value":"http://host.docker.internal:7000/bulkTransfers"
  },
  {
    "type":"FSPIOP_CALLBACK_URL_BULK_TRANSFER_PUT",
    "value":"http://host.docker.internal:7000/bulkTransfers/{{id}}"
  },
  {
    "type":"FSPIOP_CALLBACK_URL_BULK_TRANSFER_ERROR",
    "value":"http://host.docker.internal:7000/bulkTransfers/{{id}}/error"
  },
  {
    "type":"FSPIOP_CALLBACK_URL_TRX_REQ_SERVICE",
    "value":"http://host.docker.internal:7000"
  },
  {
    "type":"TP_CB_URL_TRANSACTION_REQUEST_POST",
    "value":"http://host.docker.internal:7000/thirdpartyRequests/transactions"
  },
  {
    "type":"TP_CB_URL_TRANSACTION_REQUEST_PUT",
    "value":"http://host.docker.internal:7000/thirdpartyRequests/transactions/{ID}"
  },
  {
    "type":"TP_CB_URL_TRANSACTION_REQUEST_PUT_ERROR",
    "value":"http://host.docker.internal:7000/thirdpartyRequests/transactions/{ID}/error"
  },
  {
    "type":"TP_CB_URL_TRANSACTION_REQUEST_AUTH_POST",
    "value":"http://host.docker.internal:7000/thirdpartyRequests/transactions/{ID}/authorizations"
  },
  {
    "type":"TP_CB_URL_TRANSACTION_REQUEST_AUTH_PUT",
    "value":"http://host.docker.internal:7000/thirdpartyRequests/transactions/{ID}/authorizations"
  },
  {
    "type":"TP_CB_URL_TRANSACTION_REQUEST_AUTH_PUT_ERROR",
    "value":"http://host.docker.internal:7000/thirdpartyRequests/transactions/{ID}/authorizations/error"
  },
  {
    "type":"TP_CB_URL_CONSENT_REQUEST_POST",
    "value":"http://host.docker.internal:7000/consentRequests"
  },
  {
    "type":"TP_CB_URL_CONSENT_REQUEST_PUT",
    "value":"http://host.docker.internal:7000/consentRequests/{ID}"
  },
  {
    "type":"TP_CB_URL_CONSENT_REQUEST_PUT_ERROR",
    "value":"http://host.docker.internal:7000/consentRequests/{ID}/error"
  },
  {
    "type":"TP_CB_URL_CREATE_CREDENTIAL_POST",
    "value":"http://host.docker.internal:7000/consentRequests/{ID}/createCredential"
  },
  {
    "type":"TP_CB_URL_CONSENT_POST",
    "value":"http://host.docker.internal:7000/consents"
  },
  {
    "type":"TP_CB_URL_CONSENT_GET",
    "value":"http://host.docker.internal:7000/consent/{ID}"
  },
  {
    "type":"TP_CB_URL_CONSENT_PUT",
    "value":"http://host.docker.internal:7000/consent/{ID}"
  },
  {
    "type":"TP_CB_URL_CONSENT_PUT_ERROR",
    "value":"http://host.docker.internal:7000/consent/{ID}/error"
  }
]

DFSPA

[
  {
    "type":"FSPIOP_CALLBACK_URL_PARTICIPANT_PUT",
    "value":"http://host.docker.internal:5000/participants/{{partyIdType}}/{{partyIdentifier}}"
  },
  {
    "type":"FSPIOP_CALLBACK_URL_PARTICIPANT_PUT_ERROR",
    "value":"http://host.docker.internal:5000/participants/{{partyIdType}}/{{partyIdentifier}}/error"
  },
  {
    "type":"FSPIOP_CALLBACK_URL_PARTICIPANT_BATCH_PUT",
    "value":"http://host.docker.internal:5000/participants/{{requestId}}"
  },
  {
    "type":"FSPIOP_CALLBACK_URL_PARTICIPANT_BATCH_PUT_ERROR",
    "value":"http://host.docker.internal:5000/participants/{{requestId}}/error"
  },
  {
    "type":"FSPIOP_CALLBACK_URL_PARTIES_GET",
    "value":"http://host.docker.internal:5000/parties/{{partyIdType}}/{{partyIdentifier}}"
  },
  {
    "type":"FSPIOP_CALLBACK_URL_PARTIES_PUT",
    "value":"http://host.docker.internal:5000/parties/{{partyIdType}}/{{partyIdentifier}}"
  },
  {
    "type":"FSPIOP_CALLBACK_URL_PARTIES_PUT_ERROR",
    "value":"http://host.docker.internal:5000/parties/{{partyIdType}}/{{partyIdentifier}}/error"
  },
  {
    "type":"FSPIOP_CALLBACK_URL_QUOTES",
    "value":"http://host.docker.internal:5000"
  },
  {
    "type":"FSPIOP_CALLBACK_URL_TRANSFER_POST",
    "value":"http://host.docker.internal:5000/transfers"
  },
  {
    "type":"FSPIOP_CALLBACK_URL_TRANSFER_PUT",
    "value":"http://host.docker.internal:5000/transfers/{{transferId}}"
  },
  {
    "type":"FSPIOP_CALLBACK_URL_TRANSFER_ERROR",
    "value":"http://host.docker.internal:5000/transfers/{{transferId}}/error"
  },
  {
    "type":"NET_DEBIT_CAP_ADJUSTMENT_EMAIL",
    "value":"sridevi.miriyala@modusbox.com"
  },
  {
    "type":"SETTLEMENT_TRANSFER_POSITION_CHANGE_EMAIL",
    "value":"sridevi.miriyala@modusbox.com"
  },
  {
    "type":"NET_DEBIT_CAP_THRESHOLD_BREACH_EMAIL",
    "value":"sridevi.miriyala@modusbox.com"
  },
  {
    "type":"FSPIOP_CALLBACK_URL_BULK_TRANSFER_POST",
    "value":"http://host.docker.internal:5000/bulkTransfers"
  },
  {
    "type":"FSPIOP_CALLBACK_URL_BULK_TRANSFER_PUT",
    "value":"http://host.docker.internal:5000/bulkTransfers/{{id}}"
  },
  {
    "type":"FSPIOP_CALLBACK_URL_BULK_TRANSFER_ERROR",
    "value":"http://host.docker.internal:5000/bulkTransfers/{{id}}/error"
  },
  {
    "type":"FSPIOP_CALLBACK_URL_TRX_REQ_SERVICE",
    "value":"http://host.docker.internal:5000"
  },
  {
    "type":"TP_CB_URL_TRANSACTION_REQUEST_POST",
    "value":"http://host.docker.internal:5000/thirdpartyRequests/transactions"
  },
  {
    "type":"TP_CB_URL_TRANSACTION_REQUEST_PUT",
    "value":"http://host.docker.internal:5000/thirdpartyRequests/transactions/{ID}"
  },
  {
    "type":"TP_CB_URL_TRANSACTION_REQUEST_PUT_ERROR",
    "value":"http://host.docker.internal:5000/thirdpartyRequests/transactions/{ID}/error"
  },
  {
    "type":"TP_CB_URL_TRANSACTION_REQUEST_AUTH_POST",
    "value":"http://host.docker.internal:5000/thirdpartyRequests/transactions/{ID}/authorizations"
  },
  {
    "type":"TP_CB_URL_TRANSACTION_REQUEST_AUTH_PUT",
    "value":"http://host.docker.internal:5000/thirdpartyRequests/transactions/{ID}/authorizations"
  },
  {
    "type":"TP_CB_URL_TRANSACTION_REQUEST_AUTH_PUT_ERROR",
    "value":"http://host.docker.internal:5000/thirdpartyRequests/transactions/{ID}/authorizations/error"
  },
  {
    "type":"TP_CB_URL_CONSENT_REQUEST_POST",
    "value":"http://host.docker.internal:5000/consentRequests"
  },
  {
    "type":"TP_CB_URL_CONSENT_REQUEST_PUT",
    "value":"http://host.docker.internal:5000/consentRequests/{ID}"
  },
  {
    "type":"TP_CB_URL_CONSENT_REQUEST_PUT_ERROR",
    "value":"http://host.docker.internal:5000/consentRequests/{ID}/error"
  },
  {
    "type":"TP_CB_URL_CREATE_CREDENTIAL_POST",
    "value":"http://host.docker.internal:5000/consentRequests/{ID}/createCredential"
  },
  {
    "type":"TP_CB_URL_CONSENT_POST",
    "value":"http://host.docker.internal:5000/consents"
  },
  {
    "type":"TP_CB_URL_CONSENT_GET",
    "value":"http://host.docker.internal:5000/consent/{ID}"
  },
  {
    "type":"TP_CB_URL_CONSENT_PUT",
    "value":"http://host.docker.internal:5000/consent/{ID}"
  },
  {
    "type":"TP_CB_URL_CONSENT_PUT_ERROR",
    "value":"http://host.docker.internal:5000/consent/{ID}/error"
  }
]

DFSPB

[
  {
    "type":"FSPIOP_CALLBACK_URL_PARTICIPANT_PUT",
    "value":"http://host.docker.internal:6000/participants/{{partyIdType}}/{{partyIdentifier}}"
  },
  {
    "type":"FSPIOP_CALLBACK_URL_PARTICIPANT_PUT_ERROR",
    "value":"http://host.docker.internal:6000/participants/{{partyIdType}}/{{partyIdentifier}}/error"
  },
  {
    "type":"FSPIOP_CALLBACK_URL_PARTICIPANT_BATCH_PUT",
    "value":"http://host.docker.internal:6000/participants/{{requestId}}"
  },
  {
    "type":"FSPIOP_CALLBACK_URL_PARTICIPANT_BATCH_PUT_ERROR",
    "value":"http://host.docker.internal:6000/participants/{{requestId}}/error"
  },
  {
    "type":"FSPIOP_CALLBACK_URL_PARTIES_GET",
    "value":"http://host.docker.internal:6000/parties/{{partyIdType}}/{{partyIdentifier}}"
  },
  {
    "type":"FSPIOP_CALLBACK_URL_PARTIES_PUT",
    "value":"http://host.docker.internal:6000/parties/{{partyIdType}}/{{partyIdentifier}}"
  },
  {
    "type":"FSPIOP_CALLBACK_URL_PARTIES_PUT_ERROR",
    "value":"http://host.docker.internal:6000/parties/{{partyIdType}}/{{partyIdentifier}}/error"
  },
  {
    "type":"FSPIOP_CALLBACK_URL_QUOTES",
    "value":"http://host.docker.internal:6000"
  },
  {
    "type":"FSPIOP_CALLBACK_URL_TRANSFER_POST",
    "value":"http://host.docker.internal:6000/transfers"
  },
  {
    "type":"FSPIOP_CALLBACK_URL_TRANSFER_PUT",
    "value":"http://host.docker.internal:6000/transfers/{{transferId}}"
  },
  {
    "type":"FSPIOP_CALLBACK_URL_TRANSFER_ERROR",
    "value":"http://host.docker.internal:6000/transfers/{{transferId}}/error"
  },
  {
    "type":"FSPIOP_CALLBACK_URL_AUTHORIZATIONS",
    "value":"http://host.docker.internal:6000"
  },
  {
    "type":"NET_DEBIT_CAP_ADJUSTMENT_EMAIL",
    "value":"sridevi.miriyala@modusbox.com"
  },
  {
    "type":"NET_DEBIT_CAP_THRESHOLD_BREACH_EMAIL",
    "value":"sridevi.miriyala@modusbox.com"
  },
  {
    "type":"SETTLEMENT_TRANSFER_POSITION_CHANGE_EMAIL",
    "value":"sridevi.miriyala@modusbox.com"
  },
  {
    "type":"FSPIOP_CALLBACK_URL_BULK_TRANSFER_PUT",
    "value":"http://host.docker.internal:6000/bulkTransfers/{{id}}"
  },
  {
    "type":"FSPIOP_CALLBACK_URL_BULK_TRANSFER_ERROR",
    "value":"http://host.docker.internal:6000/bulkTransfers/{{id}}/error"
  },
  {
    "type":"FSPIOP_CALLBACK_URL_BULK_TRANSFER_POST",
    "value":"http://host.docker.internal:6000/bulkTransfers"
  },
  {
    "type":"FSPIOP_CALLBACK_URL_TRX_REQ_SERVICE",
    "value":"http://host.docker.internal:6000"
  },
  {
    "type":"TP_CB_URL_TRANSACTION_REQUEST_POST",
    "value":"http://host.docker.internal:6000/thirdpartyRequests/transactions"
  },
  {
    "type":"TP_CB_URL_TRANSACTION_REQUEST_PUT",
    "value":"http://host.docker.internal:6000/thirdpartyRequests/transactions/{ID}"
  },
  {
    "type":"TP_CB_URL_TRANSACTION_REQUEST_PUT_ERROR",
    "value":"http://host.docker.internal:6000/thirdpartyRequests/transactions/{ID}/error"
  },
  {
    "type":"TP_CB_URL_TRANSACTION_REQUEST_AUTH_POST",
    "value":"http://host.docker.internal:6000/thirdpartyRequests/transactions/{ID}/authorizations"
  },
  {
    "type":"TP_CB_URL_TRANSACTION_REQUEST_AUTH_PUT",
    "value":"http://host.docker.internal:6000/thirdpartyRequests/transactions/{ID}/authorizations"
  },
  {
    "type":"TP_CB_URL_TRANSACTION_REQUEST_AUTH_PUT_ERROR",
    "value":"http://host.docker.internal:6000/thirdpartyRequests/transactions/{ID}/authorizations/error"
  },
  {
    "type":"TP_CB_URL_CONSENT_REQUEST_POST",
    "value":"http://host.docker.internal:6000/consentRequests"
  },
  {
    "type":"TP_CB_URL_CONSENT_REQUEST_PUT",
    "value":"http://host.docker.internal:6000/consentRequests/{ID}"
  },
  {
    "type":"TP_CB_URL_CONSENT_REQUEST_PUT_ERROR",
    "value":"http://host.docker.internal:6000/consentRequests/{ID}/error"
  },
  {
    "type":"TP_CB_URL_CREATE_CREDENTIAL_POST",
    "value":"http://host.docker.internal:6000/consentRequests/{ID}/createCredential"
  },
  {
    "type":"TP_CB_URL_CONSENT_POST",
    "value":"http://host.docker.internal:6000/consents"
  },
  {
    "type":"TP_CB_URL_CONSENT_GET",
    "value":"http://host.docker.internal:6000/consent/{ID}"
  },
  {
    "type":"TP_CB_URL_CONSENT_PUT",
    "value":"http://host.docker.internal:6000/consent/{ID}"
  },
  {
    "type":"TP_CB_URL_CONSENT_PUT_ERROR",
    "value":"http://host.docker.internal:6000/consent/{ID}/error"
  }
]
kleyow commented 4 years ago
central-ledger                  | 2020-09-02T23:21:22.218Z - error: ::Cannot read property 'mimeType' of null--P0
central-ledger                  | 2020-09-02T23:21:22.218Z - error: {
central-ledger                  |   "type": "application/json",
central-ledger                  |   "id": "cb24a751-8345-4a91-b559-fb4e7f062e0c",
central-ledger                  |   "content": {
central-ledger                  |     "error": {
central-ledger                  |       "name": "FSPIOPError",
central-ledger                  |       "cause": "TypeError: Cannot read property 'mimeType' of null\n    at parseDecodedDataToJson (/opt/central-ledger/node_modules/@mojaloop/central-services-shared/src/util/streaming/protocol/index.js:246:74)\n    at decodePayload (/opt/central-ledger/node_modules/@mojaloop/central-services-shared/src/util/streaming/protocol/index.js:254:9)\n    at prepare (/opt/central-ledger/src/handlers/transfers/handler.js:106:21)\n    at /opt/central-ledger/node_modules/@mojaloop/central-services-stream/src/kafka/consumer.js:393:25\n    at /opt/central-ledger/node_modules/async/dist/async.js:3201:13\n    at Object.process (/opt/central-ledger/node_modules/async/dist/async.js:1427:21)\n    at /opt/central-ledger/node_modules/async/dist/async.js:1285:23\n    at Immediate._onImmediate (/opt/central-ledger/node_modules/async/dist/async.js:73:45)\n    at processImmediate (internal/timers.js:456:21)",
central-ledger                  |       "apiErrorCode": {
central-ledger                  |         "code": "2001",
central-ledger                  |         "message": "Internal server error",
central-ledger                  |         "name": "INTERNAL_SERVER_ERROR",
central-ledger                  |         "type": {
central-ledger                  |           "regex": "^20[0-9]{2}$",
central-ledger                  |           "description": "Generic Server Error",
central-ledger                  |           "httpStatusCode": 500,
central-ledger                  |           "name": "GENERIC_SERVER_ERROR"
central-ledger                  |         },
central-ledger                  |         "httpStatusCode": 500
central-ledger                  |       },
central-ledger                  |       "httpStatusCode": 500,
central-ledger                  |       "useMessageAsDescription": false,
central-ledger                  |       "message": "Cannot read property 'mimeType' of null",
central-ledger                  |       "stack": "FSPIOPError: Cannot read property 'mimeType' of null\n    at createFSPIOPError (/opt/central-ledger/node_modules/@mojaloop/central-services-error-handling/src/factory.js:198:12)\n    at Object.reformatFSPIOPError (/opt/central-ledger/node_modules/@mojaloop/central-services-error-handling/src/factory.js:319:12)\n    at prepare (/opt/central-ledger/src/handlers/transfers/handler.js:235:46)\n    at /opt/central-ledger/node_modules/@mojaloop/central-services-stream/src/kafka/consumer.js:393:25\n    at /opt/central-ledger/node_modules/async/dist/async.js:3201:13\n    at Object.process (/opt/central-ledger/node_modules/async/dist/async.js:1427:21)\n    at /opt/central-ledger/node_modules/async/dist/async.js:1285:23\n    at Immediate._onImmediate (/opt/central-ledger/node_modules/async/dist/async.js:73:45)\n    at processImmediate (internal/timers.js:456:21)\nTypeError: Cannot read property 'mimeType' of null\n    at parseDecodedDataToJson (/opt/central-ledger/node_modules/@mojaloop/central-services-shared/src/util/streaming/protocol/index.js:246:74)\n    at decodePayload (/opt/central-ledger/node_modules/@mojaloop/central-services-shared/src/util/streaming/protocol/index.js:254:9)\n    at prepare (/opt/central-ledger/src/handlers/transfers/handler.js:106:21)\n    at /opt/central-ledger/node_modules/@mojaloop/central-services-stream/src/kafka/consumer.js:393:25\n    at /opt/central-ledger/node_modules/async/dist/async.js:3201:13\n    at Object.process (/opt/central-ledger/node_modules/async/dist/async.js:1427:21)\n    at /opt/central-ledger/node_modules/async/dist/async.js:1285:23\n    at Immediate._onImmediate (/opt/central-ledger/node_modules/async/dist/async.js:73:45)\n    at processImmediate (internal/timers.js:456:21)"
central-ledger                  |     }
central-ledger                  |   },
central-ledger                  |   "metadata": {
central-ledger                  |     "event": {
central-ledger                  |       "id": "2509e5c0-37b9-4448-8448-4b5081685b32",
central-ledger                  |       "type": "log",
central-ledger                  |       "action": "error",
central-ledger                  |       "createdAt": "2020-09-02T23:21:22.218Z",
central-ledger                  |       "state": {
central-ledger                  |         "status": "failed",
central-ledger                  |         "code": "2001",
central-ledger                  |         "description": "Internal server error"
central-ledger                  |       }
central-ledger                  |     },
central-ledger                  |     "trace": {
central-ledger                  |       "startTimestamp": "2020-09-02T23:21:22.216Z",
central-ledger                  |       "service": "cl_transfer_prepare",
central-ledger                  |       "traceId": "8d68a73de75eabb801559e4f6e16e2a6",
central-ledger                  |       "spanId": "0b8e11091defb171",
central-ledger                  |       "parentSpanId": "b52cb9aa5e148098",
central-ledger                  |       "tags": {
central-ledger                  |         "tracestate": "acmevendor=eyJzcGFuSWQiOiIwYjhlMTEwOTFkZWZiMTcxIiwidGltZUFwaVByZXBhcmUiOiIxNTk5MDg4ODgyMjEyIn0=",
central-ledger                  |         "transactionType": "transfer",
central-ledger                  |         "transactionAction": "prepare",
central-ledger                  |         "transactionId": "d1f281d1-ae19-4f7a-bb99-73ba93534e01",
central-ledger                  |         "source": "dfspa",
central-ledger                  |         "destination": "dfspb",
central-ledger                  |         "payerFsp": "dfspa",
central-ledger                  |         "payeeFsp": "dfspb"
central-ledger                  |       },
central-ledger                  |       "tracestates": {
central-ledger                  |         "acmevendor": {
central-ledger                  |           "spanId": "0b8e11091defb171",
central-ledger                  |           "timeApiPrepare": "1599088882212"
central-ledger                  |         }
central-ledger                  |       }
central-ledger                  |     }
central-ledger                  |   }
central-ledger                  | }

:thinking:

kleyow commented 4 years ago

Oh boy this looks like its going to be rabbit hole... We never validated when we synced central-ledger pisp/master to 10.3.1 -> 10.5.2

This might need a full upgrade of all the pisp services or me isolating where in the switch this mimetype is not getting populated and a github search of "mimetype" in mojaloop org gives me little to go on.

lewisdaly commented 4 years ago

Hmm this is going to be a pain... It looks like something to do with the streaming libraries.

@kleyow is there a specific request this is happening for?

kleyow commented 4 years ago

I believe it's when it's a /transfer request sent to the ml-api-adapter. I might try bumping ml-api-adapter pisp image first...tomorrow. Getting off for the night soon.

sridharvoruganti commented 4 years ago

@kleyow @lewisdaly @eoln

{
    "type":"TP_CB_URL_TRANSACTION_REQUEST_POST",
    "value":"http://host.docker.internal:6000/thirdpartyRequests/transactions"
},
{
    "type":"TP_CB_URL_TRANSACTION_REQUEST_PUT",
    "value":"http://host.docker.internal:6000/thirdpartyRequests/transactions/{ID}"
}

If we populate full path here, then these details are not required in central-shared-services FspEndpointTemplates enum Initial thought was will maintain only host details in DB and path in central-shared-services enum https://github.com/mojaloop/central-services-shared/blob/master/src/enums/endpoints.js#L106

and also changes require in thirdparty-api-adapter, otherwise path will be appended twice. https://github.com/mojaloop/thirdparty-api-adapter/blob/master/src/server/handlers/thirdpartyRequests/transactions.ts#L65 https://github.com/mojaloop/thirdparty-api-adapter/blob/master/src/domain/thirdpartyRequests/transactions.ts#L79

eoln commented 4 years ago

@kleyow @lewisdaly @eoln

{
    "type":"TP_CB_URL_TRANSACTION_REQUEST_POST",
    "value":"http://host.docker.internal:6000/thirdpartyRequests/transactions"
},
{
    "type":"TP_CB_URL_TRANSACTION_REQUEST_PUT",
    "value":"http://host.docker.internal:6000/thirdpartyRequests/transactions/{ID}"
}

If we populate full path here, then these details are not required in central-shared-services FspEndpointTemplates enum Initial thought was will maintain only host details in DB and path in central-shared-services enum https://github.com/mojaloop/central-services-shared/blob/master/src/enums/endpoints.js#L106

and also changes require in thirdparty-api-adapter, otherwise path will be appended twice. https://github.com/mojaloop/thirdparty-api-adapter/blob/master/src/server/handlers/thirdpartyRequests/transactions.ts#L65 https://github.com/mojaloop/thirdparty-api-adapter/blob/master/src/domain/thirdpartyRequests/transactions.ts#L79

Oh my gosh, rabbit holes everywhere...

lewisdaly commented 4 years ago

Thanks for pointing this out @sridharvoruganti - yeah I think we just want to keep the hostname here, and rely on the FspEndpointTemplates to enforce the structure.

kleyow commented 4 years ago

Ok. Removed the paths from the values. Updated services to fix the broken tests. todo: update every other service so we don't drag behind master branches too much. @eoln @lewisdaly @sridharvoruganti