summaryrefslogtreecommitdiff
path: root/addons/payment_paypal/controllers
diff options
context:
space:
mode:
authorBaptiste Vergote <bve@odoo.com>2019-11-18 13:07:31 +0000
committerfw-bot <otis@odoo.com>2019-11-19 08:16:47 +0000
commitce57b34f437629496bf2b4cf44e363567bcb489b (patch)
tree4a5ae11fd590e42dc49250fb639f246f15dfc612 /addons/payment_paypal/controllers
parenta9a2fba6830bb7f1eaf14c6155b5dace10bb9c03 (diff)
[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) <nim@odoo.com>
Diffstat (limited to 'addons/payment_paypal/controllers')
-rw-r--r--addons/payment_paypal/controllers/main.py7
1 files 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: