Files
odoo_source/addons/payment_payumoney/controllers/main.py
T
Kevin Baptiste b14ce986ce [REF] payment_payumoney: migrate PayU money to the new payment API
See the merge commit for more details.

task-2333039
2021-03-30 09:25:51 +02:00

22 lines
681 B
Python

# Part of Odoo. See LICENSE file for full copyright and licensing details.
import logging
import pprint
import werkzeug
from odoo import http
from odoo.http import request
_logger = logging.getLogger(__name__)
class PayUMoneyController(http.Controller):
_return_url = '/payment/payumoney/return'
@http.route(_return_url, type='http', auth='public', methods=['GET', 'POST'], csrf=False)
def payumoney_return(self, **data):
_logger.info("entering handle_feedback_data with data:\n%s", pprint.pformat(data))
request.env['payment.transaction'].sudo()._handle_feedback_data('payumoney', data)
return werkzeug.utils.redirect('/payment/status')