[FIX] payment: show the specific message for authorized transactions

When a customers paid a transaction through the `/payment/pay` route and
the transaction was authorized, the message for confirmed transactions
would be shown on the `/payment/confirmation` route instead of the one
specific to authorized transactions.

task-2527323

closes odoo/odoo#78843

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
This commit is contained in:
Valentin Chevalier
2022-07-19 20:12:55 +02:00
committed by Antoine Vandevenne (anv)
parent 9e59e47572
commit a26ff947ff
+4 -1
View File
@@ -392,7 +392,10 @@ class PaymentPortal(portal.CustomerPortal):
elif tx_sudo.state == 'pending':
status = 'warning'
message = tx_sudo.acquirer_id.pending_msg
elif tx_sudo.state in ('authorized', 'done'):
elif tx_sudo.state == 'authorized':
status = 'success'
message = tx_sudo.acquirer_id.auth_msg
elif tx_sudo.state == 'done':
status = 'success'
message = tx_sudo.acquirer_id.done_msg
elif tx_sudo.state == 'cancel':