PHP code example of moay / php-fints-database

1. Go to this page and download the library: Download moay/php-fints-database library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

moay / php-fints-database example snippets


// Get an array of banks with their data. Search is performed on
// BLZ, name, location and organization.
$banks = moay\FintsDatabase\FintsDatabase::search('xyz');

// Get the first bank
$bank = $banks[0];

// Get a bank directly by it's ID
$bank = moay\FintsDatabase\FintsDatabase::getBankById(12);

// Search by short name
$banks = moay\FintsDatabase\FintsDatabase::search('DKB');

// Search by name
$banks = moay\FintsDatabase\FintsDatabase::search('Deutsche Kreditbank');

// Search by BLZ
$banks = moay\FintsDatabase\FintsDatabase::search('12030000');
$banks = moay\FintsDatabase\FintsDatabase::search('120 300 00');
$banks = moay\FintsDatabase\FintsDatabase::search('120-300-00');

$banks = moay\FintsDatabase\FintsDatabase::search('12345678');
if (count($banks) == 1) {
    $bank = $banks[0];
    
    $id = $bank->getId();
    $blz = $bank->getBlz();
    $name = $bank->getName();
    $organization = $bank->getOrganization(); // Probably the banks short name or organization
    $location = $bank->getLocation();
    
    $hbciUrl = $bank->getHbciUrl();
    $hbciIp = $bank->getHbciIp();
    $hbciVersion = $bank->getHbciVersion();
    $hbciUrlWithFallback = $bank->getHbciUrlOrIp();
    
    $pinTanUrl = $bank->getPinTanUrl();
    $fintsVersion = $bank->getFintsVersion();
    
    $supportedTechnologies = $bank->getSupportedTechnologies();
    
    // Check for supported security mechanisms:
    if ($bank->supports('pinTan') {
        //...
    }
}

   $database = new moay\FintsDatabase\Database\Database();
   
   // Use search parameters to exclude fields from search. All 4 parameters default to true.
   $banks = $database->search(string, [searchBlz], [searchName], [searchLocation], [searchOrganization]);
    
   $database = new moay\FintsDatabase\Database\Database('absolute/path/database.json');