PHPackages                             currency-fair/integration-brazilian-bank - 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. [API Development](/categories/api)
4. /
5. currency-fair/integration-brazilian-bank

ActiveLibrary[API Development](/categories/api)

currency-fair/integration-brazilian-bank
========================================

The integration example with a Brazilian bank.

037PHPCI failing

Since Jan 26Pushed 6y ago1 watchersCompare

[ Source](https://github.com/gabrielanhaia/currency-integration-brazilian-bank)[ Packagist](https://packagist.org/packages/currency-fair/integration-brazilian-bank)[ RSS](/packages/currency-fair-integration-brazilian-bank/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

[![CircleCI](https://camo.githubusercontent.com/98b2752a8697c89ca928b1f3252eae5e066bbe9b5e22400a7e5f29673093c191/68747470733a2f2f636972636c6563692e636f6d2f67682f6761627269656c616e686169612f63757272656e63792d696e746567726174696f6e2d6272617a696c69616e2d62616e6b2f747265652f6d61737465722e7376673f7374796c653d737667)](https://circleci.com/gh/gabrielanhaia/currency-integration-brazilian-bank/tree/master)

Integration with an Brazilian bank (example for transactions in Euro)
=====================================================================

[](#integration-with-an-brazilian-bank-example-for-transactions-in-euro)

Description
-----------

[](#description)

This is a package created by me for making transactions with an Brazilian bank. All transactions in Euro are processed by the Brazilian bank.

The files follow the same structure as [Integration Irish Bank](https://github.com/gabrielanhaia/currency-integration-irish-bank). The idea was to create an easier structure for all developers in a team to integrate with another platform/API quickly, easy to test, easy to extend and change the behavior while also using design patterns and object orientation.

Files` Structure
----------------

[](#files-structure)

`Integration`: All files of the integration are in this folder.

`Integration\Contract`: The main interefaces of the project are in this folder. In a real project, we should have another package as a main package in which we could centralize some interfaces.

`Integration\Entity`: These classes are representations of the objects sent or retrieved by the API. They are the only thing known by the project that are using it. We could say that it is an implementation of the famous DTO (Data transfer object).

`Integration\Exception`: Exceptions created specifically by this integration. They could be caught by who is using it.

`Integration\Factory`: This folder has all the factories to simplify the creation of the "parser", "formatter" and "requester". They are implementations of the "Simple Factory", and they are really simple (with switches), however, I don't think it was necessary to implement the "Factory method", it would increase the complexity (with loads of classes) and I am sure that the number of the parsers, formatters, and requesters won't increase so much.

`Integration\Formatter`: The idea behind a formatter is to convert an object (Entity) to JSON, XML or any form you would like. These formatted objects will be sent by the API.

`Integration\Parser`: The idea behind a parser is almost the same as the formatters, however, the parsers are for converting the response of the API to Entities known by the client that uses these packages as a dependency.

`Integration\Requester`: Requesters are classes responsible for making the requests with the APIs, we should have one for each endpoint. They have an instance of the Guzzle Http, but this part would be improved (unfortunately I didn't have time for implementing it). I think the HTTP client should be in the main package of the integration (not implemented).

`Client`: This class works as a Facade, it is through this class that the package is used. It is exactly as a Facade pattern, we call methods that group the parsers, formatters, and requesters.

`tests`: It's here all unit tests for this package. I think it is with a good coverage.

How do i use it?:
-----------------

[](#how-do-i-use-it)

`composer require gabrielanhaia/currency-integration-brazilian-bank`

Note: It will not be necessary to do that, I had already added as a dependency.

Running the unit tests
----------------------

[](#running-the-unit-tests)

`composer install`
`php vendor/bin/phpunit`

Notes
-----

[](#notes)

1. I had already develop a structure similar to that, but much bigger. This structure is working today in a E-commerce that integrates with more than 200 different kinds of API's.
2. The CircleCi is running the build and the Unit tests.

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/70de9e48cd27f693c91e0b91c3afd82adf08d817cd5128a8b8b43f4431d6f7b4?d=identicon)[gabrielanhaia](/maintainers/gabrielanhaia)

---

Top Contributors

[![gabrielanhaia](https://avatars.githubusercontent.com/u/15172908?v=4)](https://github.com/gabrielanhaia "gabrielanhaia (49 commits)")

### Embed Badge

![Health badge](/badges/currency-fair-integration-brazilian-bank/health.svg)

```
[![Health](https://phpackages.com/badges/currency-fair-integration-brazilian-bank/health.svg)](https://phpackages.com/packages/currency-fair-integration-brazilian-bank)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

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