Skip to content
This repository has been archived by the owner on Jan 24, 2025. It is now read-only.

Recebimento PIX #25

Merged
merged 39 commits into from
Jun 14, 2021
Merged

Recebimento PIX #25

merged 39 commits into from
Jun 14, 2021

Conversation

rodrigondec
Copy link
Member

@rodrigondec rodrigondec commented Jun 11, 2021

Resumo

fix #24

Essa PR adiciona a API PIX (recebimento via PIX) do BB.

ATENÇÃO os endpoints de devolução e algumas consultas ainda estão instáveis no BB!!!!!

Adiciona também documentações necessárias para entender o funcionamento do PIX e sua geração de QR Code.

devido aos bloqueios e suporte do BB, a tarefa extrapolou o prazo esperado!

@rodrigondec rodrigondec added the Tamanho: E 🚢 Tarefa épica/enorme label Jun 11, 2021
@codecov
Copy link

codecov bot commented Jun 11, 2021

Codecov Report

Merging #25 (ff28b79) into main (a1643b9) will decrease coverage by 3.31%.
The diff coverage is 71.72%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #25      +/-   ##
==========================================
- Coverage   83.95%   80.63%   -3.32%     
==========================================
  Files          13       17       +4     
  Lines         405      537     +132     
==========================================
+ Hits          340      433      +93     
- Misses         65      104      +39     
Impacted Files Coverage Δ
bb_wrapper/wrapper/pix_cob.py 45.71% <45.71%> (ø)
bb_wrapper/wrapper/bb.py 76.74% <80.00%> (+1.74%) ⬆️
bb_wrapper/wrapper/cobrancas.py 67.53% <85.71%> (+1.33%) ⬆️
bb_wrapper/wrapper/request.py 60.31% <90.90%> (+1.69%) ⬆️
bb_wrapper/models/perfis.py 100.00% <100.00%> (ø)
bb_wrapper/models/pix_cob.py 100.00% <100.00%> (ø)
bb_wrapper/services/brcode.py 100.00% <100.00%> (ø)
bb_wrapper/services/pixcode.py 100.00% <100.00%> (ø)
... and 2 more
Impacted Files Coverage Δ
bb_wrapper/wrapper/pix_cob.py 45.71% <45.71%> (ø)
bb_wrapper/wrapper/bb.py 76.74% <80.00%> (+1.74%) ⬆️
bb_wrapper/wrapper/cobrancas.py 67.53% <85.71%> (+1.33%) ⬆️
bb_wrapper/wrapper/request.py 60.31% <90.90%> (+1.69%) ⬆️
bb_wrapper/models/perfis.py 100.00% <100.00%> (ø)
bb_wrapper/models/pix_cob.py 100.00% <100.00%> (ø)
bb_wrapper/services/brcode.py 100.00% <100.00%> (ø)
bb_wrapper/services/pixcode.py 100.00% <100.00%> (ø)
... and 2 more

Copy link
Contributor

@PedroRegisPOAR PedroRegisPOAR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR impressionante!

Comentários sobre coisas bobas.


result_data, result_qrcode = PixCodeService().create(location, recebedor)

expected_data = """00020101021226870014br.gov.bcb.pix2565qrcodepix-h.bb.com.br/pix/v2/0c3f04a0-a41a-401e-8bb6-f6744c75a6055204000053039865802BR5920ALAN GUIACHERO BUENO6008BRASILIA62070503***63042AC9""" # noqa
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BRASILIA é hardcoded?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sim. Sempre será BRASILIA nos pagamentos PIX!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sim. Sempre será BRASILIA nos pagamentos PIX!

Hardcoded sem o acento 🤦

rodrigondec and others added 3 commits June 14, 2021 13:06
Co-authored-by: PedroRegisPOAR <pedroalencarregis@hotmail.com>
Co-authored-by: PedroRegisPOAR <pedroalencarregis@hotmail.com>
Copy link
Contributor

@PedroRegisPOAR PedroRegisPOAR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

Copy link
Contributor

@arianesc arianesc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀


class CobrancaPix(BaseModel):
calendario: Calendario
devedor: Union[PessoaPix, EmpresaPix]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

não conhecia o Union, interessante!

]
}
}
]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Esse arquivo é só para teste? achei diferente o nome ser .postman_collection

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

É um projeto do postman. Ele tem documentado os requests de exemplo da API

data = {
"expiracao": 60 * 60, # 60 segundos = 1 minuto. 60 minutos = 1h
"documento_devedor": "12345678909",
"nome_devedor": "Francisco da SilvaFrancisco da SilvaFrancisco da SilvaFrancisco da SilvaFrancisco da Silva", # noqa: E501
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Por que o nome ta assim? grande e repetido?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Só pra testar limitação de tamanho 🤣

@rodrigondec rodrigondec merged commit 5940b14 into main Jun 14, 2021
@rodrigondec rodrigondec deleted the feature/pix-deposit branch June 14, 2021 16:39
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
Tamanho: E 🚢 Tarefa épica/enorme
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Gerar PIX de recebimento
3 participants