[FIX] payment_paypal: unquote the paypal response
In some case (undefined), paypal return encoded params. https://cloud.githubusercontent.com/assets/7766939/24752163/43d31634-1aff-11e7-91ab-1c7a5a3b3ef0.png Since this fix don't break the case where there are no the +, if it could fix for others cases... This commit closes #14727, opw-727899
This commit is contained in:
@@ -23,7 +23,7 @@ class PaypalController(http.Controller):
|
||||
""" Extract the return URL from the data coming from paypal. """
|
||||
return_url = post.pop('return_url', '')
|
||||
if not return_url:
|
||||
custom = json.loads(post.pop('custom', False) or post.pop('cm', False) or '{}')
|
||||
custom = json.loads(urllib.unquote_plus(post.pop('custom', False) or post.pop('cm', False) or '{}'))
|
||||
return_url = custom.get('return_url', '/')
|
||||
return return_url
|
||||
|
||||
|
||||
Reference in New Issue
Block a user