add payment_redsys_preauth

This commit is contained in:
Luis 2026-06-24 11:49:41 +02:00
parent 0f2c8c0565
commit 08e34c1426
18 changed files with 1043 additions and 0 deletions

View file

@ -0,0 +1,2 @@
from . import main

View file

@ -0,0 +1,29 @@
# © 2024 - 2025 criptomart.net
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
import logging
import pprint
from odoo import http
from odoo.http import request
from odoo.addons.payment_redsys.controllers.main import RedsysController
_logger = logging.getLogger(__name__)
class RedsysController(RedsysController):
_return_url = '/payment/redsys/return'
_cancel_url = '/payment/redsys/cancel'
_exception_url = '/payment/redsys/error'
_reject_url = '/payment/redsys/reject'
@http.route(['/payment/redsys/result/<page>'], type='http', auth='public',methods=['GET'], website=True)
def redsys_result(self, page, **post):
_logger.info('________ Redsys return sync: %s -- %s',
pprint.pformat(post), page)
# double check
if post:
request.env['payment.transaction'].sudo()._handle_notification_data('redsys', post)
return request.redirect('/payment/status')