Skip to content

Commit

Permalink
fix: get parameters on both success and failed page
Browse files Browse the repository at this point in the history
  • Loading branch information
ruthra-kumar committed Nov 21, 2024
1 parent 7069b59 commit cd32ddd
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -267,10 +267,12 @@ def create_charge_on_braintree(self):
)
else:
status = "Error"
redirect_url = "payment-failed"
redirect_url = (
f"payment-failed?doctype={self.data.reference_doctype}&docname={self.data.reference_docname}"
)

if redirect_to:
redirect_url += "?" + urlencode({"redirect_to": redirect_to})
redirect_url += "&" + urlencode({"redirect_to": redirect_to})
if redirect_message:
redirect_url += "&" + urlencode({"redirect_message": redirect_message})

Expand Down

0 comments on commit cd32ddd

Please sign in to comment.