From 141e4b1aa4e873c4453517f259e94c18e1bcd950 Mon Sep 17 00:00:00 2001 From: Alexander Todorov Date: Mon, 4 May 2026 15:48:49 +0300 Subject: [PATCH 1/2] Extract subscription ID from order.completed events only for WIRE payments --- tcms_github_marketplace/views.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tcms_github_marketplace/views.py b/tcms_github_marketplace/views.py index a7a24dd..af17124 100644 --- a/tcms_github_marketplace/views.py +++ b/tcms_github_marketplace/views.py @@ -447,7 +447,13 @@ def purchase_subscription(self, event): if isinstance(subscription, dict): subscription = subscription["id"] elif "order" in data: - subscription = data["order"] + # extract subscription ID only for order.completed events which are related to + # WIRE payments b/c for subscriptions we also receive such an event and that + # messes up the ViewSubscription view b/c subscription ID is different from the ID + # received in the 'purchased' event + event_as_string = json.dumps(event) + if "-for-1-year" in event_as_string or "-for-3-years" in event_as_string: + subscription = data["order"] return f"fs-{subscription}" From d93cb6f4bcff052a62f2dea4b40a977d27309d69 Mon Sep 17 00:00:00 2001 From: Alexander Todorov Date: Mon, 4 May 2026 15:49:57 +0300 Subject: [PATCH 2/2] Changelog for v4.5.5 --- README.rst | 6 ++++++ setup.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 12b2768..0c2ef71 100644 --- a/README.rst +++ b/README.rst @@ -65,6 +65,12 @@ Product configuration Changelog --------- +v4.5.5 (04 May 2026) +~~~~~~~~~~~~~~~~~~~~ + +- Extract subscription ID from `order.completed` events only for WIRE payments + + v4.5.4 (15 Apr 2026) ~~~~~~~~~~~~~~~~~~~~ diff --git a/setup.py b/setup.py index bc5bb0c..fbe43a8 100644 --- a/setup.py +++ b/setup.py @@ -26,7 +26,7 @@ def get_install_requires(path): setup( name="kiwitcms-github-marketplace", - version="4.5.4", + version="4.5.5", description="GitHub Marketplace integration for Kiwi TCMS", long_description=get_long_description(), author="Kiwi TCMS",