|
|
@@ -17,9 +17,11 @@ namespace MySystem
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
- if(mer.ProductType == "22")
|
|
|
+ string ProductType = mer.ProductType;
|
|
|
+ if (ProductType == "30" && mer.SeoTitle == "PAPER_CODE") ProductType = "51";
|
|
|
+ if(ProductType == "22")
|
|
|
{
|
|
|
- mer.ProductType = GetLiShuaBrand(mer.SnNo);
|
|
|
+ ProductType = GetLiShuaBrand(mer.SnNo);
|
|
|
}
|
|
|
Dictionary<string, object> dataContent = new Dictionary<string, object>();
|
|
|
dataContent.Add("pos_sn", mer.SnNo); //机具sn
|
|
|
@@ -29,12 +31,12 @@ namespace MySystem
|
|
|
dataContent.Add("mer_mobile", mer.MerMobile); //商户手机号
|
|
|
dataContent.Add("request_id", getRequestId(mer.SnNo + mer.MerNo + rnd, "bind")); //流水号
|
|
|
dataContent.Add("bind_time", mer.CreateTime.Value.ToString("yyyy-MM-dd HH:mm:ss")); //绑定时间
|
|
|
- dataContent.Add("brand", int.Parse(function.CheckInt(mer.ProductType))); //品牌
|
|
|
- if(mer.ProductType == "29")
|
|
|
+ dataContent.Add("brand", int.Parse(function.CheckInt(ProductType))); //品牌
|
|
|
+ if(ProductType == "29")
|
|
|
{
|
|
|
dataContent.Add("user_id", mer.QueryCount); //创客ID
|
|
|
}
|
|
|
- if(mer.ProductType == "51")
|
|
|
+ if(ProductType == "51")
|
|
|
{
|
|
|
Push("qr_bind", dataContent);
|
|
|
}
|
|
|
@@ -272,10 +274,17 @@ namespace MySystem
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
+ string ProductType = trade.ProductType;
|
|
|
+ if (ProductType == "30" && trade.TradeSnNo.StartsWith("LKLYSMZCFYH")) ProductType = "51";
|
|
|
int QrPayFlag = 0;
|
|
|
int BankCardType = 1;
|
|
|
string FeeRate = function.CheckNum(trade.ErrorCode);
|
|
|
string FeeAmt = function.CheckNum(trade.ErrorMsg);
|
|
|
+ if (ProductType == "51")
|
|
|
+ {
|
|
|
+ FeeRate = "0.63";
|
|
|
+ FeeAmt = "3";
|
|
|
+ }
|
|
|
List<string> BrandIds = new List<string>();
|
|
|
decimal TradeAmount = trade.TradeAmount;
|
|
|
BrandIds.Add("1");
|
|
|
@@ -289,15 +298,15 @@ namespace MySystem
|
|
|
BrandIds.Add("27");
|
|
|
BrandIds.Add("30");
|
|
|
BrandIds.Add("33");
|
|
|
- if(BrandIds.Contains(trade.ProductType))
|
|
|
+ if(BrandIds.Contains(ProductType))
|
|
|
{
|
|
|
TradeAmount = TradeAmount / 100;
|
|
|
}
|
|
|
- if(trade.ProductType == "22")
|
|
|
+ if(ProductType == "22")
|
|
|
{
|
|
|
- trade.ProductType = GetLiShuaBrand(trade.TradeSnNo);
|
|
|
+ ProductType = GetLiShuaBrand(trade.TradeSnNo);
|
|
|
}
|
|
|
- if (trade.ProductType == "1" || trade.ProductType == "27")
|
|
|
+ if (ProductType == "1" || ProductType == "27")
|
|
|
{
|
|
|
if (trade.TradeType == "02") QrPayFlag = 1;
|
|
|
BankCardType = int.Parse(trade.BankCardType);
|
|
|
@@ -306,7 +315,7 @@ namespace MySystem
|
|
|
if(FeeRate != "0") FeeRate = FeeRate.TrimEnd('0');
|
|
|
if(FeeAmt != "0" && !string.IsNullOrEmpty(FeeAmt)) FeeAmt = FeeAmt.TrimEnd('0');
|
|
|
}
|
|
|
- else if (trade.ProductType == "2")
|
|
|
+ else if (ProductType == "2")
|
|
|
{
|
|
|
if (trade.TradeType == "CLOUD_PAY") QrPayFlag = 1;
|
|
|
if (trade.TradeType == "CREDIT_BY_CARD")
|
|
|
@@ -319,7 +328,7 @@ namespace MySystem
|
|
|
}
|
|
|
FeeRate = FeeRate.Replace("0.00", "0.");
|
|
|
}
|
|
|
- else if (trade.ProductType == "4")
|
|
|
+ else if (ProductType == "4")
|
|
|
{
|
|
|
if (trade.TradeType == "200") QrPayFlag = 1;
|
|
|
if (trade.BankCardType == "100")
|
|
|
@@ -335,7 +344,7 @@ namespace MySystem
|
|
|
if(FeeRate != "0") FeeRate = FeeRate.TrimEnd('0');
|
|
|
if(FeeAmt != "0" && !string.IsNullOrEmpty(FeeAmt)) FeeAmt = FeeAmt.TrimEnd('0');
|
|
|
}
|
|
|
- else if (trade.ProductType == "6" || trade.ProductType == "22" || trade.ProductType == "33")
|
|
|
+ else if (ProductType == "6" || ProductType == "22" || ProductType == "33")
|
|
|
{
|
|
|
if (trade.BankCardType == "02" || trade.BankCardType == "12" || trade.BankCardType == "30" || trade.BankCardType == "31" || trade.BankCardType == "M3" || trade.Field2 == "1517")
|
|
|
{
|
|
|
@@ -346,7 +355,7 @@ namespace MySystem
|
|
|
BankCardType = 0;
|
|
|
}
|
|
|
}
|
|
|
- else if (trade.ProductType == "7")
|
|
|
+ else if (ProductType == "7")
|
|
|
{
|
|
|
if (trade.BankCardType == "OA" || trade.BankCardType == "CC" || trade.BankCardType == "SCC")
|
|
|
{
|
|
|
@@ -357,7 +366,7 @@ namespace MySystem
|
|
|
BankCardType = 0;
|
|
|
}
|
|
|
}
|
|
|
- else if (trade.ProductType == "8" || trade.ProductType == "9")
|
|
|
+ else if (ProductType == "8" || ProductType == "9")
|
|
|
{
|
|
|
if (trade.TradeType == "200") QrPayFlag = 1;
|
|
|
if (trade.BankCardType == "100")
|
|
|
@@ -373,7 +382,7 @@ namespace MySystem
|
|
|
if(FeeRate != "0") FeeRate = FeeRate.TrimEnd('0');
|
|
|
if(FeeAmt != "0" && !string.IsNullOrEmpty(FeeAmt)) FeeAmt = FeeAmt.TrimEnd('0');
|
|
|
}
|
|
|
- else if (trade.ProductType == "10" || trade.ProductType == "11")
|
|
|
+ else if (ProductType == "10" || ProductType == "11")
|
|
|
{
|
|
|
if (trade.TradeType == "F010") QrPayFlag = 1;
|
|
|
if (trade.BankCardType == "01")
|
|
|
@@ -386,7 +395,7 @@ namespace MySystem
|
|
|
}
|
|
|
FeeRate = FeeRate.Replace("0.00", "0.");
|
|
|
}
|
|
|
- else if (trade.ProductType == "12") //盒易付
|
|
|
+ else if (ProductType == "12") //盒易付
|
|
|
{
|
|
|
if (trade.Field3 == "1") QrPayFlag = 1;
|
|
|
if (trade.BankCardType == "C" || trade.TradeType == "1" || trade.TradeType == "2" || trade.TradeType == "3")
|
|
|
@@ -398,7 +407,7 @@ namespace MySystem
|
|
|
BankCardType = 0;
|
|
|
}
|
|
|
}
|
|
|
- else if (trade.ProductType == "15")
|
|
|
+ else if (ProductType == "15")
|
|
|
{
|
|
|
if (trade.BankCardType == "02")
|
|
|
{
|
|
|
@@ -410,7 +419,7 @@ namespace MySystem
|
|
|
}
|
|
|
if(FeeAmt != "0") FeeAmt = FeeAmt.TrimEnd('0');
|
|
|
}
|
|
|
- else if (trade.ProductType == "30") //拉卡拉
|
|
|
+ else if (ProductType == "30") //拉卡拉
|
|
|
{
|
|
|
if (trade.BankCardType == "01" || trade.BankCardType == "61" || trade.BankCardType == "91" || trade.BankCardType == "92")
|
|
|
{
|
|
|
@@ -421,7 +430,7 @@ namespace MySystem
|
|
|
BankCardType = 0;
|
|
|
}
|
|
|
}
|
|
|
- else if (trade.ProductType == "34") //联动掌中宝
|
|
|
+ else if (ProductType == "34") //联动掌中宝
|
|
|
{
|
|
|
if (trade.TradeType == "QuickPass") QrPayFlag = 1;
|
|
|
if (trade.BankCardType == "CC" || trade.TradeType == "AliPay" || trade.TradeType == "Wechat")
|
|
|
@@ -433,12 +442,12 @@ namespace MySystem
|
|
|
BankCardType = 0;
|
|
|
}
|
|
|
}
|
|
|
- else if (Utils.Instance.IsWifi(int.Parse(trade.ProductType)))
|
|
|
+ else if (Utils.Instance.IsWifi(int.Parse(ProductType)))
|
|
|
{
|
|
|
FeeRate = "0.60";
|
|
|
FeeAmt = trade.ErrorMsg;
|
|
|
}
|
|
|
- Dictionary<string, string> fee = GetFee(trade.TradeSnNo, FeeRate, FeeAmt, trade.ProductType);
|
|
|
+ Dictionary<string, string> fee = GetFee(trade.TradeSnNo, FeeRate, FeeAmt, ProductType);
|
|
|
FeeRate = fee["FeeRate"];
|
|
|
FeeAmt = fee["FeeAmt"];
|
|
|
Dictionary<string, object> dataContent = new Dictionary<string, object>();
|
|
|
@@ -447,20 +456,28 @@ namespace MySystem
|
|
|
dataContent.Add("request_id", trade.TradeSerialNo); //流水号
|
|
|
dataContent.Add("trade_amount", TradeAmount); //交易金额
|
|
|
dataContent.Add("trade_time", trade.CreateDate.Value.ToString("yyyy-MM-dd HH:mm:ss")); //交易时间
|
|
|
- dataContent.Add("brand", int.Parse(function.CheckInt(trade.ProductType))); //品牌
|
|
|
+ dataContent.Add("brand", int.Parse(function.CheckInt(ProductType))); //品牌
|
|
|
dataContent.Add("card_type", BankCardType); //卡类型
|
|
|
dataContent.Add("qr_pay_flag", QrPayFlag); //云闪付标记
|
|
|
dataContent.Add("fee_rate", FeeRate); //费率
|
|
|
dataContent.Add("fee_amt", FeeAmt); //秒到费
|
|
|
- if(trade.ProductType == "14")
|
|
|
+ if(ProductType == "14")
|
|
|
{
|
|
|
dataContent.Add("is_first", 1);
|
|
|
}
|
|
|
- if(trade.ProductType == "23" || trade.ProductType == "24" || trade.ProductType == "25" || trade.ProductType == "26" || trade.ProductType == "32")
|
|
|
+ if(ProductType == "23" || ProductType == "24" || ProductType == "25" || ProductType == "26" || ProductType == "32")
|
|
|
{
|
|
|
dataContent.Add("ext_field", trade.ChannelSerial);
|
|
|
}
|
|
|
- Push("trade", dataContent);
|
|
|
+
|
|
|
+ if(ProductType == "51")
|
|
|
+ {
|
|
|
+ Push("lkb_trade", dataContent);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Push("trade", dataContent);
|
|
|
+ }
|
|
|
}
|
|
|
catch (Exception ex)
|
|
|
{
|