flectra/addons/payment_transfer/controllers/main.py

22 lines
651 B
Python
Raw Normal View History

# -*- coding: utf-8 -*-
import logging
import pprint
import werkzeug
2018-01-16 11:34:37 +01:00
from flectra import http
from flectra.http import request
_logger = logging.getLogger(__name__)
class OgoneController(http.Controller):
_accept_url = '/payment/transfer/feedback'
@http.route([
'/payment/transfer/feedback',
], type='http', auth='none', csrf=False)
def transfer_form_feedback(self, **post):
_logger.info('Beginning form_feedback with post data %s', pprint.pformat(post)) # debug
request.env['payment.transaction'].sudo().form_feedback(post, 'transfer')
return werkzeug.utils.redirect(post.pop('return_url', '/'))