diff options
| author | Joren Van Onder <jov@odoo.com> | 2018-03-10 21:47:34 -0800 |
|---|---|---|
| committer | Joren Van Onder <jov@odoo.com> | 2018-03-15 14:56:34 -0700 |
| commit | e94912b9a9c5f96021350e4a377ddac9d3f2ab64 (patch) | |
| tree | c716d5addc95c3303401036370228810f32e20da /addons/web/static/src/js/views/basic/basic_controller.js | |
| parent | 0717bb6c0de49989cc8a40bab9438239ded991f6 (diff) | |
[FIX] payment: do not refund transactions if they need 3DS validation
This was already the intended behavior, but in Python a return inside
of a try...finally does not behave this way. From the Python
documentation [1]:
When a return, break or continue statement is executed in the try
suite of a try...finally statement, the finally clause is also
executed ‘on the way out.’
This can cause issues because some payment acquirers will return an
error when refunding a pending transaction. This puts the transaction
in the 'error' state which means it won't be refunded anymore.
Additionally, putting s2s_do_transaction in a try...except like this
hides any traceback that occurs which makes troubleshooting harder.
[1] https://docs.python.org/3/reference/compound_stmts.html#finally
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_controller.js')
0 files changed, 0 insertions, 0 deletions
