Skip to content

Repository for the payment hub for integration with external payment platforms like Mojaloop

License

Notifications You must be signed in to change notification settings

openMF/payment-hub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

payment-hub

Repository to house the payment hub for integration with external payment schemas like Mojaloop, GSMA and MTN Uganda.

Payment Hub is the component, which connects DFSPs to switches. In our case, it connects Fineract CN to Mojaloop, and Fineract v1.2 to Mojaloop. The Payment Hub communicates with the Fineract versions via REST API. To support the calls and actions, both Fineract versions had to be upgraded.

Build

Put a settings.xml into your ~/.m2 directory with the following content:

<?xml version="1.0" encoding="UTF-8"?>
<settings xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd" xmlns="http://maven.apache.org/SETTINGS/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <servers>
      <server>
      <username>mb-gatesprojects</username>
      <password>ModusBox</password>
      <id>modusbox-release-local</id>
    </server>
  </servers>
  <profiles>
    <profile>
      <repositories>
        <repository>
          <id>central</id>
          <name>Central Repository</name>
          <url>http://repo.maven.apache.org/maven2</url>
          <layout>default</layout>
          <snapshots><enabled>false</enabled></snapshots>
        </repository>
        <repository>
          <snapshots><enabled>false</enabled></snapshots>
          <id>modusbox-release-local</id>
          <name>libs-release</name>
          <url>https://modusbox.jfrog.io/modusbox/libs-release</url>
        </repository>
      </repositories>
      <pluginRepositories>
        <pluginRepository>
          <id>central</id>
          <name>Central Repository</name>
          <url>http://repo.maven.apache.org/maven2</url>
          <layout>default</layout>
          <snapshots><enabled>false</enabled></snapshots>
          <releases><updatePolicy>never</updatePolicy></releases>
        </pluginRepository>
        <pluginRepository>
          <snapshots><enabled>false</enabled></snapshots>
          <id>modusbox-plugin-release</id>
          <name>plugins-release</name>
          <url>https://modusbox.jfrog.io/modusbox/plugins-release</url>
        </pluginRepository>
      </pluginRepositories>
      <id>artifactory</id>
    </profile>
  </profiles>
  <activeProfiles>
    <activeProfile>artifactory</activeProfile>
  </activeProfiles>
</settings>

Navigate to the sources folder in the payment-hub project and run the following:

mvn clean package

Deploy

Copy the paymenthub/sources/payment-hub/target/payment-hub-1.0.0-SNAPSHOT.jar file to your working directory.

Copy the application.yml file from work folder to the same working directory, and update its config. It is not included in the build jar file, to make it easily editable.

FSP - Fineract 1.X settings

fsp-settings:
  ilp-secret: h4on38bsDjKiat2783gnklgafikmeuu5123kpobb7jm99
  auth:
    profile: BASIC # NONE, BASIC, BASIC_TWOFACTOR, OAUTH, OAUTH_TWOFACTOR
    encode: NONE # NONE, BASE64
    login-class: hu.dpc.rt.psp.dto.fsp.LoginFineractXResponseDTO
  headers:
  - name: user
    key: User
  - name: tenant
    key: Fineract-Platform-TenantId
  operations: #hub -> fsp
  - name: operation-basic-settings
    user: mifos
    password: password
    host: http://localhost
    port: 8080
  - name: auth #login
    base: fineract-provider/api/v1/authentication
  - name: requests
    base: fineract-provider/api/v1/interoperation/requests
  - name: parties
    base: fineract-provider/api/v1/interoperation/parties
  - name: quotes
    base: fineract-provider/api/v1/interoperation/quotes
  - name: transfers
    base: fineract-provider/api/v1/interoperation/transfers

FSP - Fineract CN settings

fsp-settings:
  ilp-secret: llklokklsllakkskksnnqweq6665446a6sd4asdlkjaf
  auth:
    profile: OAUTH # NONE, BASIC, BASIC_TWOFACTOR, OAUTH, OAUTH_TWOFACTOR
    encode: BASE64 # NONE, BASE64
    login-class: hu.dpc.rt.psp.dto.fsp.LoginFineractCnResponseDTO
  headers:
  - name: user
    key: User
  - name: tenant
    key: X-Tenant-Identifier
  operations: #hub -> fsp
  - name: operation-basic-settings
    user: interopUser
    password: intop@d1
    host: http://payments.dpc.hu
    port: 80 #2034
  - name: auth #login
    port: 80 #2021
    base: /identity/v1/token
  - name: requests
    base: /interoperation/v1/transactions
  - name: parties
    base: /interoperation/v1/parties
  - name: quotes
    base: /interoperation/v1/quotes
  - name: transfers
    base: /interoperation/v1/transfers

OTT - GSMA Settings

ott-settings:
  cors-enabled: true
  apikey: u8YfSQNnNsGFAaqRm3sGShpO2ywLRJgs
  operations: #hub -> ott
  - name: operation-basic-settings
    host: https://sandbox.mobilemoneyapi.io/simulator/v1.0/mm
    tenants:
    - name: tn03
      port: 48888
    - name: tn04
      port: 48889
  - name: transactions
    base: transactions
  - name: accounts
    base: accounts
  bindings: #ott -> hub
  - name: binding-basic-settings
    host: http://0.0.0.0
    port: 58080
  - name: merchantpayment # post merchant payment
    base: merchantpayment
  - name: transfer # post peer-to-peer transfer
    base: transfer

Currently, the basic transaction use cases - Merchant Payment and Peer-To-Peer transfer - have been integrated with the Payment Hub.

About

Repository for the payment hub for integration with external payment platforms like Mojaloop

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages