From fa0fdb036f5c78e40cfb385fa29277f32b62c7a2 Mon Sep 17 00:00:00 2001 From: erwinvk <31625952+erwinvk@users.noreply.github.com> Date: Tue, 18 Feb 2020 14:47:47 +0100 Subject: [PATCH] Ogone fix --- Source/TeaCommerce.PaymentProviders.Ogone/Ogone.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Source/TeaCommerce.PaymentProviders.Ogone/Ogone.cs b/Source/TeaCommerce.PaymentProviders.Ogone/Ogone.cs index fb5eaf2..6d00bd5 100644 --- a/Source/TeaCommerce.PaymentProviders.Ogone/Ogone.cs +++ b/Source/TeaCommerce.PaymentProviders.Ogone/Ogone.cs @@ -135,7 +135,9 @@ public override CallbackInfo ProcessCallback(Order order, HttpRequest request, I inputFields[key] = request.QueryString[key]; } - string strToHash = string.Join("", inputFields.OrderBy(i => i.Key).Select(i => i.Key.ToUpperInvariant() + "=" + i.Value + settings["SHAOUTPASSPHRASE"])); + string strToHash = string.Join("", inputFields.OrderBy(i => i.Key) + .Where(i => !string.IsNullOrWhiteSpace(i.Value)) + .Select(i => i.Key.ToUpperInvariant() + "=" + i.Value + settings["SHAOUTPASSPHRASE"])); string digest = new SHA512Managed().ComputeHash(Encoding.UTF8.GetBytes(strToHash)).ToHex().ToUpperInvariant(); if (order.CartNumber == request.QueryString["ORDERID"] && digest.Equals(shaSign))