flectra/addons/payment_transfer/controllers/main.py
2018-01-16 02:34:37 -08:00

22 lines
651 B
Python

# -*- coding: utf-8 -*-
import logging
import pprint
import werkzeug
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', '/'))