Răsfoiți Sursa

金控费率调整

lcl 2 ani în urmă
părinte
comite
35c3d42d08
2 a modificat fișierele cu 11 adăugiri și 2 ștergeri
  1. 1 1
      AppStart/Helper/PublicImportDataService.cs
  2. 10 1
      Controllers/HomeController.cs

+ 1 - 1
AppStart/Helper/PublicImportDataService.cs

@@ -112,7 +112,7 @@ namespace MySystem
             string result = function.PostWebRequest(reqUrl, req, headers, "application/json");
             string result = function.PostWebRequest(reqUrl, req, headers, "application/json");
             return result;
             return result;
         }
         }
-        public string SetFee(string merNo, string sn, decimal addRate, int fee)
+        public string SetFee(string merNo, string sn, decimal addRate, int fee = 0)
         {
         {
             // 2021092711IpAreT 降费特惠…刷卡交易手续费
             // 2021092711IpAreT 降费特惠…刷卡交易手续费
             // 2020032508Nu0QCG 刷卡交易手续费
             // 2020032508Nu0QCG 刷卡交易手续费

+ 10 - 1
Controllers/HomeController.cs

@@ -45,7 +45,16 @@ namespace MySystem.Controllers
 
 
         public string setFee(string merNo, string sn, decimal fee)
         public string setFee(string merNo, string sn, decimal fee)
         {
         {
-            string content = PublicImportDataService.Instance.SetFee(merNo, sn, fee);
+            int addRate = 0;
+            if(fee == 0.63M) 
+            {
+                addRate = 3;
+            }
+            else if(fee == 0.6M)
+            {
+                fee = 0.63M;
+            }
+            string content = PublicImportDataService.Instance.SetFee(merNo, sn, fee, addRate);
             JsonData obj = JsonMapper.ToObject(content);
             JsonData obj = JsonMapper.ToObject(content);
             if (obj["code"].ToString() == "000000")
             if (obj["code"].ToString() == "000000")
             {
             {