Ejemplo n.º 1
0
        public void PingAnFreeze(PingAnOrderPaid pingAnOrderPaid, string tradeTime)
        {
            var iPingAnOrderPaidService = DIFactory.GetContainer().Resolve <IPingAnOrderPaidService>();
            var iMemberService          = DIFactory.GetContainer().Resolve <IMemberService>();

            pingAnOrderPaid.Status            = PingAnOrderPaidStatusOption.FrozenSuccess.ToInt();
            pingAnOrderPaid.FreezeSuccessTime = Convert.ToDateTime(tradeTime);

            iPingAnOrderPaidService.Save(pingAnOrderPaid);
            iPingAnOrderPaidService.Commit();

            pingAnOrderPaid.OrderPaid.Project.ReceiveAmount += pingAnOrderPaid.OrderPaid.TransactionAmount;
            Save(pingAnOrderPaid.OrderPaid);

            iMemberService.BalanceChange(pingAnOrderPaid.OrderPaid.Member, pingAnOrderPaid.OrderPaid.TransactionAmount * -1, MemberBalanceHistoryTypeOption.Freeze, (AccountBankOption)pingAnOrderPaid.OrderPaid.Merchant.AccountBank, pingAnOrderPaid.OrderPaid.TransactionAmount, remark: pingAnOrderPaid.OrderPaid.OrderNumber);    //修改金额

            Commit();
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 免登接口
        /// </summary>
        /// <returns></returns>
        public AutoLoginResponse AutoLogin(PingAnOrderPaid pingAnOrderPaid, Member member)
        {
            AutoLoginRequest request = new AutoLoginRequest();

            request.accNo        = pingAnOrderPaid.ClientNo;
            request.clientIdNo   = member.IDNumber;
            request.clientIdType = "1";
            request.clientName   = member.Name;
            request.mchId        = channel;
            request.redirectUrl  = redirectUrl;
            request.state        = returnUrl + pingAnOrderPaid.BankOrderNo;
            request.telNo        = member.Mobile;
            request.thirdMid     = member.Mobile;
            request.timestamp    = ((DateTime.Now.ToUniversalTime().Ticks - 621355968000000000) / 10000).ToString();
            request.umCode       = "";

            var response = pingAnExec.GetAutoLoginPath(request);

            return(response as AutoLoginResponse);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 预下单接口
        /// </summary>
        /// <returns></returns>
        public PreparedFreezeOrderResponse PreparedFreezeOrder(OrderPaid orderPaid, PingAnOrderPaid pingAnOrderPaid)
        {
            PreparedFreezeOrderRequest request = new PreparedFreezeOrderRequest();

            request.channel         = pingAnOrderPaid.Channel;
            request.userName        = orderPaid.MemberName;
            request.cardNumber      = orderPaid.MemberIDNumber;
            request.mobile          = orderPaid.MemberMobile;
            request.businessName    = pingAnOrderPaid.BusinessName;
            request.orderValidDay   = pingAnOrderPaid.OrderValidDay;
            request.freezeAmt       = Convert.ToDouble(orderPaid.TransactionAmount);
            request.freezeTimeLimit = pingAnOrderPaid.FreezeTimeLimit;
            request.freezeProduct   = pingAnOrderPaid.FreezeProduct;
            request.autoFreeze      = pingAnOrderPaid.AutoFreeze;
            request.transCode       = pingAnOrderPaid.TransCode;

            var response = pingAnExec.Exec(request);

            return(response as PreparedFreezeOrderResponse);
        }