From 3360f9313dc308e28ccdfa5c3d35f3ba9685a53d Mon Sep 17 00:00:00 2001 From: Jorge Pinna Puissant Date: Wed, 10 Jul 2019 10:00:36 +0200 Subject: [PATCH] [FIX] website_payment: consider authorized transactions as done Forward port of a8dfc7fb731dd6c34f55401d099ca1f72d796e9e Before this commit, when a transaction has as status 'authorized', the transactions' confirm page gives an error : 'Oops! There was a problem with your payment.' Now, the page gives the same message as when the transaction has the status 'done' : 'Your payment was successful! It may take some time to be validated on our end.' opw-1984325 --- addons/website_payment/controllers/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/website_payment/controllers/main.py b/addons/website_payment/controllers/main.py index 31244b87cda..101f057cc47 100644 --- a/addons/website_payment/controllers/main.py +++ b/addons/website_payment/controllers/main.py @@ -78,7 +78,7 @@ class WebsitePayment(http.Controller): tx_id = request.session.pop('website_payment_tx_id', False) if tx_id: tx = request.env['payment.transaction'].browse(tx_id) - if tx.state == 'done': + if tx.state in ['done', 'authorized']: status = 'success' message = tx.acquirer_id.done_msg elif tx.state == 'pending':