예제 #1
0
        private void BankPaySave_Click(object sender, EventArgs e)
        {
            int[]  serialids = new int[] { Globals.ToNum(this.HiddenSid.Value) };
            string remark    = "转账流水号:" + this.bankPayNum.Text;

            if (MemberAmountProcessor.SetAmountRequestStatus(serialids, 2, remark, "", ManagerHelper.GetCurrentManager().UserName))
            {
                MemberAmountRequestInfo amountRequestDetail = MemberAmountProcessor.GetAmountRequestDetail(Globals.ToNum(this.HiddenSid.Value));
                if (amountRequestDetail != null)
                {
                    string url = Globals.FullPath("/Vshop/MemberAmountRequestDetail.aspx?Id=" + amountRequestDetail.Id);
                    try
                    {
                        Messenger.SendWeiXinMsg_MemberAmountDrawCashRelease(amountRequestDetail, url);
                    }
                    catch
                    {
                    }
                }
                this.ShowMsg("结算成功", true);
                this.BindData();
            }
            else
            {
                this.ShowMsg("结算失败", false);
            }
        }
예제 #2
0
 protected void Button3_Click(object sender, EventArgs e)
 {
     int[] serialids = new int[] { Globals.ToNum(this.hSerialID.Value) };
     if (serialids[0] != 0)
     {
         switch (MemberAmountProcessor.GetAmountRequestStatus(serialids[0]))
         {
         case -1:
         case 2:
             this.ShowMsg("当前项数据不可以驳回,操作终止!", false);
             return;
         }
         if (MemberAmountProcessor.SetAmountRequestStatus(serialids, -1, this.SignalrefuseMks.Text, "", ManagerHelper.GetCurrentManager().UserName))
         {
             this.UpdateNotify("申请提现驳回");
             this.ShowMsg("申请已驳回!", true);
             this.LoadParameters();
             this.BindData();
         }
         else
         {
             this.ShowMsg("申请驳回失败,请再次尝试", false);
         }
     }
 }
예제 #3
0
        protected void PassCheck_Click(object sender, EventArgs e)
        {
            decimal result = 0M;
            int     num2   = 0;

            if (int.TryParse(this.HSid.Value, out num2) && decimal.TryParse(this.ReqSum.Text, out result))
            {
                int[] serialids = new int[] { num2 };
                if (MemberAmountProcessor.SetAmountRequestStatus(serialids, 1, "", result.ToString(), ManagerHelper.GetCurrentManager().UserName))
                {
                    this.UpdateNotify("申请提现审核成功");
                    this.ShowMsg("审核已通过", true);
                }
                else
                {
                    this.ShowMsg("审核失败,请再次尝试", false);
                }
                this.LoadParameters();
                this.BindData();
            }
            else
            {
                this.ShowMsg("提现金额请填写数值", false);
            }
        }
예제 #4
0
 protected void Button3_Click(object sender, System.EventArgs e)
 {
     int[] array = new int[]
     {
         Globals.ToNum(this.hSerialID.Value)
     };
     if (array[0] != 0)
     {
         int amountRequestStatus = MemberAmountProcessor.GetAmountRequestStatus(array[0]);
         if (amountRequestStatus == -1 || amountRequestStatus == 2)
         {
             this.ShowMsg("当前项数据不可以驳回,操作终止!", false);
             return;
         }
         if (MemberAmountProcessor.SetAmountRequestStatus(array, -1, this.SignalrefuseMks.Text, "", ManagerHelper.GetCurrentManager().UserName))
         {
             this.UpdateNotify("申请提现驳回");
             this.ShowMsg("申请已驳回!", true);
             this.LoadParameters();
             this.BindData();
             return;
         }
         this.ShowMsg("申请驳回失败,请再次尝试", false);
     }
 }
