PHPackages                             enterness/fbns-complement - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. enterness/fbns-complement

ActiveLibrary[HTTP &amp; Networking](/categories/http)

enterness/fbns-complement
=========================

A PHP client for the FBNS built on top of ReactPHP

1.0(6y ago)06MITPHPPHP ~5.6|~7.0

Since Sep 30Pushed 6y ago1 watchersCompare

[ Source](https://github.com/ENTERness/fbns_complement)[ Packagist](https://packagist.org/packages/enterness/fbns-complement)[ RSS](/packages/enterness-fbns-complement/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

fbns-react
==========

[](#fbns-react)

A PHP client for the FBNS built on top of ReactPHP.

Requirements
------------

[](#requirements)

You need to install the [GMP extension](http://php.net/manual/en/book.gmp.php) to be able to run this code on x86 PHP builds.

Installation
------------

[](#installation)

```
composer require valga/fbns-react
```

Basic Usage
-----------

[](#basic-usage)

```
// Set up a FBNS client.
$loop = \React\EventLoop\Factory::create();
$client = new \Fbns\Client\Lite($loop);

// Read saved credentials from a storage.
$auth = new \Fbns\Client\Auth\DeviceAuth();
try {
    $auth->read($storage->get('fbns_auth'));
} catch (\Exception $e) {
}

// Connect to a broker.
$connection = new \Fbns\Client\Connection($deviceAuth, USER_AGENT);
$client->connect(HOSTNAME, PORT, $connection);

// Bind events.
$client
    ->on('connect', function (\Fbns\Client\Lite\ConnectResponsePacket $responsePacket) use ($client, $auth, $storage) {
        // Update credentials and save them to a storage for future use.
        try {
            $auth->read($responsePacket->getAuth());
            $storage->set('fbns_auth', $responsePacket->getAuth());
        } catch (\Exception $e) {
        }

        // Register an application.
        $client->register(PACKAGE_NAME, APPLICATION_ID);
    })
    ->on('register', function (\Fbns\Client\Message\Register $message) use ($app) {
        // Register received token with an application.
        $app->registerPushToken($message->getToken());
    })
    ->on('push', function (\Fbns\Client\Message\Push $message) use ($app) {
        // Handle received notification payload.
        $app->handlePushNotification($message->getPayload());
    });

// Run main loop.
$loop->run();
```

Advanced Usage
--------------

[](#advanced-usage)

```
// Set up a proxy.
$connector = new \React\Socket\Connector($loop);
$proxy = new \Clue\React\HttpProxy('username:password@127.0.0.1:3128', $connector);

// Disable SSL verification.
$ssl = new \React\Socket\SecureConnector($proxy, $loop, ['verify_peer' => false, 'verify_peer_name' => false]);

// Enable logging to stdout.
$logger = new \Monolog\Logger('fbns');
$logger->pushHandler(new \Monolog\Handler\StreamHandler('php://stdout', \Monolog\Logger::INFO));

// Set up a client.
$client = new \Fbns\Client\Lite($loop, $ssl, $logger);

// Persistence.
$client->on('disconnect', function () {
    // Network connection has been closed. You can reestablish it if you want to.
});
$client->connect(HOSTNAME, PORT, $connection)
    ->otherwise(function () {
        // Connection attempt was unsuccessful, retry with an exponential backoff.
    });
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2418d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/00c9123f200e5a89c2a51cdaf76b7dbd2d741ef7646bd1610a8a94fc99229308?d=identicon)[alissonpelizaro](/maintainers/alissonpelizaro)

---

Top Contributors

[![alissonpelizaro](https://avatars.githubusercontent.com/u/26612874?v=4)](https://github.com/alissonpelizaro "alissonpelizaro (3 commits)")

---

Tags

phpclientFBNS

### Embed Badge

![Health badge](/badges/enterness-fbns-complement/health.svg)

```
[![Health](https://phpackages.com/badges/enterness-fbns-complement/health.svg)](https://phpackages.com/packages/enterness-fbns-complement)
```

###  Alternatives

[valga/fbns-react

A PHP client for the FBNS built on top of ReactPHP

15751.3k19](/packages/valga-fbns-react)[ismaeltoe/osms

PHP library wrapper of the Orange SMS API.

4540.0k](/packages/ismaeltoe-osms)[ebics-api/ebics-client-php

PHP library to communicate with bank through EBICS protocol.

6411.1k](/packages/ebics-api-ebics-client-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
