Просмотр исходного кода

支付宝提交开户意愿,小微需要判断商户类型,是否是移动经营

lcl 1 год назад
Родитель
Сommit
934f2c4120
1 измененных файлов с 7 добавлено и 2 удалено
  1. 7 2
      Util/HaoDa/AlipayFunctionForHD.cs

+ 7 - 2
Util/HaoDa/AlipayFunctionForHD.cs

@@ -33,9 +33,14 @@ namespace MySystem
             AlipayMerchantIndirectAuthorderCreateRequest request = new AlipayMerchantIndirectAuthorderCreateRequest();
             string out_biz_no = DateTime.Now.ToString("yyyyMMddHHmmssfff") + function.get_Random(8);
             string identity_type = info.SubjectType;
+            string merchant_type = "STORE";
             if (identity_type == "SUBJECT_TYPE_ENTERPRISE") identity_type = "ENTERPRISE";
             if (identity_type == "SUBJECT_TYPE_INDIVIDUAL") identity_type = "IND_BIZ";
-            if (identity_type == "SUBJECT_TYPE_SMALL") identity_type = "MSE";
+            if (identity_type == "SUBJECT_TYPE_SMALL")
+            {
+                identity_type = "MSE";
+                merchant_type = "STALL";
+            }
             string PeriodEnd = info.PeriodEnd.Value.ToString("yyyy-MM-dd");
             if (PeriodEnd.Substring(0, 4) == "9999")
             {
@@ -99,7 +104,7 @@ namespace MySystem
                     province = CityNames[CityNames.Length - 1];
                 }
                 BizContent += "    \"support_credentials\":{" +
-                "      \"merchant_type\":\"STORE\"," +
+                "      \"merchant_type\":\"" + merchant_type + "\"," +
                 "      \"store_name\":\"" + info.BizStoreName + "\"," +
                 "      \"province_code\":\"" + province_code + "\"," +
                 "      \"province\":\"" + province + "\"," +