Beispiel #1
0
        public TradeOrder(BaseTradeRequest model, MerchantStoreChannelModel merchStore)
        {
            DateTime createDt = DateTime.Now;

            CID       = model.Mch_Id;
            SID       = model.Store_Id;
            DeviceId  = model.Device_Id;
            DeviceId3 = model.Device_Id.ToString();
            SignType  = model.Sign_Type;
            Version   = model.Version;
            Signature = model.Sign;
            MchId3    = merchStore.MerchId3;
            StoreId3  = merchStore.StoreId3;
            CreateDT  = createDt;
            UpdateDT  = createDt;
            ChannelNo = merchStore.ChannelNo;
        }
Beispiel #2
0
 public TradeOrder(PayTradeRequest model, MerchantStoreChannelModel merchStore, string tradeNo)
     : this((BaseTradeRequest)model, merchStore)
 {
     model.ResetPayNotifyUrl(merchStore.PayNotifyUrl);
     TradeNo      = tradeNo;
     OutTradeNo   = model.Out_Trade_No;
     TotalAmount  = model.Total_Amount;
     SourceType   = merchStore.SourceType;
     ApiNo        = merchStore.ApiNo;
     State        = (short)PayState.NotPay;
     PayNotifyUrl = model.Pay_Notify_Url;
     //Fee = PayRules.CalcFee(model.TotalAmount, merchStore);
     //OrderType3 = short.Parse(model.OrderType3);
     TradeType   = (short)QctTradeType.Income;
     FeeType     = (short)PayFeeType.RMB;
     BuyerMobile = "";
     GoodsName   = string.IsNullOrWhiteSpace(model.Goods_Name) ? "购物消费" : model.Goods_Name;
     GoodsDesc   = model.Goods_Desc;
 }
Beispiel #3
0
        /// <summary>
        /// 根据商户及门店号获得商户门店信息
        /// </summary>
        /// <param name="merchObj"></param>
        /// <param name="sid"></param>
        /// <returns></returns>
        public MerchantStoreChannelModel GetMerchStore(MerchantChannelModel merchObj, string sid)
        {
            var query = from tstore in _tStoreRepost.GetQuery()
                        where tstore.CID == merchObj.MchId && tstore.StoreNum == sid && tstore.State == (short)TraderStoreState.Enabled
                        select new MerchantStoreChannelModel()
            {
                SID      = tstore.StoreNum,
                StoreId3 = tstore.StoreNum3
            };
            var store = query.FirstOrDefault();

            if (store != null)
            {
                var obj = new MerchantStoreChannelModel(merchObj);
                obj.SID      = store.SID;
                obj.StoreId3 = store.StoreId3;
                return(obj);
            }
            return(null);
        }
Beispiel #4
0
 /// <summary>
 /// 赋值商户门店信息Model
 /// </summary>
 /// <param name="merchStoreModel"></param>
 public void WithMerchStoreModel(MerchantStoreChannelModel merchStoreModel)
 {
     MerchStoreModel = merchStoreModel;
 }