Files
odoo_source/addons/payment_custom/controllers/main.py
T
Victor Feyens 5f41f15e6b [MOV] payment_transfer: rename to payment_custom
The module `payment_transfer` was originally meant to implement a
payment with Wire Transfer flow, which it does not exactly do since all
it does it making transactions follow the payment flow until their
`pending_msg` field's content is shown to the customer. Because of that,
other modules (`website_delivery_ups`, `website_sale_picking`) started
duplicating the base acquirer Wire Transfer to create new payment modes
such as Cash on Delivery and Pay in Store.

To better prepare for a proper dinstinction of the custom modes enabled
by other modules, this commit renames the module `payment_transfer` to
`payment_custom`.

The module `payment_transfer`'s `auto-install` key is also set to
`False` since we no longer want Wire Transfer to be the default payment
acquirer for new databases.

task-2853489

Part-of: odoo/odoo#99400
2022-09-06 12:01:37 +02:00

19 lines
642 B
Python

# Part of Odoo. See LICENSE file for full copyright and licensing details.
import logging
import pprint
from odoo.http import Controller, request, route
_logger = logging.getLogger(__name__)
class CustomController(Controller):
_process_url = '/payment/custom/process'
@route(_process_url, type='http', auth='public', methods=['POST'], csrf=False)
def custom_process_transaction(self, **post):
_logger.info("Handling custom processing with data:\n%s", pprint.pformat(post))
request.env['payment.transaction'].sudo()._handle_notification_data('custom', post)
return request.redirect('/payment/status')