This repository was archived by the owner on Jan 24, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Adiciona suporte a transferências para contas pagamento #66
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
eda11c2
adiciona suporte a transferências para contas pagamento
brenomfviana 704598a
adiciona verificação dos campos de transferência TED
brenomfviana 2ebed39
corrige cadastro de transferência
brenomfviana 3c15b02
adiciona scripts de exemplos
brenomfviana 9ce244c
corrige transferência
brenomfviana 754c69c
adiciona teste de campos vazios
brenomfviana 1e47b7d
corrige teste
brenomfviana caccb0e
adiciona debug
rodrigondec 35448f1
adiciona debug
rodrigondec 0a93651
adiciona comando
rodrigondec 81bc883
adiciona logging
rodrigondec d974a94
corrige teste
brenomfviana 8d40142
ajusta log de debug da requisição
brenomfviana c647777
corrige response reason
brenomfviana 5981904
Merge branch 'main' into feature/adiciona-suporte-conta-pagamento
brenomfviana 4e2b1fe
corrige testes
brenomfviana d383ff1
Merge branch 'main' into feature/adiciona-suporte-conta-pagamento
rodrigondec File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
examples/lotes_pagamento/cadastrar_transferencia_conta_pagamento.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| import os | ||
| import logging | ||
| from datetime import date | ||
|
|
||
| from examples.utils import dump_response | ||
|
|
||
| from bb_wrapper.wrapper import PagamentoLoteBBWrapper | ||
|
|
||
| c = PagamentoLoteBBWrapper(cert=("./certs/cert.pem", "./certs/key.pem")) | ||
|
|
||
| logging.basicConfig(level=logging.DEBUG) | ||
|
|
||
| today = date.today() | ||
| bb_fmt = "%d%m%Y" | ||
|
|
||
| lote_data = { | ||
| "n_requisicao": 579497, | ||
| "agencia": 1607, | ||
| "conta": 99738672, | ||
| "dv_conta": "X", | ||
| } | ||
| transferencia_data = { | ||
| "codigo_banco": 290, | ||
| "conta_pagamento_destino": 3066, | ||
| "documento": "99391916180", | ||
| "data_transferencia": today.strftime(bb_fmt), | ||
| "valor_transferencia": 15.50, | ||
| "descricao": "string", | ||
| } | ||
|
|
||
|
|
||
| response = c.cadastrar_transferencia(**lote_data, **transferencia_data) | ||
|
|
||
| dump_response(response, os.path.realpath(__file__)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
examples/lotes_pagamento/consultar_transferencia_conta_pagamento.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| import os | ||
|
|
||
| from examples.utils import dump_response | ||
|
|
||
| from bb_wrapper.wrapper import PagamentoLoteBBWrapper | ||
|
|
||
| c = PagamentoLoteBBWrapper(cert=("./certs/cert.pem", "./certs/key.pem")) | ||
|
|
||
| _id = "90580000731030001" | ||
|
|
||
|
|
||
| response = c.consultar_transferencia( | ||
| _id, | ||
| ) | ||
|
|
||
| dump_response(response, os.path.realpath(__file__)) |
30 changes: 30 additions & 0 deletions
30
examples/lotes_pagamento/data/cadastrar_transferencia_conta_pagamento.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| { | ||
| "estadoRequisicao": 1, | ||
| "quantidadeTransferencias": 1, | ||
| "totalTransferencias": 15.5, | ||
| "quantidadeTransferenciasValidas": 1, | ||
| "totalTransferenciasValidas": 15.5, | ||
| "transferencias": [ | ||
| { | ||
| "identificadorTransferencia": "90579497731030001", | ||
| "numeroCOMPE": 290, | ||
| "numeroISPB": 0, | ||
| "agenciaCredito": 0, | ||
| "contaCorrenteCredito": 0, | ||
| "digitoVerificadorContaCorrente": "X", | ||
| "contaPagamentoCredito": "3066", | ||
| "cpfBeneficiario": 99391916180, | ||
| "dataTransferencia": 30112023, | ||
| "valorTransferencia": 15.5, | ||
| "documentoDebito": 0, | ||
| "documentoCredito": 0, | ||
| "tipoCredito": 3, | ||
| "codigoFinalidadeDOC": "", | ||
| "codigoFinalidadeTED": "1", | ||
| "numeroDepositoJudicial": "", | ||
| "descricaoTransferencia": "string", | ||
| "indicadorAceite": "S", | ||
| "erros": [] | ||
| } | ||
| ] | ||
| } |
39 changes: 39 additions & 0 deletions
39
examples/lotes_pagamento/data/consultar_transferencia_conta_pagamento.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| { | ||
| "id": 90580000731030000, | ||
| "estadoPagamento": "INCONSISTENTE", | ||
| "tipoCredito": 1, | ||
| "agenciaDebito": 1607, | ||
| "contaCorrenteDebito": 99738672, | ||
| "digitoVerificadorContaCorrenteDebito": "X", | ||
| "inicioCartaoCredito": 0, | ||
| "fimCartaoCredito": 0, | ||
| "dataPagamento": 30112023, | ||
| "valorPagamento": 15.5, | ||
| "documentoDebito": 0, | ||
| "codigoAutenticacaoPagamento": "", | ||
| "numeroDepositoJudicial": "", | ||
| "codigoFinalidadeDOC": "", | ||
| "codigoFinalidadeTED": "", | ||
| "listaPagamentos": [ | ||
| { | ||
| "numeroCOMPE": 1, | ||
| "numeroISPB": 0, | ||
| "agenciaCredito": 0, | ||
| "contaCorrenteCredito": 0, | ||
| "digitoVerificadorContaCorrenteCredito": "", | ||
| "numeroContaCredito": "3066", | ||
| "tipoBeneficiario": 1, | ||
| "cpfCnpjBeneficiario": 99391916180, | ||
| "nomeBeneficiario": "LUIZ NILO REIS", | ||
| "documentoCredito": 0, | ||
| "texto": "" | ||
| } | ||
| ], | ||
| "listaDevolucao": [ | ||
| { | ||
| "codigoMotivo": 23, | ||
| "dataDevolucao": 0, | ||
| "valorDevolucao": 0 | ||
| } | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.