Skip to content

[V10][IMP] Ajout de log lors de la transaction Payzen - #8

Open
Max-282 wants to merge 1 commit into
10.0from
temp-10.0
Open

[V10][IMP] Ajout de log lors de la transaction Payzen#8
Max-282 wants to merge 1 commit into
10.0from
temp-10.0

Conversation

@Max-282

@Max-282 Max-282 commented Apr 27, 2021

Copy link
Copy Markdown
Contributor

Close #6

@Max-282 Max-282 self-assigned this Apr 27, 2021
@Max-282 Max-282 linked an issue Apr 27, 2021 that may be closed by this pull request
@Max-282 Max-282 changed the title [IMP] Ajout de log lors de la transaction Payzen [V10][IMP] Ajout de log lors de la transaction Payzen Apr 27, 2021
start_time = time.time()
request.env['payment.transaction'].form_feedback(kw, 'payzen')
_logger.info(
"Reference %s transaction was done in %s seconds" % (kw['vads_order_id'], time.time() - start_time))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

mettre ca dans un finally pour gérer les erreurs, et rendre plus robuste kw['vads_order_id'] (si kw est vide ou si il ne contient pas la clé 'vads_order_id'

Comment thread odoo/addons/payment_payzen/controllers/main.py Outdated

@Creamaster Creamaster left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

penser à bump la version du module

try:
request.env['payment.transaction'].form_feedback(kw, 'payzen')
finally:
if isinstance(kw, dict):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Même si kw n'est pas un dictionnaire, il faut quand même logger le temps de réponse

@Max-282
Max-282 force-pushed the temp-10.0 branch 5 times, most recently from cd1171f to ce41599 Compare May 11, 2021 07:03
- Modification de l'url retour (utilisation de cette branche car utilisé par 3M)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ajout de log de performance pour analyse

3 participants