The logs for payments contain the transaction reference whenever possible. Before logs for transactions contained the reference or the id of the transaction in an inconsitent way. No transactions are identified by reference whenever possible. The logs for payments for the same function on different acquirers should have the same format. Same flow step for different acquirers had information passed in different formats. Now at each step of a transaction flow log messages have the same format regardless of the acquirer. Overall the payment logs should have an uniform format. Hopefully understanding log messages related to transactions should be easier, as now log format is independent of the acquirer and transaction are easily identified by reference. Task - 2545450 closes odoo/odoo#79547 Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
24 lines
791 B
Python
24 lines
791 B
Python
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
|
|
|
import logging
|
|
import pprint
|
|
|
|
from odoo import http
|
|
from odoo.http import request
|
|
|
|
_logger = logging.getLogger(__name__)
|
|
|
|
|
|
class BuckarooController(http.Controller):
|
|
_return_url = '/payment/buckaroo/return'
|
|
|
|
@http.route(_return_url, type='http', auth='public', methods=['POST'], csrf=False)
|
|
def buckaroo_return_from_redirect(self, **data):
|
|
""" Process the data returned by Buckaroo after redirection.
|
|
|
|
:param dict data: The feedback data
|
|
"""
|
|
_logger.info("handling redirection from Buckaroo with data:\n%s", pprint.pformat(data))
|
|
request.env['payment.transaction'].sudo()._handle_feedback_data('buckaroo', data)
|
|
return request.redirect('/payment/status')
|