示例#1
0
        /// <summary>
        /// 商户同意取消申请 type=23
        /// </summary>
        public void MerchantAgreeCencel(ElemeRequset reqEleme, WebsiteInfo websiteModel)
        {
            ToLog("商户同意取消申请=" + reqEleme.message);
            var sign  = reqEleme.signature;
            var value = GetSign(reqEleme, websiteModel);

            if (sign == value)
            {
                RespApplyCencel oorder    = ZentCloud.Common.JSONHelper.JsonToModel <RespApplyCencel>(reqEleme.message);
                WXMallOrderInfo mallOrder = bllMall.Get <WXMallOrderInfo>(string.Format(" WebsiteOwner='{0}' AND OutOrderId='{1}'", websiteModel.WebsiteOwner, oorder.orderId));
                if (mallOrder != null)
                {
                    mallOrder.Status         = "已取消";
                    mallOrder.IsRefund       = 0;
                    mallOrder.OutOrderStatus = GetRefStatus(oorder.refundStatus);
                    bllMall.Update(mallOrder);
                }
                resp.msg = "ok";
            }
            else
            {
                resp.msg = "验签错误";
            }
            Response.Write(ZentCloud.Common.JSONHelper.ObjectToJson(resp));
        }
示例#2
0
        /// <summary>
        /// 订单已完成 type=18
        /// </summary>
        /// <param name="oorderInfo"></param>
        /// <param name="websiteOwner"></param>
        public void ReceiptConfirm(ElemeRequset reqEleme, WebsiteInfo websiteModel)
        {
            var sign  = reqEleme.signature;
            var value = GetSign(reqEleme, websiteModel);

            if (sign == value)
            {
                RespApplyCencel oorder    = ZentCloud.Common.JSONHelper.JsonToModel <RespApplyCencel>(reqEleme.message);
                WXMallOrderInfo mallOrder = bllMall.Get <WXMallOrderInfo>(string.Format(" WebsiteOwner='{0}' AND OutOrderId='{1}'", websiteModel.WebsiteOwner, oorder.orderId));
                if (mallOrder != null)
                {
                    mallOrder.Status         = "交易成功";
                    mallOrder.ReceivingTime  = DateTime.Now;
                    mallOrder.OutOrderStatus = GetRefStatus(oorder.refundStatus);
                    bllMall.Update(mallOrder);
                }
                resp.msg = "ok";
            }
            else
            {
                resp.msg = "验签错误";
            }
            Response.Write(ZentCloud.Common.JSONHelper.ObjectToJson(resp));
        }