[FIX] website_payment: consider authorized transactions as done

Forward port of a8dfc7fb73

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
This commit is contained in:
Jorge Pinna Puissant
2019-07-10 10:03:21 +02:00
parent ce5ec5f5f6
commit 3360f9313d
+1 -1
View File
@@ -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':