Japle / Japle/python-pagseguro

Erro ao testar usando o próprio exemplo informado

Open
#61 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
173
Forks
69
PR merge metrics
No merged PRs in 30d

Description

Olá, tentei usar testando o próprio exemplo informado. Apresenta erro do amount do item, porém, está informado de acordo com o padrão. Alterei de 354.20 para 354.02 e continua o erro.

Obrigado

In [50]: pg.items = [{'amount': 354.02,
...: 'description': 'Produto 3',
...: 'id': '0003',
...: 'quantity': 2,
...: 'weight': 200}]

In [51]: response = pg.checkout()

In [52]: response.errors
Out[52]:
OrderedDict([(u'code', u'11029'),
(u'message',
u'Item amount invalid pattern: 354. Must fit the patern: \\d+.\\d{2}')])

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the issue with pg.items and pg.checkout() using the example values, then inspect how the item amount is validated or formatted before the PagSeguro request. Done means the documented 354.20-style amount is accepted and response.errors no longer reports the truncated value as an invalid pattern.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, payments
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.