From 86455a3a85cab4f28c1b2e5a32da8527b7c9ff8c Mon Sep 17 00:00:00 2001 From: Du Peng Date: Mon, 3 Feb 2025 15:32:26 +0100 Subject: [PATCH 1/2] (bug) unable to cancel a PayZen subscription --- CHANGELOG.md | 2 ++ lib/pay_zen/service.rb | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b32b43b5d..4164a17a7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Next release +- Fix a bug: unable to cancel a PayZen subscription + ## v6.3.38 2025 January 27 - Fix a bug: unable to update product low stock alert diff --git a/lib/pay_zen/service.rb b/lib/pay_zen/service.rb index e9597af0f..6803fdd56 100644 --- a/lib/pay_zen/service.rb +++ b/lib/pay_zen/service.rb @@ -70,7 +70,8 @@ class PayZen::Service < Payment::Service raise "Cannot cancel transaction #{t['uuid']}" unless tr_res['answer']['detailedStatus'] == 'CANCELLED' end rescue PayzenError => e - raise e unless e.details['errorCode'] == 'PSP_010' # ignore if no order + # ignore if no order found and Subscription already canceled. + raise e unless e.details['errorCode'] == 'PSP_010' || e.details['errorCode'] == 'PSP_1099' end # then, we cancel the subscription From c7a222ec7b1f062843cb10fb3d7fd0830ef1e284 Mon Sep 17 00:00:00 2001 From: Du Peng Date: Mon, 3 Feb 2025 15:34:13 +0100 Subject: [PATCH 2/2] Version 6.3.39 --- CHANGELOG.md | 2 ++ package.json | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4164a17a7..26b20d6e5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Next release +## v6.3.39 2025 February 3 + - Fix a bug: unable to cancel a PayZen subscription ## v6.3.38 2025 January 27 diff --git a/package.json b/package.json index de5df04f2..78147bc95 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fab-manager", - "version": "6.3.38", + "version": "6.3.39", "description": "Fab-manager is the FabLab management solution. It provides a comprehensive, web-based, open-source tool to simplify your administrative tasks and your marker's projects.", "keywords": [ "fablab",