We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 76e0bf1 + 0034cf6 commit 07ea079Copy full SHA for 07ea079
1 file changed
payments/payment_gateways/doctype/stripe_settings/stripe_settings.py
@@ -266,10 +266,8 @@ def finalize_request(self):
266
else:
267
redirect_url = "payment-failed"
268
269
- if redirect_to and "?" in redirect_url:
270
- redirect_url += "&" + urlencode({"redirect_to": redirect_to})
271
- else:
272
- redirect_url += "?" + urlencode({"redirect_to": redirect_to})
+ if redirect_to:
+ redirect_url += ("&" if "?" in redirect_url else "?") + urlencode({"redirect_to": redirect_to})
273
274
if redirect_message:
275
redirect_url += "&" + urlencode({"redirect_message": redirect_message})
0 commit comments