Пример #1
0
 public void O2OInitForShipment(EO2OOrder O2OOrder)
 {
     this.O2OInitForUser(O2OOrder);
     this.TargetAccount  = O2OOrder.WHAliPayAccount;
     this.TransferTarget = TransferTarget.O2OWareHouse;
     //  this
 }
Пример #2
0
 public void O2OInitForUser(EO2OOrder O2OOrder)
 {
     this.O2ONo          = O2OOrder.O2ONo;
     this.TargetAccount  = O2OOrder.UserAliPayAccount;
     this.TransDate      = DateTime.Now;
     this.TransDateStr   = DateTime.Now.ToShortDateString();
     this.TransferStatus = TransferStatus.Open;
     this.TransferTarget = TransferTarget.User;
 }
Пример #3
0
 public void O2OInitForAgent(EO2OOrder O2OOrder, EUserInfo ui)
 {
     this.AgentOpenId    = ui.OpenId;
     this.AgentName      = ui.Name;
     this.O2ONo          = O2OOrder.O2ONo;
     this.TargetAccount  = ui.AliPayAccount;
     this.TransDate      = DateTime.Now;
     this.TransDateStr   = DateTime.Now.ToShortDateString();
     this.TransferStatus = TransferStatus.Open;
     this.TransferTarget = TransferTarget.Agent;
 }
Пример #4
0
        /*
         * {{first.DATA}}
         * 订单号:{{keyword1.DATA}}
         * 结算金额:{{keyword2.DATA}}
         * 结算时间:{{keyword3.DATA}}
         * {{remark.DATA}}
         */
        public SettleToUserTemplate GenerateData(string toUserOpenId, EO2OOrder o2oOrder)
        {
            double amt;

            amt = o2oOrder.OrderAmount * ((100 - o2oOrder.MarketRate) / 100);
            string first = string.Format("订单已被出库商/商户结算,请准备打钱给用户");



            string remark = string.Format("用户手机号:{0}", o2oOrder.UserPhone);
            var    data   = new
            {
                first = new TemplateField()
                {
                    value = first, color = "#1364EB"
                },
                keyword1 = new TemplateField()
                {
                    value = o2oOrder.O2ONo
                },
                keyword2 = new TemplateField()
                {
                    value = amt.ToString("0.00") + "元 (将转账给用户)"
                },
                keyword3 = new TemplateField()
                {
                    value = "准备结算"
                },

                remark = new TemplateField {
                    value = remark, color = "#FF7F27"
                },
            };

            string url = ConfigurationManager.AppSettings["Main_SiteUrl"] + "/O2OWap/UploadOrder?act=review&aoId={0}&OrderNo={1}";

            url = string.Format(url, toUserOpenId, o2oOrder.O2ONo);

            SettleToUserTemplate obj = base.InitObject(toUserOpenId, url, "i_5j4EheOGvq6bBDL_5SLKEW6LjJWB11iy61bKogVlk");

            obj.data = data;
            return(obj);
        }
Пример #5
0
 public SettleToUserNT(string accessToken, string toUserOpenId, EO2OOrder o2oOrder) : base(accessToken)
 {
     _OpenId   = toUserOpenId;
     _O2OOrder = o2oOrder;
 }