Knowledgebase
Knowledgebase : R1 Middleware (Hydra)

Payaza Export Integration

This integration involves the following parts:

  • MTMS:
    • import of entities from XLSX file
    • web service user(s) set up
  • Middleware: configuration to pull from MTMS

Prerequisites:

Please provide us with the below from Payaza:

{

"pin": "1234",

"api_token": "XXXX",

"tenant_id": "test"

}

Import entities

When setting up a client, Payaza will give a XLSX file having one sheet for each country and transfer type.

At May 2024 Payaza is covering

  • Bank Transfers to Nigeria, Ghana and Kenya
  • Mobile Transfers to Ghana, Kenya, Uganda and Tanzania.

- To import the entities please open a terminal, go to the folder of mtms10 system and type the following command:

php bin/integration payaza:import-entities

The script will ask the relative path for the spreadsheet, so it does not need to be provided as argument; the standard file, as provided by Payaza, is available in scripts/integrations/payaza/payaza_banks_mobile.xlsx.

The script will provide to create the destination countries, processing banks, delivery banks and branches and the mobile network operators as needed.

The process will be tracked on the screen while executing, and all the activity will be recorded in the file logs/payaza_entity_import.log.

- Add PayAza Proc bank prefix onto the config_state_machine.json on the "BANKS_TO_HQOK".

- If this is the first time you enable a Middleware integration in the ARM on system configuration settings, search "Bank_see" and you need to make sure the 7 configs are all set to true, as per screenshot below

Web Service users

When the countries, processing banks and connected entities have been imported, we have to create one web service user for each processing bank related to Payaza.

This can be achieved in ARM: connect as admin, go to Admin→Web Service Users and add a new user connected to the Processing Bank.
Repeat the operation for each Processing Bank involved in the integration.

Middleware

In Middleware the steps to follow are:

  • Create a client connected to the MTMS system
  • Create an integration with the parameters to configure as template
  • Create an association between the client and the integration, and set the correct values for the configuration parameters

To create a new client, you have to connect to the middleware, go to Clients on the left side menu, click on "Add Client" and fill the fields in.
The URL is the URL of the MTMS system to pull the transactions from.

The next step will be to create an association between the client and the integration: this can be done clicking on Client Integrations on the left side menu, and then click on the button Add Client Integrations.

The screen will allow you to choose the client from the first dropdown (ideally the client just created), and Payaza from the dropdown of the integrations.

After that please set the right values in the available textareas: the first one will host the information relative to the web service user that will connect to the MTMS system, the second will have the parameters to export the transactions to Payaza.

{

"pin": "1234",

"api_token": "XXXX",

"tenant_id": "test"

}

You have also to set the name of the processing bank to select the transactions, and enable the association.

Then press Create on the top right side of the screen.

If the cron jobs are running automatically, then transactions will be visible in the page Transactions when the pull is happening periodically.

ARM portal

1. Create the processing bank in the destination country. If the integration is for multiple processing banks in different countries of the same bank, then create a super bank and link the processing banks to the super bank.
2. Create a web service bank user and associate it with the processing bank. If using the super bank then create a web service super bank user and associated with the super bank.
3. Use the bank name (Bank Abbreviated name) to configure the config_state_machine.json. Add the bank name to the modify_state_machine under the BANKS_TO_HQOK. Run config_update.php

Hydra Portal

Log in to the Hydra middleware at https://hydra.remitone.com. Speak to Sharfaz if you do not have login credentials.

1. Click on the Client link

2. Add new client

3. Fill in the new client profile

4. Create the new client profile

5. Create the client integration with the payout bank

6. Set and save the configuration of the R1 client with the payout bank.

Flutterwave Export Integration

This export integration was done on the middleware.

Configure the Flutterwave config on the mts as below:

config_3rdparty
"CONFIG_FLUTTERWAVE_EXPORT":{
"enabled":true,
"processing_bank_prefix": "FLUTTERWAVE-",
"entity_import_countries": ["NG", "GH", "KE"], //Supported countries - EG, ET, GH, KE, MW, NG, RW, SL, TZ, UG, US, ZA
"export_entities_cron_frequency": "0 0 * * *",
"hydra_credentials": {
"base_url": {hydra url},
"username": {hydra username},
"password": {hydra password}
}
},

config_state_machine
"modify_state_machine":{
"BANKS_TO_HQOK":[
  "FLUTTERWAVE-",
  ....
],
...
}

Run bin/integration flutterwave:import-entities

MTMS Configuration

1.1. Configuring entities 

To configure the MTMS for the WHISH integration, the following entities need to be created.

WHISH is based in Lebanon and make sure you setup the destination countries and necessary MTMS setup if that is not available. See PayOnlime test or production for more details.

  • the available destination countries, 
  • a processing bank for each country. When making Proc Bank, make sure to check process unprocessed cash collection transaction option if proc bank required to import cash collection transaction.
  • a delivery bank with one (any) branch for each country
  • A collection point connecting to delivery bank
  • Mobile network operator for the delivery bank

Supported Transfer Types

  • Cash Collection
  • Mobile Transfer

1.2. Web Service user

A web service user needs to be created for the processing bank. 

To do so, connect as admin in ARM, go to Admin menu → Web Service Users and click on Add Web Service User. Give all the permissions. Make sure to make a note of the username and password we need this to update Middleware system

1.3. Update state machine configurations

To update all the WHISH transactions to HQ_OK, add a record to custom/config/config_state_machine.json under modify_state_machine

{
    "modify_state_machine": {
        "BANKS_TO_HQOK": [
            "WHISH-"
        ]
    }
}

1.4. Update System settings

Please make sure following options to be enabled/true.