This package provides a Thirdparty (PISP) scheme adapter that interfaces between a Mojaloop API compliant switch and a Thirdparty backend platform that does not natively implement the Mojaloop API.
The API between the scheme adapter and the Thirdparty backend is synchronous HTTP while the interface between the scheme adapter and the switch is native Mojaloop API.
This package exemplifies the use of the Mojaloop SDK Standard Components for TLS, JWS and ILP and is should be use together with mojaloop/sdk-scheme-adapter
The steps shown below illustrate setting up the Mojaloop Thirdparty Scheme Adapter locally and how to run Inbound and Outbound API services listening on
localhost
-
Clone repo
git clone git@github.com:mojaloop/thirdparty-api-adapter.git
-
Install dependencies
npm install
-
Modify the hosts to setup local DNS for Redis
127.0.0.1 redis
-
Start Redis container through docker-compose in a separate terminal window
docker-compose up redis
-
Start Inbound API server
npm run start:inbound
then visit in your web browser http://localhost:4005/health
In case to start the test environment
NODE_ENV=test npm run start:inbound
-
Start Outbound API server
npm run start:outbound
then visit in your web browser http://localhost:4006/health
In case to start the test environment
NODE_ENV=test npm run start:outbound
This package delivers implementation Inbound and Outbound API services which will be used by Thirdparty to integrate with
Mojaloop Switch
Inbound API
service is called by Mojaloop Switch
.
Its responsibility is to forward calls to Thirdparty Backend
or help to deliver synchronous response for calls initiated by Thirdparty backend
on Outbound API
Outbound API
service is used by Thirdparty backend
to make a call to Mojaloop Switch
Its responsibility is to transform asynchronous Mojaloop API native interface's set of calls to a synchronous call.
To run integration tests, first start docker-compose
inside docker
folder in a separate window.
cd docker
docker-compose build && docker-compose up
Then run the following command
npm run test:integration
Read the contributing.md doc