Japle / Japle/python-pagseguro

code = None - codigo de checkout inválido

Open
#57 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

hacktoberfest
Dominant language
Python
Stars
173
Forks
69
PR merge metrics
No merged PRs in 30d

Description

Estou aprendendo django e utilizando essa lib para integrar com o pagseguro.
Estou realizando a integração por meio de uma view PagSeguroView que por meio de um objeto Order, que possuindo um método pagseguro faz as instancias necessárias das configurações do PagSeguro.
Entretanto estou recebendo um código payment.html?code=None o que me parece ser o caso do erro de código de checkout inválido.
O meu código está no github, estou usando django 1.10 e usando python 3.5.2, existe o arquivo requirements.txt com as bibliotecas para rodar caso tenha interesse em testar.
Já coloquei meu token do pagseguro e meu email mas sigo com problemas sobre esse código de checkout.

Modelo Order e seu método pagseguro
![deepinscreenshot_atom_20171011212412](https://user-images.githubusercontent.com/2838834/31473409-aed782ee-aeca-11e7-8e5e-6130f62a6c25.png)

View do Pagseguro
![deepinscreenshot_atom_20171011212425](https://user-images.githubusercontent.com/2838834/31473410-aefe0298-aeca-11e7-9cd2-7a809360f20c.png)

Rotas de urls do Da aplicação checkout
![deepinscreenshot_atom_20171011212429](https://user-images.githubusercontent.com/2838834/31473411-af20c224-aeca-11e7-8fd5-7c2ed015dce2.png)

Template da View
![deepinscreenshot_atom_20171011212506](https://user-images.githubusercontent.com/2838834/31473412-af4dbf9a-aeca-11e7-939a-30476df2bb0a.png)

Resultado de uma tentativa de teste com o sandbox
![deepinscreenshot_deepin-terminal_20171011212013](https://user-images.githubusercontent.com/2838834/31473325-11b2ff3e-aeca-11e7-97f4-00cb153ad95b.png)

Caso alguém deseje testar o código por inteiro basta verificar meu repositório: https://github.com/vinipachecov/django-ecommerce

Desde já agradeço a atenção.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported payment.html?code=None result in the linked django-ecommerce repository using requirements.txt and the sandbox setup. Trace the Order.pagseguro method, PagSeguroView, checkout URL routes, and payment.html template to find where the checkout code becomes None. Done means the sandbox checkout produces a valid code instead of None.

Written by the indexing model from the issue text.

Assessment

Tech stack
django, python
Domain
backend, payments
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.