Skip to content

Commit

Permalink
Sample PHP Project (#237)
Browse files Browse the repository at this point in the history
* feat: PHP sample project

* feat: add readme for php

* refactor: change method for getting json file

* refactor: src/Bank

---------

Co-authored-by: Guilherme Branco Stracini <guilherme@guilhermebranco.com.br>
  • Loading branch information
AmolKumarGupta and guibranco committed Jun 29, 2023
1 parent c4d1b26 commit c17fd24
Show file tree
Hide file tree
Showing 8 changed files with 667 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -386,3 +386,5 @@ FodyWeavers.xsd
pullRequest.txt

/vendor/
vendor
composer.lock
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"license": "MIT",
"autoload": {
"psr-4": {
"Guibranco\\BancosBrasileiros\\": ["data/", "schemas/"]
"Guibranco\\BancosBrasileiros\\": ["data/", "schemas/", "src/"]
}
},
"authors": [
Expand Down
62 changes: 62 additions & 0 deletions examples/php/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Bancos Brasileiros

Brazilian commercial banks list


***Para a versão em português do README.md, [siga me](/README.pt-br.md) por favor.***



# Installation

```
composer require guibranco/bancos-brasileiros
```

# Docs

create a `index.php`

```php
require __DIR__ . '/vendor/autoload.php';

use Guibranco\BancosBrasileiros\Bank;

$banks = Bank::all(); // return collection of bank

// show in UI
```


Start a local server in the same directory.

```
php -S localhost:8080
```


### Available data

Each of the Collection has the following information (schema):

| Column | Description | Observations |
|-------------------|:---------------------------------------:|:--------------------------------------------------------------------------:|
| COMPE | Code - COMPE | 3 digits |
| ISPB | Code - ISPB | 8 digits |
| Document | Document - CNPJ | 14 numbers - 18 digits (formatted) |
| LongName | Long name | According to BACEN - STR |
| ShortName | Short name | According to BACEN - STR|
| Network | Network | RSFN, Internet, null |
| Type | Type | commercial, multiple, savings, null |
| PixType | Type of PIX/SPI participant | DRCT - Directly, INDR - Indirectly, null |
| Charge | If does charge operations | true, false, null |
| CreditDocument | If does DOC/TED operations | true, false, null |
| SalaryPortability | If does/accept salary portability | "Banco folha e Destinatário" - both operations, "Destinatário" - only receive, null |
| Products | List of products offered | In portuguese only |
| Url | Website | - |
| DateOperationStarted | Commercial operation start date | - |
| DatePixStarted | PIX operation start date | Only for those PSP of SPI |
| DateRegistered | Registration date on schema | - |
| DateUpdated | Change date on schema | - |

---
Loading

0 comments on commit c17fd24

Please sign in to comment.