diff options
| author | Toufik Ben Jaa <tbe@odoo.com> | 2019-01-15 10:09:42 +0000 |
|---|---|---|
| committer | Toufik Ben Jaa <tbe@odoo.com> | 2019-01-15 10:09:42 +0000 |
| commit | df39431fc0c16cf942bcce0a120c62aacf3e00a2 (patch) | |
| tree | 21db37f29813dda0d80366ff50539cd00686e301 /addons/account_payment/controllers/payment.py | |
| parent | 0f0ad7d1d4223cbcd5f66c4ffcb1df06016852bf (diff) | |
[FIX] account_payment: validate s2s payment transaction
- If a customer pays an invoice using a credit card, the payment is
taken in account but the invoice validation isn't processed until the
Payment Processing cron do it.
We want the invoice to be validated as soon as possible.
To do so, we need to redirect the customer on the payment processing
page that take cares of validating the payments.
OPW-1913876
closes odoo/odoo#30217
Diffstat (limited to 'addons/account_payment/controllers/payment.py')
| -rw-r--r-- | addons/account_payment/controllers/payment.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/account_payment/controllers/payment.py b/addons/account_payment/controllers/payment.py index 496a158563e..8ac01bd398d 100644 --- a/addons/account_payment/controllers/payment.py +++ b/addons/account_payment/controllers/payment.py @@ -77,11 +77,11 @@ class PaymentPortal(http.Controller): vals = { 'payment_token_id': token.id, 'type': 'server2server', - 'return_url': success_url, + 'return_url': _build_url_w_params(success_url, params), } tx = invoice_sudo._create_payment_transaction(vals) PaymentProcessing.add_payment_transaction(tx) params['success'] = 'pay_invoice' - return request.redirect(_build_url_w_params(success_url, params)) + return request.redirect('/payment/process') |
