|
@@ -13,26 +13,34 @@ namespace MySystem
|
|
|
{ }
|
|
|
|
|
|
//绑定数据
|
|
|
- // public static void Bind(MerchantAddInfo mer, PosMachinesTwo pos)
|
|
|
- // {
|
|
|
- // try
|
|
|
- // {
|
|
|
- // Dictionary<string, object> dataContent = new Dictionary<string, object>();
|
|
|
- // dataContent.Add("pos_sn", pos.PosSn); //机具sn
|
|
|
- // dataContent.Add("mer_no", mer.MchtNo); //商户号
|
|
|
- // dataContent.Add("id_card", mer.IdCardNumber); //商户身份证
|
|
|
- // dataContent.Add("mer_name", mer.CertMerchantName); //商户姓名
|
|
|
- // dataContent.Add("mer_mobile", mer.MobilePhone); //商户手机号
|
|
|
- // dataContent.Add("request_id", getRequestId(mer.Id, "bind")); //流水号
|
|
|
- // dataContent.Add("bind_time", mer.CreateDate.Value.ToString("yyyy-MM-dd HH:mm:ss")); //绑定时间
|
|
|
- // dataContent.Add("brand", 101); //品牌
|
|
|
- // Push("bind", dataContent);
|
|
|
- // }
|
|
|
- // catch (Exception ex)
|
|
|
- // {
|
|
|
- // function.WriteLog(DateTime.Now.ToString() + "\n" + ex.ToString() + "\n\n", "推送绑定数据异常");
|
|
|
- // }
|
|
|
- // }
|
|
|
+ public static void Bind(MerchantAddInfo mer, MerchantInfo m)
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ Dictionary<string, object> dataContent = new Dictionary<string, object>();
|
|
|
+ // dataContent.Add("pos_sn", pos.PosSn); //机具sn
|
|
|
+ dataContent.Add("mer_no", mer.MchtNo); //商户号
|
|
|
+ dataContent.Add("id_card", mer.IdCardNumber); //商户身份证
|
|
|
+ dataContent.Add("mer_name", mer.CertMerchantName); //商户姓名
|
|
|
+ dataContent.Add("mer_mobile", mer.MobilePhone); //商户手机号
|
|
|
+ dataContent.Add("request_id", getRequestId(mer.Id, "bind")); //流水号
|
|
|
+ dataContent.Add("bind_time", mer.CreateDate.Value.ToString("yyyy-MM-dd HH:mm:ss")); //绑定时间
|
|
|
+ if(mer.BrandId == 1)
|
|
|
+ {
|
|
|
+ dataContent.Add("brand", 29); //品牌
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ dataContent.Add("brand", 101); //品牌
|
|
|
+ }
|
|
|
+ dataContent.Add("user_id", m.UserId); //创客Id
|
|
|
+ Push("qr_bind", dataContent);
|
|
|
+ }
|
|
|
+ catch (Exception ex)
|
|
|
+ {
|
|
|
+ function.WriteLog(DateTime.Now.ToString() + "\n" + ex.ToString() + "\n\n", "推送绑定数据异常");
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
//交易数据
|
|
|
public static void Trade(ConsumerOrders trade, MerchantAddInfo mer)
|
|
@@ -44,17 +52,17 @@ namespace MySystem
|
|
|
List<string> BrandIds = new List<string>();
|
|
|
decimal TradeAmount = trade.PayMoney;
|
|
|
Dictionary<string, object> dataContent = new Dictionary<string, object>();
|
|
|
- dataContent.Add("pos_sn", trade.SnNo); //机具sn
|
|
|
+ // dataContent.Add("pos_sn", trade.SnNo); //机具sn
|
|
|
dataContent.Add("mer_no", mer.MchtNo); //商户号
|
|
|
dataContent.Add("request_id", trade.OrderNo); //流水号
|
|
|
dataContent.Add("trade_amount", TradeAmount); //交易金额
|
|
|
dataContent.Add("trade_time", trade.CreateDate.Value.ToString("yyyy-MM-dd HH:mm:ss")); //交易时间
|
|
|
dataContent.Add("brand", 101); //品牌
|
|
|
- dataContent.Add("card_type", BankCardType); //卡类型
|
|
|
- dataContent.Add("qr_pay_flag", QrPayFlag); //云闪付标记
|
|
|
+ // dataContent.Add("card_type", BankCardType); //卡类型
|
|
|
+ // dataContent.Add("qr_pay_flag", QrPayFlag); //云闪付标记
|
|
|
dataContent.Add("fee_rate", trade.IsAct == 1 ? 0.6M : 0.63M);
|
|
|
dataContent.Add("fee_amt", trade.IsAct == 1 ? 0 : 3);
|
|
|
- Push("trade", dataContent);
|
|
|
+ Push("lkb_trade", dataContent);
|
|
|
}
|
|
|
catch (Exception ex)
|
|
|
{
|