예제 #5
0
        private void WeiRedPack_Click(object sender, EventArgs e)
        {
            int     serialid = Globals.ToNum(this.HiddenSid.Value);
            decimal num2     = decimal.Parse(this.hdreferralblance.Value);

            if (num2 > 200M)
            {
                this.ShowMsg("红包金额大于200,无法发放!", false);
            }
            else
            {
                MemberAmountRequestInfo amountRequestDetail = MemberAmountProcessor.GetAmountRequestDetail(serialid);
                if ((amountRequestDetail != null) && !string.IsNullOrEmpty(amountRequestDetail.RedpackId))
                {
                    if (amountRequestDetail.State == RequesState.已发放)
                    {
                        this.ShowMsg("该申请已经支付,请检查", false);
                    }
                    else if (amountRequestDetail.State == RequesState.驳回)
                    {
                        this.ShowMsg("该申请已经驳回,请检查", false);
                    }
                    else
                    {
                        string str = this.SendRedPack(amountRequestDetail.AccountCode, "", "恭喜您提现成功!", "您的提现申请已成功", "会员余额发红包提现", ((int)num2) * 100, amountRequestDetail.RedpackId);
                        if (str == "success")
                        {
                            MemberAmountProcessor.SetAmountRequestStatus(new int[] { serialid }, 2, "微信红包付款", "", ManagerHelper.GetCurrentManager().UserName);
                            string url = Globals.FullPath("/Vshop/MemberAmountRequestDetail.aspx?Id=" + amountRequestDetail.Id);
                            try
                            {
                                Messenger.SendWeiXinMsg_MemberAmountDrawCashRelease(amountRequestDetail, url);
                            }
                            catch
                            {
                            }
                            this.ShowMsg("红包发送成功!", true);
                            this.LoadParameters();
                            this.BindData();
                        }
                        else if (str.Contains("openid"))
                        {
                            MemberAmountProcessor.SetAmountRequestStatus(new int[] { serialid }, 3, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss  ") + str, num2.ToString(), ManagerHelper.GetCurrentManager().UserName);
                            this.LoadParameters();
                            this.BindData();
                        }
                        else
                        {
                            MemberAmountProcessor.SetAmountRequestStatus(new int[] { serialid }, 1, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss  ") + str, num2.ToString(), ManagerHelper.GetCurrentManager().UserName);
                            this.ShowMsg("发送失败,原因是:" + str, false);
                        }
                    }
                }
                else
                {
                    this.ShowMsg("发送失败0!", false);
                }
            }
        }
예제 #6
0
        protected void BatchPass_Click(object sender, EventArgs e)
        {
            string str = "";

            if (!string.IsNullOrEmpty(base.Request["CheckBoxGroup"]))
            {
                str = base.Request["CheckBoxGroup"];
            }
            else
            {
                this.ShowMsg("参数错误!", false);
                return;
            }
            int[] serialids = Array.ConvertAll <string, int>(str.Split(new char[] { ',' }), s => Globals.ToNum(s));
            Dictionary <int, int> mulAmountRequestStatus = MemberAmountProcessor.GetMulAmountRequestStatus(serialids);
            ArrayList             list = new ArrayList();

            foreach (int num in serialids)
            {
                if (mulAmountRequestStatus.ContainsKey(num) && (mulAmountRequestStatus[num] == 0))
                {
                    list.Add(num);
                }
            }
            if (list.Count == 0)
            {
                this.ShowMsg("没有未审核状态的数据,操作终止!", false);
            }
            else
            {
                serialids = (int[])list.ToArray(typeof(int));
                if (serialids.Length > 0)
                {
                    if (MemberAmountProcessor.SetAmountRequestStatus(serialids, 1, "", "", ManagerHelper.GetCurrentManager().UserName))
                    {
                        this.UpdateNotify("申请提现批量审核成功");
                        this.ShowMsg("批量审核成功!", true);
                    }
                    else
                    {
                        this.ShowMsg("批量审核失败,请再次尝试", false);
                    }
                    this.LoadParameters();
                    this.BindData();
                }
            }
        }
예제 #7
0
        protected void BatchPass_Click(object sender, System.EventArgs e)
        {
            if (string.IsNullOrEmpty(base.Request["CheckBoxGroup"]))
            {
                this.ShowMsg("参数错误!", false);
                return;
            }
            string text = base.Request["CheckBoxGroup"];

            string[] array = text.Split(new char[]
            {
                ','
            });
            int[] array2 = System.Array.ConvertAll <string, int>(array, (string s) => Globals.ToNum(s));
            System.Collections.Generic.Dictionary <int, int> mulAmountRequestStatus = MemberAmountProcessor.GetMulAmountRequestStatus(array2);
            System.Collections.ArrayList arrayList = new System.Collections.ArrayList();
            int[] array3 = array2;
            for (int i = 0; i < array3.Length; i++)
            {
                int num = array3[i];
                if (mulAmountRequestStatus.ContainsKey(num) && mulAmountRequestStatus[num] == 0)
                {
                    arrayList.Add(num);
                }
            }
            if (arrayList.Count == 0)
            {
                this.ShowMsg("没有未审核状态的数据,操作终止!", false);
                return;
            }
            array2 = (int[])arrayList.ToArray(typeof(int));
            if (array2.Length > 0)
            {
                if (MemberAmountProcessor.SetAmountRequestStatus(array2, 1, "", "", ManagerHelper.GetCurrentManager().UserName))
                {
                    this.UpdateNotify("申请提现批量审核成功");
                    this.ShowMsg("批量审核成功!", true);
                }
                else
                {
                    this.ShowMsg("批量审核失败,请再次尝试", false);
                }
                this.LoadParameters();
                this.BindData();
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            SortedDictionary <string, string> requestPost = this.GetRequestPost();

            if (requestPost.Count > 0)
            {
                Notify notify = new Notify();
                if (notify.Verify(requestPost, base.Request.Form["notify_id"], base.Request.Form["sign"]))
                {
                    string str = base.Request.Form["success_details"];
                    try
                    {
                        if (!string.IsNullOrEmpty(str))
                        {
                            foreach (string str2 in str.Split(new char[] { '|' }))
                            {
                                string[] strArray2 = str2.Split(new char[] { '^' });
                                if (strArray2.Length >= 8)
                                {
                                    MemberAmountRequestInfo amountRequestDetail = MemberAmountProcessor.GetAmountRequestDetail(int.Parse(strArray2[0]));
                                    if ((amountRequestDetail != null) && (amountRequestDetail.State != RequesState.已发放))
                                    {
                                        int[] serialids = new int[] { int.Parse(strArray2[0]) };
                                        MemberAmountProcessor.SetAmountRequestStatus(serialids, 2, "支付宝付款:流水号" + strArray2[6] + ",支付时间:" + strArray2[7], "", ManagerHelper.GetCurrentManager().UserName);
                                        string url = Globals.FullPath("/Vshop/MemberAmountRequestDetail.aspx?Id=" + amountRequestDetail.Id);
                                        try
                                        {
                                            Messenger.SendWeiXinMsg_MemberAmountDrawCashRelease(amountRequestDetail, url);
                                        }
                                        catch
                                        {
                                        }
                                    }
                                }
                            }
                        }
                        string str4 = base.Request.Form["fail_details"];
                        if (!string.IsNullOrEmpty(str4))
                        {
                            foreach (string str5 in str4.Split(new char[] { '|' }))
                            {
                                string[] strArray4 = str5.Split(new char[] { '^' });
                                if (strArray4.Length >= 8)
                                {
                                    MemberAmountRequestInfo info2 = MemberAmountProcessor.GetAmountRequestDetail(int.Parse(strArray4[0]));
                                    if (((info2 != null) && (info2.State != RequesState.已发放)) && (info2.State != RequesState.驳回))
                                    {
                                        int[] numArray2 = new int[] { int.Parse(strArray4[0]) };
                                        MemberAmountProcessor.SetAmountRequestStatus(numArray2, 3, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss  ") + strArray4[5] + strArray4[6], strArray4[3], ManagerHelper.GetCurrentManager().UserName);
                                    }
                                }
                            }
                        }
                    }
                    catch (Exception exception)
                    {
                        try
                        {
                            Globals.Debuglog(DateTime.Now.ToString("[yyyy-MM-dd HH:mm:ss]") + "验证成功,写入数据库失败->" + base.Request.Form.ToString() + "||" + exception.ToString(), "_DebugLogAlipaynotify_url.txt");
                        }
                        catch (Exception)
                        {
                        }
                    }
                    base.Response.Write("success");
                }
                else
                {
                    base.Response.Write("fail");
                    try
                    {
                        Globals.Debuglog(DateTime.Now.ToString("[yyyy-MM-dd HH:mm:ss]") + "验证失败1,写入数据库失败->" + base.Request.Form.ToString(), "_DebugLogAlipaynotify_url.txt");
                    }
                    catch (Exception)
                    {
                    }
                }
            }
            else
            {
                base.Response.Write("无通知参数");
            }
        }
예제 #9
0
        private void weipaySend_Click(object sender, EventArgs e)
        {
            int     serialid = Globals.ToNum(this.HiddenSid.Value);
            decimal num2     = decimal.Parse(this.hdreferralblance.Value);
            MemberAmountRequestInfo amountRequestDetail = MemberAmountProcessor.GetAmountRequestDetail(serialid);

            if (amountRequestDetail != null)
            {
                if (amountRequestDetail.State == RequesState.已发放)
                {
                    this.ShowMsg("该申请已经支付,请检查", false);
                }
                else if (amountRequestDetail.State == RequesState.驳回)
                {
                    this.ShowMsg("该申请已经驳回,请检查", false);
                }
                else if (string.IsNullOrEmpty(amountRequestDetail.RedpackId))
                {
                    this.ShowMsg("商户订单ID为空,请重试!", false);
                }
                else
                {
                    WeiPayResult result = OutPayHelp.SingleWeiPay((int)(num2 * 100M), "用户余额发放!", amountRequestDetail.AccountCode, amountRequestDetail.AccountName, amountRequestDetail.RedpackId, amountRequestDetail.UserId);
                    if (result.result_code == "SUCCESS")
                    {
                        int[] serialids = new int[] { serialid };
                        MemberAmountProcessor.SetAmountRequestStatus(serialids, 2, "微信企业付款", "", ManagerHelper.GetCurrentManager().UserName);
                        int    userId = amountRequestDetail.UserId;
                        string url    = Globals.FullPath("/Vshop/MemberAmountRequestDetail.aspx?Id=" + amountRequestDetail.Id);
                        try
                        {
                            Messenger.SendWeiXinMsg_MemberAmountDrawCashRelease(amountRequestDetail, url);
                        }
                        catch
                        {
                        }
                        this.LoadParameters();
                        this.BindData();
                        this.ShowMsg("支付成功!", true);
                    }
                    else
                    {
                        if (((result.err_code == "OPENID_ERROR") || (result.err_code == "NAME_MISMATCH")) || (result.return_msg.Contains("openid字段") || (result.err_code == "FATAL_ERROR")))
                        {
                            MemberAmountProcessor.SetAmountRequestStatus(new int[] { serialid }, 3, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss  ") + result.return_msg, num2.ToString(), ManagerHelper.GetCurrentManager().UserName);
                            this.LoadParameters();
                            this.BindData();
                        }
                        else
                        {
                            MemberAmountProcessor.SetAmountRequestStatus(new int[] { serialid }, 1, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss  ") + result.return_msg, num2.ToString(), ManagerHelper.GetCurrentManager().UserName);
                        }
                        this.ShowMsg("微信企业付款失败," + result.return_msg, false);
                    }
                }
            }
            else
            {
                this.ShowMsg("参数错误!", false);
            }
        }
예제 #10
0
        private void BatchPaySend_Click(object sender, EventArgs e)
        {
            this.GetPaySetting();
            string str = "";

            if (!string.IsNullOrEmpty(base.Request["CheckBoxGroup"]))
            {
                str = base.Request["CheckBoxGroup"];
            }
            else
            {
                this.ShowMsg("参数错误!", false);
                return;
            }
            string str2 = this.PaybatchType.Value;

            if (str2 == "0")
            {
                string[]             strArray      = str.Split(new char[] { ',' });
                List <OutPayWeiInfo> batchUserList = new List <OutPayWeiInfo>();
                foreach (string str3 in strArray)
                {
                    MemberAmountRequestInfo amountRequestDetail = MemberAmountProcessor.GetAmountRequestDetail(int.Parse(str3));
                    if (((amountRequestDetail != null) && (amountRequestDetail.State == RequesState.已审核)) && (this.DrawMinNum <= amountRequestDetail.Amount))
                    {
                        OutPayWeiInfo item = new OutPayWeiInfo
                        {
                            Amount           = ((int)amountRequestDetail.Amount) * 100,
                            Partner_Trade_No = amountRequestDetail.RedpackId,
                            Openid           = amountRequestDetail.AccountCode,
                            Re_User_Name     = amountRequestDetail.AccountName,
                            Desc             = " 用户余额发放",
                            UserId           = amountRequestDetail.UserId,
                            Nonce_Str        = OutPayHelp.GetRandomString(20),
                            Sid = amountRequestDetail.Id
                        };
                        batchUserList.Add(item);
                    }
                }
                if (batchUserList.Count < 1)
                {
                    this.ShowMsg("没有满足条件的提现请求!", false);
                    this.LoadParameters();
                    this.BindData();
                }
                else
                {
                    List <WeiPayResult> list2 = OutPayHelp.BatchWeiPay(batchUserList);
                    if (list2.Count < 1)
                    {
                        this.ShowMsg("系统异常,请联系管理员!", false);
                    }
                    else if (list2[0].return_code == "INITFAIL")
                    {
                        this.ShowMsg(list2[0].return_msg, false);
                    }
                    else
                    {
                        int    num   = 0;
                        int    num2  = 0;
                        int    num3  = 0;
                        int    count = batchUserList.Count;
                        string str4  = "<div class='errRow'>支付失败信息如下:";
                        using (List <WeiPayResult> .Enumerator enumerator = list2.GetEnumerator())
                        {
                            while (enumerator.MoveNext())
                            {
                                Func <OutPayWeiInfo, bool> predicate = null;
                                WeiPayResult rItem = enumerator.Current;
                                if (predicate == null)
                                {
                                    predicate = t => t.Partner_Trade_No == rItem.partner_trade_no;
                                }
                                int sid = batchUserList.FirstOrDefault <OutPayWeiInfo>(predicate).Sid;
                                if (rItem.result_code == "SUCCESS")
                                {
                                    int[] serialids = new int[] { sid };
                                    MemberAmountProcessor.SetAmountRequestStatus(serialids, 2, "微信企业付款:流水号" + rItem.payment_no, "", ManagerHelper.GetCurrentManager().UserName);
                                    int userId = rItem.UserId;
                                    MemberAmountRequestInfo balance = MemberAmountProcessor.GetAmountRequestDetail(sid);
                                    if (balance != null)
                                    {
                                        string url = Globals.FullPath("/Vshop/MemberAmountRequestDetail.aspx?Id=" + balance.Id);
                                        try
                                        {
                                            Messenger.SendWeiXinMsg_MemberAmountDrawCashRelease(balance, url);
                                        }
                                        catch
                                        {
                                        }
                                    }
                                    num3 += rItem.Amount / 100;
                                    num++;
                                }
                                else
                                {
                                    if (((rItem.err_code == "OPENID_ERROR") || (rItem.err_code == "NAME_MISMATCH")) || (rItem.return_msg.Contains("openid字段") || (rItem.err_code == "FATAL_ERROR")))
                                    {
                                        MemberAmountProcessor.SetAmountRequestStatus(new int[] { sid }, 3, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss  ") + rItem.return_msg, "", ManagerHelper.GetCurrentManager().UserName);
                                    }
                                    else
                                    {
                                        MemberAmountProcessor.SetAmountRequestStatus(new int[] { sid }, 1, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss  ") + rItem.return_msg, "", ManagerHelper.GetCurrentManager().UserName);
                                    }
                                    string str6 = str4;
                                    str4 = str6 + "<br>ID:" + rItem.partner_trade_no + ", 出错提示:" + rItem.return_msg;
                                    num2++;
                                }
                            }
                        }
                        count = (count - num2) - num;
                        str4  = str4 + "</div>";
                        if ((num3 == num) && (num3 != 0))
                        {
                            this.ShowMsg("全部支付成功", true);
                        }
                        else
                        {
                            this.ShowMsg(string.Concat(new object[] { "本次成功支付金额", num3, "元,其中成功", num, "笔,失败", num2, "笔,异常放弃", count, "笔", str4 }), false);
                        }
                        this.LoadParameters();
                        this.BindData();
                    }
                }
            }
            else if (str2 == "1")
            {
                this.ShowMsg("接口暂未开通", false);
            }
            else
            {
                this.ShowMsg("未定义支付方式", false);
            }
        }
예제 #11
0
        private void BatchPaySend_Click(object sender, System.EventArgs e)
        {
            this.GetPaySetting();
            if (string.IsNullOrEmpty(base.Request["CheckBoxGroup"]))
            {
                this.ShowMsg("参数错误!", false);
                return;
            }
            string text  = base.Request["CheckBoxGroup"];
            string value = this.PaybatchType.Value;

            if (value == "0")
            {
                string[] array = text.Split(new char[]
                {
                    ','
                });
                System.Collections.Generic.List <OutPayWeiInfo> list = new System.Collections.Generic.List <OutPayWeiInfo>();
                string[] array2 = array;
                for (int i = 0; i < array2.Length; i++)
                {
                    string s = array2[i];
                    MemberAmountRequestInfo amountRequestDetail = MemberAmountProcessor.GetAmountRequestDetail(int.Parse(s));
                    if (amountRequestDetail != null && amountRequestDetail.State == RequesState.已审核 && this.DrawMinNum <= amountRequestDetail.Amount)
                    {
                        list.Add(new OutPayWeiInfo
                        {
                            Amount           = (int)amountRequestDetail.Amount * 100,
                            Partner_Trade_No = amountRequestDetail.RedpackId,
                            Openid           = amountRequestDetail.AccountCode,
                            Re_User_Name     = amountRequestDetail.AccountName,
                            Desc             = " 用户余额发放",
                            UserId           = amountRequestDetail.UserId,
                            Nonce_Str        = OutPayHelp.GetRandomString(20),
                            Sid = amountRequestDetail.Id
                        });
                    }
                }
                if (list.Count < 1)
                {
                    this.ShowMsg("没有满足条件的提现请求!", false);
                    this.LoadParameters();
                    this.BindData();
                    return;
                }
                System.Collections.Generic.List <WeiPayResult> list2 = OutPayHelp.BatchWeiPay(list);
                if (list2.Count < 1)
                {
                    this.ShowMsg("系统异常,请联系管理员!", false);
                    return;
                }
                if (list2[0].return_code == "INITFAIL")
                {
                    this.ShowMsg(list2[0].return_msg, false);
                    return;
                }
                int    num   = 0;
                int    num2  = 0;
                int    num3  = 0;
                int    num4  = list.Count;
                string text2 = "<div class='errRow'>支付失败信息如下:";
                using (System.Collections.Generic.List <WeiPayResult> .Enumerator enumerator = list2.GetEnumerator())
                {
                    while (enumerator.MoveNext())
                    {
                        WeiPayResult rItem = enumerator.Current;
                        int          sid   = list.FirstOrDefault((OutPayWeiInfo t) => t.Partner_Trade_No == rItem.partner_trade_no).Sid;
                        if (rItem.result_code == "SUCCESS")
                        {
                            int[] serialids = new int[]
                            {
                                sid
                            };
                            MemberAmountProcessor.SetAmountRequestStatus(serialids, 2, "微信企业付款:流水号" + rItem.payment_no, "", ManagerHelper.GetCurrentManager().UserName);
                            int arg_298_0 = rItem.UserId;
                            MemberAmountRequestInfo amountRequestDetail2 = MemberAmountProcessor.GetAmountRequestDetail(sid);
                            if (amountRequestDetail2 != null)
                            {
                                string url = Globals.FullPath("/Vshop/MemberAmountRequestDetail.aspx?Id=" + amountRequestDetail2.Id);
                                try
                                {
                                    Messenger.SendWeiXinMsg_MemberAmountDrawCashRelease(amountRequestDetail2, url);
                                }
                                catch
                                {
                                }
                            }
                            num3 += rItem.Amount / 100;
                            num++;
                        }
                        else
                        {
                            if (rItem.err_code == "OPENID_ERROR" || rItem.err_code == "NAME_MISMATCH" || rItem.return_msg.Contains("openid字段") || rItem.err_code == "FATAL_ERROR")
                            {
                                MemberAmountProcessor.SetAmountRequestStatus(new int[]
                                {
                                    sid
                                }, 3, System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss  ") + rItem.return_msg, "", ManagerHelper.GetCurrentManager().UserName);
                            }
                            else
                            {
                                MemberAmountProcessor.SetAmountRequestStatus(new int[]
                                {
                                    sid
                                }, 1, System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss  ") + rItem.return_msg, "", ManagerHelper.GetCurrentManager().UserName);
                            }
                            string text3 = text2;
                            text2 = string.Concat(new string[]
                            {
                                text3,
                                "<br>ID:",
                                rItem.partner_trade_no,
                                ", 出错提示:",
                                rItem.return_msg
                            });
                            num2++;
                        }
                    }
                }
                num4   = num4 - num2 - num;
                text2 += "</div>";
                if (num3 == num && num3 != 0)
                {
                    this.ShowMsg("全部支付成功", true);
                }
                else
                {
                    this.ShowMsg(string.Concat(new object[]
                    {
                        "本次成功支付金额",
                        num3,
                        "元,其中成功",
                        num,
                        "笔,失败",
                        num2,
                        "笔,异常放弃",
                        num4,
                        "笔",
                        text2
                    }), false);
                }
                this.LoadParameters();
                this.BindData();
                return;
            }
            else
            {
                if (value == "1")
                {
                    this.ShowMsg("接口暂未开通", false);
                    return;
                }
                this.ShowMsg("未定义支付方式", false);
                return;
            }
        }
예제 #12
0
 protected void Page_Load(object sender, System.EventArgs e)
 {
     System.Collections.Generic.SortedDictionary <string, string> requestPost = this.GetRequestPost();
     if (requestPost.Count > 0)
     {
         Notify notify = new Notify();
         bool   flag   = notify.Verify(requestPost, base.Request.Form["notify_id"], base.Request.Form["sign"]);
         if (flag)
         {
             string text = base.Request.Form["success_details"];
             try
             {
                 if (!string.IsNullOrEmpty(text))
                 {
                     string[] array = text.Split(new char[]
                     {
                         '|'
                     });
                     string[] array2 = array;
                     for (int i = 0; i < array2.Length; i++)
                     {
                         string   text2  = array2[i];
                         string[] array3 = text2.Split(new char[]
                         {
                             '^'
                         });
                         if (array3.Length >= 8)
                         {
                             MemberAmountRequestInfo amountRequestDetail = MemberAmountProcessor.GetAmountRequestDetail(int.Parse(array3[0]));
                             if (amountRequestDetail != null && amountRequestDetail.State != RequesState.已发放)
                             {
                                 int[] serialids = new int[]
                                 {
                                     int.Parse(array3[0])
                                 };
                                 MemberAmountProcessor.SetAmountRequestStatus(serialids, 2, "支付宝付款:流水号" + array3[6] + ",支付时间:" + array3[7], "", ManagerHelper.GetCurrentManager().UserName);
                                 string url = Globals.FullPath("/Vshop/MemberAmountRequestDetail.aspx?Id=" + amountRequestDetail.Id);
                                 try
                                 {
                                     Messenger.SendWeiXinMsg_MemberAmountDrawCashRelease(amountRequestDetail, url);
                                 }
                                 catch
                                 {
                                 }
                             }
                         }
                     }
                 }
                 string text3 = base.Request.Form["fail_details"];
                 if (!string.IsNullOrEmpty(text3))
                 {
                     string[] array4 = text3.Split(new char[]
                     {
                         '|'
                     });
                     string[] array5 = array4;
                     for (int j = 0; j < array5.Length; j++)
                     {
                         string   text4  = array5[j];
                         string[] array6 = text4.Split(new char[]
                         {
                             '^'
                         });
                         if (array6.Length >= 8)
                         {
                             MemberAmountRequestInfo amountRequestDetail2 = MemberAmountProcessor.GetAmountRequestDetail(int.Parse(array6[0]));
                             if (amountRequestDetail2 != null && amountRequestDetail2.State != RequesState.已发放 && amountRequestDetail2.State != RequesState.驳回)
                             {
                                 int[] serialids2 = new int[]
                                 {
                                     int.Parse(array6[0])
                                 };
                                 MemberAmountProcessor.SetAmountRequestStatus(serialids2, 3, System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss  ") + array6[5] + array6[6], array6[3], ManagerHelper.GetCurrentManager().UserName);
                             }
                         }
                     }
                 }
             }
             catch (System.Exception ex)
             {
                 try
                 {
                     Globals.Debuglog(string.Concat(new string[]
                     {
                         System.DateTime.Now.ToString("[yyyy-MM-dd HH:mm:ss]"),
                         "验证成功,写入数据库失败->",
                         base.Request.Form.ToString(),
                         "||",
                         ex.ToString()
                     }), "_DebugLogAlipaynotify_url.txt");
                 }
                 catch (System.Exception)
                 {
                 }
             }
             base.Response.Write("success");
             return;
         }
         base.Response.Write("fail");
         try
         {
             Globals.Debuglog(System.DateTime.Now.ToString("[yyyy-MM-dd HH:mm:ss]") + "验证失败1,写入数据库失败->" + base.Request.Form.ToString(), "_DebugLogAlipaynotify_url.txt");
             return;
         }
         catch (System.Exception)
         {
             return;
         }
     }
     base.Response.Write("无通知参数");
 }