openfintech/php-sdk

This package is abandoned and no longer maintained. No replacement package was suggested.

Library for openfintech api

0.1.4 2018-02-02 17:50 UTC

This package is not auto-updated.

Last update: 2018-08-27 09:32:29 UTC


README

Build Status Quality Score Coverage Status Latest Version on Packagist Total Downloads Software License

OpenFinTech.io is an open database that comprises of standardized primary data for FinTech industry. It contains such information as geo-location data (countries, cities, regions), organizations, currencies (national, digital, virtual, crypto), banks, digital exchangers, payment providers (PSP), payment methods, etc. It is created for communication of cross-integrated micro-services on "one language". This is achieved through standardization of entity identifiers that are used to exchange information among different services.

Install

To install the latest version of this library, run the command below:

$ composer require openfintech/php-sdk

This sdk uses woohoolabs/yang library.

Basic usage

Available resources:

  1. Banks
  2. Countries
  3. Currencies
  4. CurrencyIssuers
  5. Exchangers
  6. OrganizationIndustries
  7. Organizations
  8. PaymentMethods
  9. PaymentMethodIssuers
  10. PaymentProviders

$organizationResource =  new \Oft\Client\Resources\Organizations();

$organizations = [];

$attributes = [];

// Get resource iterator

foreach ($organizationResource->getResources() as $organization) {

    $organizations[] = $organization->toArray();

    $attributes[] = $organization->attributes();
    
    $relationship = $organization->relationship('active_in_countries')->toArray();

}

Usage without service

$apiService = new \Oft\Client\ApiService(\Oft\Client\Resources\Exchangers::RESOURCE_URL);
$elements = [];

$attributes = [];

foreach ($apiService->getResources() as $exchanger) {

    $elements[] = $exchanger->toArray();

    $attributes[] = $exchanger->attributes();

    $organizationData = $exchanger->relationship('organization')->toArray();

}

Get single resource

$apiService = new \Oft\Client\ApiService(Oft\Client\Resources\Banks::RESOURCE_URL);

$bank = $apiService->getResource('bnk_PQeP6WNubMpqZqGa'); 

$bankArray = $bank->toArray();

$bankAttr  = $bank->attributes();


Api documentation

For more details go to official site openfintech.io

License

The MIT License (MIT). Please see License File for more information.