Roc 5 years ago
parent
commit
9b40f44123
2 changed files with 9 additions and 5 deletions
  1. 0 4
      README.MD
  2. 9 1
      src/Essensoft.AspNetCore.Payment.WeChatPay/WeChatPayDictionary.cs

+ 0 - 4
README.MD

@@ -11,10 +11,6 @@ Package  | NuGet
 -------- | :------------ 
 Essensoft.AspNetCore.Payment.Alipay         | [![NuGet](https://img.shields.io/nuget/v/Essensoft.AspNetCore.Payment.Alipay.svg)](https://www.nuget.org/packages/Essensoft.AspNetCore.Payment.Alipay)
 Essensoft.AspNetCore.Payment.WeChatPay      | [![NuGet](https://img.shields.io/nuget/v/Essensoft.AspNetCore.Payment.WeChatPay.svg)](https://www.nuget.org/packages/Essensoft.AspNetCore.Payment.WeChatPay)
-Essensoft.AspNetCore.Payment.QPay           | [![NuGet](https://img.shields.io/nuget/v/Essensoft.AspNetCore.Payment.QPay.svg)](https://www.nuget.org/packages/Essensoft.AspNetCore.Payment.QPay)
-Essensoft.AspNetCore.Payment.JDPay		    | [![NuGet](https://img.shields.io/nuget/v/Essensoft.AspNetCore.Payment.JDPay.svg)](https://www.nuget.org/packages/Essensoft.AspNetCore.Payment.JDPay)
-Essensoft.AspNetCore.Payment.LianLianPay    | [![NuGet](https://img.shields.io/nuget/v/Essensoft.AspNetCore.Payment.LianLianPay.svg)](https://www.nuget.org/packages/Essensoft.AspNetCore.Payment.LianLianPay)
-Essensoft.AspNetCore.Payment.UnionPay       | [![NuGet](https://img.shields.io/nuget/v/Essensoft.AspNetCore.Payment.UnionPay.svg)](https://www.nuget.org/packages/Essensoft.AspNetCore.Payment.UnionPay)
 Essensoft.AspNetCore.Payment.Security       | [![NuGet](https://img.shields.io/nuget/v/Essensoft.AspNetCore.Payment.Security.svg)](https://www.nuget.org/packages/Essensoft.AspNetCore.Payment.Security)
 
 ## QQ群

+ 9 - 1
src/Essensoft.AspNetCore.Payment.WeChatPay/WeChatPayDictionary.cs

@@ -25,6 +25,14 @@ namespace Essensoft.AspNetCore.Payment.WeChatPay
             Add(key, value.ToString());
         }
 
+        public new void Add(string key, string value)
+        {
+            if (!string.IsNullOrEmpty(key) && !string.IsNullOrEmpty(value))
+            {
+                base.Add(key, value);
+            }
+        }
+
         public string GetValue(string key)
         {
             return TryGetValue(key, out var o) ? o : null;
@@ -32,7 +40,7 @@ namespace Essensoft.AspNetCore.Payment.WeChatPay
 
         public string SetValue(string key, string value)
         {
-            return base[key] = value;
+            return this[key] = value;
         }
     }
 }