georgend / thirdparty-scheme-adapter

Thirdparty Scheme Adapter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mojaloop Thirdparty Scheme Adapter

Git Commit Git Releases CircleCI

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

Quick Start

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

  1. Clone repo

    git clone git@github.com:mojaloop/thirdparty-api-adapter.git
  2. Install dependencies

    npm install
  3. Modify the hosts to setup local DNS for Redis

    127.0.0.1 redis
  4. Start Redis container through docker-compose in a separate terminal window

    docker-compose up redis
  5. 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
  6. 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

Inbound & Outbound API

This package delivers implementation Inbound and Outbound API services which will be used by Thirdparty to integrate with Mojaloop Switch

Inbound API

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

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.

Integration Test

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

Contribution

Read the contributing.md doc

About

Thirdparty Scheme Adapter

License:Other


Languages

Language:TypeScript 94.4%Language:JavaScript 3.5%Language:Shell 1.7%Language:Gherkin 0.2%Language:Dockerfile 0.2%