Interfaces
Refer to the Technical architecture. As shown in the figure, all outward APIs towards a Sponsor bank are abstracted through an interface. This interface is in the library project - openg2p-g2p-bridge-bank-connectors
There is also an implementation of the interface (openg2p-g2p-bridge-example-bank-connector), that provides a reference implementation. This connector connects to a simulator application. The simulator application (openg2p-g2p-bridge-example-bank-api) simulates a Sponsor bank.
The interface, the connector factory and the example-bank-connector - together are packaged into a separate git repository - openg2p-g2p-bridge-example-bank
The interface defines the following APIs
1. check_funds
returns
2. block_funds
returns
3. initiate_payment
It will take a collection of the following structure (payment structure)
This API will only acknowledge receipt of a payment instruction. The actual payment will be effected by the bank asynchronously
returns
4. retrieve_disbursement_id
returns
5. retrieve_beneficiary_name
returns
6. retrieve_reversal_reason
returns
Bank Connector Factory
This Factory will return a BankConnector Interface
This BankConnector class will implement the BankConnector Interface
The Factory will return the Connector based on the "benefit_program.sponsor_bank_code"
def get_bank_connector (sponsor_bank_code : string) -> BankConnectorInterface
Example Bank Connector
The git baseline includes a connector that connects with the Example Bank (a bank simulator application). The Example Bank Connector - implements all the methods specified by the BankInterface
Last updated