Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bulk transfers support in sdk-scheme-adapter (mojaloop-simulator) #1325

Closed
31 of 37 tasks
elnyry-sam-k opened this issue May 5, 2020 · 1 comment
Closed
31 of 37 tasks
Assignees
Labels
oss-core This is an issue - story or epic related to a feature on a Mojaloop core service or related to it story
Milestone

Comments

@elnyry-sam-k
Copy link
Member

elnyry-sam-k commented May 5, 2020

Goal:

As an FSP / Mojaloop Switch
I want the sdk-scheme-adapter component to support Bulk Transfers end-points and related functionality
so that I can use it for QA and Validation of Bulk transfers (including mojaloop-simulator)

Tasks:

  • Analyze sdk-scheme-adapter codebase to verify bulk transfers support [@oderayi]
    • Bulk transfers is currently not supported in scheme-adapter
  • Validate if Design is needed and include if needed [@oderayi]
    • Design added as comment below
  • Implement support for bulk quotes and bulk transfers [@oderayi]
    • POST /bulkTransfers (test-api) [@oderayi]
    • PUT /bulkTransfers/{ID} (test-api)
    • POST /bulkQuotes (FSP backend) [@oderayi]
    • POST /bulkTransfers (FSP backend) [@oderayi]
    • POST /bulkQuotes (Inbound scheme-adapter) [@oderayi]
    • PUT /bulkQuotes/{ID} (Inbound scheme-adapter) [@oderayi]
    • PUT /bulkQuotes/{ID}/error (Inbound scheme-adapter) [@oderayi]
    • PUT /bulkTransfers/{ID} (Inbound scheme-adapter) [@oderayi]
    • PUT /bulkTransfers/{ID}/error (Inbound scheme-adapter) [@oderayi]
    • GET /bulkTransfers/{ID} (Inbound scheme-adapter) [@oderayi]
    • POST /bulkTransfers (Inbound scheme-adapter) [@oderayi]
    • POST /bulkQuotes (test-api) [@oderayi]
    • PUT /bulkTransfers/{ID} (Outbound scheme-adapter)
    • POST /bulkQuotes (Outbound scheme-adapter) [@oderayi]
    • POST /bulkTransfers (Outbound scheme-adapter)[@oderayi]
    • GET /bulkTransfers/{ID} (Outbound scheme-adapter)
  • Unit tests/test coverage fixes [@oderayi]
    • Simulator tests (FSP backend)
      • models/bulkQuotes.js [@oderayi]
      • models/bulkTransfers.js
      • handlers.js
    • Test-API tests
      • Bulk quotes scenario test
      • Bulk transfers scenario test
    • Scheme-adapter tests
  • Local testing/validation
  • QA - postman tests
  • Update helm scripts to support changes and for deployment
  • Deploy on dev2 and validate

Acceptance Criteria:

  • Designs are up-to date
  • Unit Tests pass
  • Integration Tests pass
  • Code Style & Coverage meets standards
  • Changes made to config (default.json) are broadcast to team and follow-up tasks added to update helm charts and other deployment config.
  • sdk-scheme-adapter supports /bulkTransfers end-points and related functionality

Pull Requests:

Follow-up:

Dependencies:

  • N/A

Accountability:

  • Owner: TBC
  • QA/Review: TBC
@elnyry-sam-k elnyry-sam-k added this to the Sprint 10.2 milestone May 5, 2020
@oderayi oderayi self-assigned this May 5, 2020
@oderayi
Copy link

oderayi commented May 11, 2020

Initial Design for Bulk Transfers Support in SDK Scheme Adapter and Mojaloop Simulator

Inbound API (sdk-scheme-adapter)

The inbound API of the scheme adapter accepts and processes requests from the Switch to facilitate transfers and other operations between the Switch and the DFSP backend.
The following endpoints will be implemented to support bulk transfers:

  • POST /bulkQuotes
  • POST /bulkTransfers
    Accepts and processes requests for creating new bulk transfers.
  • PUT /bulkTransfers/{ID}
    Accepts and processess callbacks from ealier requested bulk transfers creation or information request.
  • PUT /bulkTransfers/{ID}/error
    Accepts and processes error callbacks from ealier requested bulk transfers creation or information.

Outbound API (sdk-scheme-adapter)

The outbound API of the scheme adapter accepts and processes requests from the DFSP backend system to the Switch to facilitate transfers and other operations.
The following endpoints will be implemented to support bulk transfers:

  • POST /bulkQuotes
  • POST /bulkTransfers
    Initiates a bulk transfer to payees' DFSP through the Switch. This will comprise of all the three stages involved in a transfer (namely parties lookup, quoting, and actual transfer).
    This endpoint will support both synchronous and asynchronous modes to allow pausing and resuming of transfers at each stage determined by the value of respective environment variables (i.e AUTO_ACCEPT_PARTIES, AUTO_ACCEPT_QUOTES), and to allow DFSPs freedom to implement against the sdk-scheme-adapter as they see fit.
  • PUT /bulkTransfers/{ID}
    Continues a bulk transfer previously paused at the party lookup or quoting stage.
  • GET /bulkTransfers/{ID}
    Retireves information for a specific bulk transfer.

DFSP backend (Mojaloop Simulator)

These are inbound requests from the sdk-scheme-adapter to the DFSP backend that needs to be implemented at the DFSP backend to support bulk transfers.
The following endpoints will be implemented:

  • POST /bulkTransfers
    Accepts and processes incoming request to transfer funds between an external account and internal accounts.

General Considerations/Note

  • Inbound requests are cached if the scheme adapter is running in test mode, determined by an environment variable.
  • Outbound request handlers set up subscriber on a pubsub queue topic per request (where applicable) to handle callback from peer.
  • Subscriptions are carefully unsubscribed to prevent memory leaks.
  • Switch-bound requests are implemented in the sdk-standard-components. New requests for the switch should be implemented there for easy maintainance.

@elnyry-sam-k elnyry-sam-k added the oss-core This is an issue - story or epic related to a feature on a Mojaloop core service or related to it label Jul 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
oss-core This is an issue - story or epic related to a feature on a Mojaloop core service or related to it story
Projects
None yet
Development

No branches or pull requests

2 participants