From ce57b34f437629496bf2b4cf44e363567bcb489b Mon Sep 17 00:00:00 2001 From: Baptiste Vergote Date: Mon, 18 Nov 2019 13:07:31 +0000 Subject: [PATCH] [FIX] payment_paypal: wrong param expected in paypal_urls Issue was blocking the system to confirm a SO/Invoice after redirection from paypal. In V13 is getting the value of the paypal_urls using paypal_get_form_action_url() returning the correct string, not a dict anymore. Closing opw-2119027 opw-2122833 closes odoo/odoo#40471 X-original-commit: b7f32e6451da75a9583d28686641fc328ab661da Signed-off-by: Nicolas Martinelli (nim) --- addons/payment_paypal/controllers/main.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/addons/payment_paypal/controllers/main.py b/addons/payment_paypal/controllers/main.py index dc2ea54e81c..e9a9dcb5e58 100644 --- a/addons/payment_paypal/controllers/main.py +++ b/addons/payment_paypal/controllers/main.py @@ -60,15 +60,14 @@ class PaypalController(http.Controller): tx = None if reference: tx = request.env['payment.transaction'].search([('reference', '=', reference)]) - paypal_urls = tx.acquirer_id.paypal_get_form_action_url() - pdt_request = bool(post.get('amt')) # check for spefific pdt param + paypal_url = tx.acquirer_id.paypal_get_form_action_url() + pdt_request = bool(post.get('amt')) # check for specific pdt param if pdt_request: # this means we are in PDT instead of DPN like before # fetch the PDT token post['at'] = tx and tx.acquirer_id.paypal_pdt_token or '' post['cmd'] = '_notify-synch' # command is different in PDT than IPN/DPN - validate_url = paypal_urls['paypal_form_url'] - urequest = requests.post(validate_url, post) + urequest = requests.post(paypal_url, post) urequest.raise_for_status() resp = urequest.text if pdt_request: