This repository has been archived by the owner on Jan 24, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2ebed39
commit 3c15b02
Showing
4 changed files
with
119 additions
and
0 deletions.
There are no files selected for viewing
32 changes: 32 additions & 0 deletions
32
examples/lotes_pagamento/cadastrar_transferencia_conta_pagamento.py
This file contains 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,32 @@ | ||
import os | ||
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")) | ||
|
||
|
||
today = date.today() | ||
bb_fmt = "%d%m%Y" | ||
|
||
lote_data = { | ||
"n_requisicao": 580000, | ||
"agencia": 1607, | ||
"conta": 99738672, | ||
"dv_conta": "X", | ||
} | ||
transferencia_data = { | ||
"codigo_banco": 1, | ||
"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__)) |
16 changes: 16 additions & 0 deletions
16
examples/lotes_pagamento/consultar_transferencia_conta_pagamento.py
This file contains 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__)) |
32 changes: 32 additions & 0 deletions
32
examples/lotes_pagamento/data/cadastrar_transferencia_conta_pagamento.json
This file contains 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,32 @@ | ||
{ | ||
"estadoRequisicao": 3, | ||
"quantidadeTransferencias": 1, | ||
"totalTransferencias": 15.5, | ||
"quantidadeTransferenciasValidas": 0, | ||
"totalTransferenciasValidas": 0, | ||
"transferencias": [ | ||
{ | ||
"identificadorTransferencia": "90580000731030001", | ||
"numeroCOMPE": 1, | ||
"numeroISPB": 0, | ||
"agenciaCredito": 0, | ||
"contaCorrenteCredito": 0, | ||
"digitoVerificadorContaCorrente": "X", | ||
"contaPagamentoCredito": "3066", | ||
"cpfBeneficiario": 99391916180, | ||
"dataTransferencia": 30112023, | ||
"valorTransferencia": 15.5, | ||
"documentoDebito": 0, | ||
"documentoCredito": 0, | ||
"tipoCredito": 1, | ||
"codigoFinalidadeDOC": "", | ||
"codigoFinalidadeTED": "", | ||
"numeroDepositoJudicial": "", | ||
"descricaoTransferencia": "string", | ||
"indicadorAceite": "N", | ||
"erros": [ | ||
23 | ||
] | ||
} | ||
] | ||
} |
39 changes: 39 additions & 0 deletions
39
examples/lotes_pagamento/data/consultar_transferencia_conta_pagamento.json
This file contains 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 | ||
} | ||
] | ||
} |