From 0b3b74002546544d350208b029e67747efd22f0d Mon Sep 17 00:00:00 2001 From: Steffen Kruse Hansen Date: Mon, 25 Aug 2025 15:10:48 +0200 Subject: [PATCH 1/4] Fixed QuickPay callback --- src/QuickPayPaymentWindow.cs | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/QuickPayPaymentWindow.cs b/src/QuickPayPaymentWindow.cs index 720db15..d84e335 100644 --- a/src/QuickPayPaymentWindow.cs +++ b/src/QuickPayPaymentWindow.cs @@ -321,7 +321,7 @@ public override OutputResult BeginCheckout(Order order, CheckoutParameters param catch (Exception ex) { LogError(order, ex, "Unhandled exception with message: {0}", ex.Message); - return PrintErrorTemplate(order, ex.Message); + return new ContentOutputResult() { Content = "An error occurred in the callback. Check event log for error details" }; } QuickpayTemplateHelper GetTemplateHelper() => new() @@ -378,7 +378,7 @@ public override OutputResult HandleRequest(Order order) catch (Exception ex) { LogError(order, ex, "Unhandled exception with message: {0}", ex.Message); - return PrintErrorTemplate(order, ex.Message); + return new ContentOutputResult() { Content = "An error occurred in the callback. Check event log for error details" }; } } @@ -566,15 +566,21 @@ private void Callback(Order order) { lock (lockObject) { + if (Context.Current.Request.InputStream.Length == 0) + { + LogEvent(order, "Invalid callback - no InputStream or not a POST"); + return; + } + LogEvent(order, "Callback started"); - string callbackResponce; + string callbackResponse; using (StreamReader reader = new StreamReader(Context.Current.Request.InputStream, Encoding.UTF8)) { - callbackResponce = reader.ReadToEndAsync().GetAwaiter().GetResult(); + callbackResponse = reader.ReadToEndAsync().GetAwaiter().GetResult(); } - CheckedData checkedData = CheckData(order, callbackResponce ?? string.Empty, order.Price.PricePIP); + CheckedData checkedData = CheckData(order, callbackResponse ?? string.Empty, order.Price.PricePIP); string resultInfo = checkedData.Result switch { //ViaBill autocapture starts callback. From f6c42cc44a82880d6685e011a966ebdb7544e6a7 Mon Sep 17 00:00:00 2001 From: Steffen Kruse Hansen Date: Mon, 25 Aug 2025 15:11:24 +0200 Subject: [PATCH 2/4] Bump version --- ...cweb.Ecommerce.CheckoutHandlers.QuickPayPaymentWindow.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Dynamicweb.Ecommerce.CheckoutHandlers.QuickPayPaymentWindow.csproj b/src/Dynamicweb.Ecommerce.CheckoutHandlers.QuickPayPaymentWindow.csproj index d34b946..db1aa4f 100644 --- a/src/Dynamicweb.Ecommerce.CheckoutHandlers.QuickPayPaymentWindow.csproj +++ b/src/Dynamicweb.Ecommerce.CheckoutHandlers.QuickPayPaymentWindow.csproj @@ -1,6 +1,6 @@  - 10.1.1 + 10.1.2 1.0.0.0 QuickPay Payment Window The QuickPay Payment Window checkout handler is designed to work with QuickPay v10. From ef188341e6bd5c24588922cd9efcee63969594ad Mon Sep 17 00:00:00 2001 From: Steffen Kruse Hansen Date: Mon, 25 Aug 2025 15:17:08 +0200 Subject: [PATCH 3/4] Update CodeOwners --- .github/CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 3a29f75..07faa0b 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1 +1 @@ -* @frederik5480 +* @commerce-codeowners From 699d3be5f079537ff2297c482b4b81e68ff03072 Mon Sep 17 00:00:00 2001 From: Steffen Kruse Hansen Date: Mon, 25 Aug 2025 15:22:17 +0200 Subject: [PATCH 4/4] Updated CodeOwners --- .github/CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 07faa0b..567a432 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1 +1 @@ -* @commerce-codeowners +* @dynamicweb/commerce-codeowners