Skip to content

Commit

Permalink
refactor: throw for cancelled and failed Integration Requests
Browse files Browse the repository at this point in the history
  • Loading branch information
ruthra-kumar committed Nov 4, 2024
1 parent d80039b commit 6e9ab52
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions payments/templates/pages/razorpay_checkout.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ def get_context(context):

try:
doc = frappe.get_doc("Integration Request", frappe.form_dict["token"])

if doc.status in ["Failed", "Cancelled"]:
frappe.throw("Expired Token")

payment_details = json.loads(doc.data)

for key in expected_keys:
Expand Down

0 comments on commit 6e9ab52

Please sign in to comment.