From 58bd3259de1a3e5aafb23dce9b95b8d3b244ddb7 Mon Sep 17 00:00:00 2001 From: Shadrak Gurupnor <30501401+shadrak98@users.noreply.github.com> Date: Fri, 29 Nov 2024 19:13:35 +0530 Subject: [PATCH] fix: return correct search id --- press/press/doctype/stripe_webhook_log/stripe_webhook_log.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/press/press/doctype/stripe_webhook_log/stripe_webhook_log.py b/press/press/doctype/stripe_webhook_log/stripe_webhook_log.py index 0378effa48..b6e78de7c5 100644 --- a/press/press/doctype/stripe_webhook_log/stripe_webhook_log.py +++ b/press/press/doctype/stripe_webhook_log/stripe_webhook_log.py @@ -104,9 +104,9 @@ def stripe_webhook_handler(): def get_intent_id(form_dict): try: form_dict_str = frappe.as_json(form_dict) - intent_id = re.search(r"pi_\w+", form_dict_str) + intent_id = re.findall(r"pi_\w+", form_dict_str) if intent_id: - return intent_id.group(0) + return intent_id[1] return None except Exception: frappe.log_error(title="Failed to capture intent id from stripe webhook log")