예제 #1
0
        public ActionResult GetPendingTransferTransaction(PayWay payWay, int page)
        {
            var count1 = IoC.Resolve<ITransferTransactionQuery>().GetTransferTransactionCountBySearch("", 0, "", null, null, TransactionState.Pending, payWay);
            var count2 = IoC.Resolve<ITransferTransactionQuery>().GetTransferTransactionCountBySearch("", 0, "", null, null, TransactionState.Init, payWay);
            var result1 = IoC.Resolve<ITransferTransactionQuery>().GetTransferTransactionBySearch("", 0, "", null, null, TransactionState.Pending, payWay, "ASC", page, Constants.DEFAULT_PAGE_COUNT);
            var result2 = IoC.Resolve<ITransferTransactionQuery>().GetTransferTransactionBySearch("", 0, "", null, null, TransactionState.Init, payWay, "ASC", page, Constants.DEFAULT_PAGE_COUNT);
            var result = from tx in result1.Union<TransferTransaction>(result2)
                         select new TransferTransaction
                         {
                             Account = tx.Account,
                             Amount = tx.Amount,
                             CreateAt = tx.CreateAt,
                             DoneAt = tx.DoneAt,
                             ID = tx.ID,
                             Memo = tx.Memo,
                             PayWay = tx.PayWay,
                             RealName = tx.RealName,
                             Reason = tx.Reason,
                             SequenceNo = FormatString(tx.SequenceNo, 20, ' '),
                             SourcePayway = tx.SourcePayway,
                             State = tx.State,
                             TransferNo = FormatString(tx.TransferNo, 20, ' '),
                             TxId = FormatString(tx.TxId, 32, ' '),
                             OperatorName = tx.State == TransactionState.Init ? string.Empty : tx.OperatorID == 3 ? "巨蟹" : tx.OperatorID == 4 ? "大头" : "涛"
                         };

            return Json(new { count = count1 + count2, result = result.OrderByDescending(q => q.CreateAt) });
        }
 public InboundTransferToThirdPartyPaymentTxComplete(int transferID, PayWay transferPayway, string transferNo, int byUserID)
 {
     this.TransferID = transferID;
     this.TransferPayWay = transferPayway;
     this.TransferNo = transferNo;
     this.ByUserID = byUserID;
 }
예제 #3
0
        /// <summary>
        /// 创建支付服务
        /// </summary>
        /// <param name="way">支付方式</param>
        public IPayService CreatePayService(PayWay way)
        {
            switch (way)
            {
            case PayWay.AlipayBarcodePay:
                return(new AlipayBarcodePayService(_alipayConfigProvider));

            case PayWay.AlipayQrCodePay:
                return(new AlipayQrCodePayService(_alipayConfigProvider));

            case PayWay.AlipayPagePay:
                return(new AlipayPagePayService(_alipayConfigProvider));

            case PayWay.AlipayWapPay:
                return(new AlipayWapPayService(_alipayConfigProvider));

            case PayWay.AlipayAppPay:
                return(new AlipayAppPayService(_alipayConfigProvider));

            case PayWay.WechatpayAppPay:
                return(new WechatpayAppPayService(_wechatpayConfigProvider));

            case PayWay.WechatpayMiniProgramPay:
                return(new WechatpayMiniProgramPayService(_wechatpayConfigProvider));

            case PayWay.WechatpayJsApiPay:
                return(new WechatpayJsApiPayService(_wechatpayConfigProvider));
            }
            throw new NotImplementedException(way.Description());
        }
예제 #4
0
 private void button8_Click_1(object sender, EventArgs e)
 {
     this.resetTimeOut();
     this.payWaySelect      = true;
     this.payWay            = PayWay.WECHAT;
     this.button8.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(150)))), ((int)(((byte)(0)))));
     this.button7.BackColor = System.Drawing.Color.DimGray;
 }
예제 #5
0
 public UserReceiverAccountCreated(int userID, PayWay payway, string bankAccount, string receiverName)
 {
     this.BankAccountOwnerID = userID;
     //this.BankID = bankID;
     this.PayWay = payway;
     this.BankAccount = bankAccount;
     this.ReceiverName = receiverName;
 }
예제 #6
0
 private void button7_Click_1(object sender, EventArgs e)
 {
     this.resetTimeOut();
     this.payWaySelect      = true;
     this.payWay            = PayWay.ALIPAY;
     this.button7.BackColor = System.Drawing.Color.DodgerBlue;
     this.button8.BackColor = System.Drawing.Color.DimGray;
 }
예제 #7
0
        public CreateInboundCNYDeposit(int userID, decimal amount, PayWay sourcePayway, string txid)
        {
            Check.Argument.IsNotNegativeOrZero(userID, "userID");

            this.UserID = userID;
            this.SourcePayway = sourcePayway;
            this.Amount = amount;
            this.InboundTxId = txid;
        }
예제 #8
0
        public ActionResult OutsideTransferConfirm(PayWay payway, string orderID)
        {
            var transfer = IoC.Resolve<IOutsideTransferQuery>().GetOutsideTransferBySequenceNo(orderID, TransactionState.Init);

            ViewBag.PayWay = payway;
            ViewBag.Transfer = transfer;

            return View("OutboundTppConfirm");
        }
 public RippleInboundTxToThirdPartyPaymentCreated(PayWay payway, string destination, string realName, decimal amount, decimal sendAmount, string memo)
 {
     this.PayWay = payway;
     this.Destination = destination;
     this.Amount = amount;
     this.SendAmount = sendAmount;
     this.Memo = memo;
     this.RealName = realName;
 }
예제 #10
0
파일: PayFactory.cs 프로젝트: zyhong/Util
 /// <summary>
 /// 创建支付服务
 /// </summary>
 /// <param name="way">支付方式</param>
 public IPayService CreatePayService(PayWay way)
 {
     switch (way)
     {
     case PayWay.AlipayBarcodePay:
         return(new AlipayBarcodePayService(_alipayConfigProvider));
     }
     throw new NotImplementedException();
 }
 public InboundTransferToThirdPartyPaymentTxCreated(string txid, string account, PayWay payway, decimal amount, PayWay sourcePayway, string realName, string memo)
 {
     this.TxId = txid;
     this.Account = account;
     this.Amount = amount;
     this.PayWay = payway;
     this.SourcePayway = sourcePayway;
     this.Memo = memo;
     this.RealName = realName;
 }
예제 #12
0
        /// <summary>
        /// 线下二维码预下单  用于C扫B业务预下单
        /// </summary>
        /// <param name="payWay">支付类型</param>
        /// <param name="out_order_no">商户订单号,不可重复</param>
        /// <param name="total_amount">订单总金额</param>
        /// <param name="body">交易或商品描述</param>
        /// <param name="create_time">订单创建时间 yyyyMMddHHmmss</param>
        /// <returns>过滤后的参数组</returns>
        public static string Percreate(PayWay payWay, string out_order_no, string total_amount, string body, string create_time)
        {
            string ip = GetLocalIp();

            if (ip == null)
            {
                ip = "127.0.0.1";
            }
            return(HeMaPay.Percreate(payWay, out_order_no, total_amount, body, create_time, ip));
        }
 public InsideTransferTransactionCreated(int fromUserID, int toUserID, CurrencyType currency, decimal amount, PayWay payway, string description, InsideTransferTransaction tx)
 {
     this.FromUserID = fromUserID;
     this.ToUserID = toUserID;
     this.Currency = currency;
     this.Amount = amount;
     this.PayWay = payway;
     this.Description = description;
     this.TransactionEntity = tx;
 }
 public OutboundTransferTransactionCreated(int fromUserID, string destination, decimal sourceAmount,
                                         string targetCurrency, decimal targetAmount, PayWay payway, string description, OutboundTransferTransaction txEntity)
 {
     this.FromUserID = fromUserID;
     this.Destination = destination;
     this.SourceAmount = sourceAmount;
     this.TargetCurrency = targetCurrency;
     this.TargetAmount = targetAmount;
     this.PayWay = payway;
     this.Description = description;
     this.TxEntity = txEntity;
 }
예제 #15
0
 public FundSourceCreated(int capitalAccountID, Bank bank, string transferTxNo,
                          PayWay payway, decimal amount, string extra, int createBy,
                          FundSource fundSourceEntity)
 {
     this.CapitalAccountID = capitalAccountID;
     this.Bank = bank;
     this.TransferTxNo = transferTxNo;
     this.Payway = payway;
     this.Amount = amount;
     this.Extra = extra;
     this.CreateBy = createBy;
     this.FundSourceEntity = fundSourceEntity;
 }
예제 #16
0
        public ActionResult CNYWithdraw(bool withdrawToCode, int? accountID, decimal amount, PayWay payway, string bankAccount,
                             string tradePassword, string sms_otp, string ga_otp)
        {
            //if (!CheckUserIsPassRealNameAuthAndEmailIsVerify())
            //{
            //    return Json(new FCJsonResult(-1));
            //}
            var result = default(FCJsonResult);
            var currencySetting = IoC.Resolve<ICurrencyQuery>().GetCurrency(CurrencyType.CNY);

            if (!this.CurrentUser.IsVerifyEmail) result = FCJsonResult.CreateFailResult(this.Lang("Please verify your email before withdraw."));
            else if (string.IsNullOrEmpty(this.CurrentUser.IdNo)) result = FCJsonResult.CreateFailResult(this.Lang("Please update your identity informations before withdraw."));

            else if (!Config.Debug && this.CurrentUser.IsOpenTwoFactorGA && !this.VerifyUserGA(ga_otp))
                result = FCJsonResult.CreateFailResult(this.Lang("Unable to submit your request. Your Google Authenticator code error."));
            else if (!Config.Debug && this.CurrentUser.IsOpenTwoFactorSMS && !this.VerifyUserSms(sms_otp))
                result = FCJsonResult.CreateFailResult(this.Lang("Unable to submit your request. Your Sms Authenticator code error."));
            else if (string.IsNullOrEmpty(tradePassword))
                result = FCJsonResult.CreateFailResult(this.Lang("Unable to submit your request. Your trade passowrd error."));
            else
            {
                try
                {
                    if (!withdrawToCode)
                    {
                        var cmd = new SubmitCNYWithdraw(accountID, this.CurrentUser.UserID, amount, payway, bankAccount.Trim(), tradePassword);
                        this.CommandBus.Send(cmd);
                        this.UpdateUserWithdrawDayLimitRemain(amount, CurrencyType.CNY);
                    }
                    else
                    {
                        var cmd = new WithdrawToDepositCode(CurrencyType.CNY, this.CurrentUser.UserID, amount, tradePassword);
                        this.CommandBus.Send(cmd);
                        this.UpdateUserWithdrawDayLimitRemain(amount, CurrencyType.CNY);
                        return Json(new { Code = 2, Message = this.Lang("Withdraw to DotPay Deposit Code successfully."), DepositCode = cmd.CommandResult });
                    }
                }
                catch (CommandExecutionException ex)
                {
                    if (ex.ErrorCode == (int)ErrorCode.TradePasswordError)
                        result = FCJsonResult.CreateFailResult(this.Lang("Unable to submit your request. Your trade passowrd error."));
                    else if (ex.ErrorCode == (int)ErrorCode.AccountBalanceNotEnough)
                        result = FCJsonResult.CreateFailResult(this.Lang("Unable to submit your request. Your balance is not enough."));
                    else if (ex.ErrorCode == (int)ErrorCode.WithdrawAmountOutOfRange)
                        result = FCJsonResult.CreateFailResult(this.Lang("Unable to submit your request. Request amount out of range."));
                    else Log.Error("Action VirtualCoinWithdraw Error", ex);
                }
            }
            return Json(result);
        }
        public static InboundTransferToThirdPartyPaymentTx CreateInboundTransferTransaction(string txid, string account, decimal amount, PayWay payway, PayWay sourcePayway, string realName, string memo)
        {
            InboundTransferToThirdPartyPaymentTx tx;

            switch (payway)
            {
                case PayWay.Alipay:
                    tx = new ToAlipayTransferTransaction(txid, account, amount, sourcePayway, realName, memo);
                    break;
                case PayWay.Tenpay:
                    tx = new ToTenpayTransferTransaction(txid, account, amount, sourcePayway, realName, memo);
                    break;
                default:
                    tx = new ToBankTransferTransaction(txid, account, amount, sourcePayway, payway, realName, memo);
                    break;
            }

            return tx;
        }
        public static InsideTransferTransaction CreateInsideTransferTransaction(int fromUserID, int toUserID,
                                    CurrencyType currency, decimal amount, PayWay payway, string description)
        {
            InsideTransferTransaction tx;

            switch (currency)
            {
                case CurrencyType.CNY:
                    tx = new CNYInsideTransferTransaction(fromUserID, toUserID, amount, payway, description);
                    break;
                case CurrencyType.USD:
                    tx = new USDInsideTransferTransaction(fromUserID, toUserID, amount, payway, description);
                    break;
                default:
                    throw new NotImplementedException();
            }

            return tx;
        }
예제 #19
0
        //private static string ExpireTime(string create_time)
        //{
        //    if (string.IsNullOrWhiteSpace(create_time))
        //    {
        //        return null;
        //    }
        //    else
        //    {
        //        DateTime dt = DateTime.ParseExact(create_time, "yyyyMMddHHmmss", System.Globalization.CultureInfo.InvariantCulture);
        //        DateTime et = dt.AddSeconds(pay_time_out);
        //        return et.ToString("yyyyMMddHHmmss");
        //    }
        //}

        /// <summary>
        /// 线下二维码预下单  用于C扫B业务预下单
        /// </summary>
        /// <param name="payWay">支付类型</param>
        /// <param name="out_order_no">商户订单号,不可重复</param>
        /// <param name="total_amount">订单总金额</param>
        /// <param name="body">交易或商品描述</param>
        /// <param name="create_time">订单创建时间 yyyyMMddHHmmss</param>
        /// <param name="create_ip">订单创建IP地址	192.168.0.1</param>
        /// <returns>过滤后的参数组</returns>
        public static string Percreate(PayWay payWay, string out_order_no, string total_amount, string body, string create_time, string create_ip)
        {
            getConfig();

            Result result = new Result();
            SortedDictionary <string, string> dict     = new SortedDictionary <string, string>();
            SortedDictionary <string, string> dictComm = new SortedDictionary <string, string>();

            // 业务参数
            dict.Add("pay_way", payWay.ToString());
            dict.Add("body", body);
            dict.Add("total_amount", total_amount);
            dict.Add("create_time", create_time);
            dict.Add("notify_url", notify_url);
            dict.Add("out_order_no", out_order_no);
            dict.Add("store_id", StoreId);
            dict.Add("create_ip", create_ip);
            // expire_time 该参数支付宝精确到分钟,微信建议最少一分钟
            // dict.Add("expire_time", ExpireTime(create_time));
            // 公共参数封装
            CommParam(action_percreate, dictComm);
            string param = PackageParam(dict, dictComm);

            log4.Info("下单:\r\n" + param);
            string returnResult = HttpUtil.HttpPost(api_domain, param);

            log4.Info("下单返回值:\r\n" + returnResult);

            //if (!string.IsNullOrWhiteSpace(returnResult))
            //{
            //    JObject retPayObJ = JObject.Parse(returnResult);
            //    result.returnData = retPayObJ;
            //    if (!retPayObJ["code"].ToString().Equals("200"))
            //    {
            //        result.IsSucceed = "false";
            //        result.Message = "下单失败!";
            //        return result;
            //    }
            //}
            //result.IsSucceed = "true";
            return(returnResult);
        }
        /// <summary>
        /// 创建支付服务
        /// </summary>
        /// <param name="way">支付方式</param>
        public IPayService CreatePayService(PayWay way)
        {
            switch (way)
            {
            case PayWay.AlipayBarcodePay:
                return(new AlipayBarcodePayService(_alipayConfigProvider));

            case PayWay.AlipayPagePay:
                return(new AlipayPagePayService(_alipayConfigProvider));

            case PayWay.AlipayWapPay:
                return(new AlipayWapPayService(_alipayConfigProvider));

            case PayWay.AlipayAppPay:
                return(new AlipayAppPayService(_alipayConfigProvider));

            case PayWay.WechatpayAppPay:
                return(new WechatpayAppPayService(_wechatpayConfigProvider));
            }
            throw new NotImplementedException(EnumUtil.GetEnumDescription(way));
        }
예제 #21
0
 public ActionResult GetFailTransferTransaction(string account, int? amount, string txid, DateTime? starttime, DateTime? endtime, PayWay payWay, int page)
 {
     var count = IoC.Resolve<ITransferTransactionQuery>().GetTransferTransactionCountBySearch(account, amount, txid, starttime, endtime, TransactionState.Fail, payWay);
     var result = IoC.Resolve<ITransferTransactionQuery>().GetTransferTransactionBySearch(account, amount, txid, starttime, endtime, TransactionState.Fail, payWay, "DESC", page, Constants.DEFAULT_PAGE_COUNT);
     result = from TransferTransaction in result
              select new TransferTransaction
              {
                  Account = TransferTransaction.Account,
                  Amount = TransferTransaction.Amount,
                  CreateAt = TransferTransaction.CreateAt,
                  DoneAt = TransferTransaction.DoneAt,
                  ID = TransferTransaction.ID,
                  Memo = TransferTransaction.Memo,
                  PayWay = TransferTransaction.PayWay,
                  RealName = TransferTransaction.RealName,
                  Reason = TransferTransaction.Reason,
                  SequenceNo = FormatString(TransferTransaction.SequenceNo, 20, ' '),
                  SourcePayway = TransferTransaction.SourcePayway,
                  State = TransferTransaction.State,
                  TransferNo = FormatString(TransferTransaction.TransferNo, 20, ' '),
                  TxId = FormatString(TransferTransaction.TxId, 32, ' ')
              };
     return Json(new { count = count, result = result.OrderByDescending(q => q.CreateAt) });
 }
예제 #22
0
 public InboundTxMessage(int toUserID, string txid, PayWay payway, decimal amount)
 {
     this.ToUserID = ToUserID;
     this.TxId = txid;
     this.Amount = amount;
     this.PayWay = payway;
 }
예제 #23
0
        public ThirdPartyPaymentTransferFail(int transferId, string reason, PayWay payway, int byUserID)
        {
            Check.Argument.IsNotNegativeOrZero(transferId, "transferId");
            Check.Argument.IsNotEmpty(reason, "reason");
            Check.Argument.IsNotNegativeOrZero((int)payway, "payway");

            this.TransferId = transferId;
            this.Reason = reason;
            this.PayWay = payway;
            this.ByUserID = byUserID;
        }
예제 #24
0
 public void VerifyForCNY(int byUserID, PayWay payway, Bank bank, int fundSourceID, decimal fundAmount)
 {
     throw new DepositIsVerifiedException();
 }
예제 #25
0
 public async Task <PayWay> CreatePayWayAsync(PayWay payWay) => await _payWayRepository.AddAsync(payWay);
예제 #26
0
        public static PayWayViewModel MapViewModel(this PayWay payWay, IMapper mapper)
        {
            var model = mapper.Map <PayWayViewModel>(payWay);

            return(model);
        }
예제 #27
0
        public ActionResult TppTransfer(PayWay payway)
        {
            ViewBag.PayWay = payway;

            return View("OutboundTpp");
        }
예제 #28
0
        public CreateThirdPartyPaymentTransfer(string txid, string account, decimal amount, PayWay payway, PayWay sourcePayway, string realName, string memo)
        {
            Check.Argument.IsNotEmpty(txid, "txid");
            Check.Argument.IsNotEmpty(account, "account");
            Check.Argument.IsNotNegativeOrZero(amount, "amount");
            Check.Argument.IsNotNegativeOrZero((int)payway, "payway");

            this.TxId = txid;
            this.Account = account;
            this.Amount = amount;
            this.PayWay = payway;
            this.SourcePayway = sourcePayway;
            this.Memo = memo;
            this.RealName = realName;
        }
예제 #29
0
        public ActionResult GetSuccessTransferTransaction(string account, int? amount, string txid, DateTime? starttime, DateTime? endtime, PayWay payWay, int page)
        {
            var count = IoC.Resolve<ITransferTransactionQuery>().GetTransferTransactionCountBySearch(account, amount, txid, starttime, endtime, TransactionState.Success, payWay);
            var txs = IoC.Resolve<ITransferTransactionQuery>().GetTransferTransactionBySearch(account, amount, txid, starttime, endtime, TransactionState.Success, payWay, "DESC", page, Constants.DEFAULT_PAGE_COUNT);

            txs.ForEach(t =>
            {
                t.SequenceNo = FormatString(t.SequenceNo, 20, ' ');
                t.TransferNo = FormatString(t.TransferNo, 20, ' ');
                t.TxId = FormatString(t.TxId, 32, ' ');
                t.OperatorName = IoC.Resolve<IUserQuery>().GetUserByID(t.OperatorID).LoginName;
            });

            return Json(new { count = count, result = txs.OrderByDescending(q => q.CreateAt) });
        }
예제 #30
0
 public PayFilterSpecification(PayWay payWay) : base(item => !item.Removed && item.PayWay == payWay.Code)
 {
 }
예제 #31
0
 public int GetTransferTransactionCountBySearch(string account, int? amount, string txid, DateTime? starttime, DateTime? endtime, TransactionState state, PayWay payWay)
 {
     var paramters = new object[] {
         account.NullSafe(),
         (amount.HasValue ? amount.Value : 0),
         txid.NullSafe(),
         starttime.HasValue ? starttime.Value.ToUnixTimestamp() : 0,
         endtime.HasValue ? endtime.Value.ToUnixTimestamp() : 0,
         (int)state
     };
     return this.Context.Sql(getTransferTransactionCountBySearch_Sql.FormatWith(payWay.ToString()))
                        .Parameters(paramters)
                        .QuerySingle<int>();
 }
예제 #32
0
        public IEnumerable<DotPay.ViewModel.TransferTransaction> GetTransferTransactionBySearch(string account, int? amount, string txid, DateTime? starttime, DateTime? endtime, TransactionState state, PayWay payWay, string orderBy, int page, int pageCount)
        {
            var paramters = new object[] {
                account.NullSafe(),
                (amount.HasValue ? amount.Value : 0),
                txid.NullSafe(),
                starttime.HasValue ? starttime.Value.ToUnixTimestamp() : 0,
                endtime.HasValue ? endtime.Value.ToUnixTimestamp() : 0,
                (int)state,
                (page - 1) * pageCount,
                pageCount

            };
            var users = this.Context.Sql(getTransferTransactionBySearch_sql.FormatWith(payWay.ToString(), orderBy))
                                   .Parameters(paramters)
                                   .QueryMany<TransferTransaction>();

            return users;
        }
예제 #33
0
        public TransferTransaction GetTransferTransactionByRippleTxid(string txid, PayWay payWay)
        {
            var paramters = new object[] { txid };
            var result = this.Context.Sql(getTransferTransactionByRippleTxid_sql.FormatWith(payWay.ToString()))
                                   .Parameters(paramters)
                                   .QuerySingle<TransferTransaction>();

            return result;
        }
예제 #34
0
 public RippleInboundToThirdPartyPaymentTxMessage(string account, decimal amount, PayWay payway, string txid, string memo)
 {
     this.Account = account;
     this.TxId = txid;
     this.Amount = amount;
     this.PayWay = payway;
     this.SourcePayWay = PayWay.Ripple;
     this.Memo = memo;
 }
예제 #35
0
        public ActionResult SubmitOutboundPayment(PayWay payway, string account, decimal amount, string description)
        {
            var emailReg = new Regex(@"^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$");
            var mobileReg = new Regex("^1[3|5|7|8|][0-9]{9}$");
            var qqReg = new Regex(@"^\d{5,10}$");

            var result = false;
            var message = "无效的收款账户";
            var accountInfo = default(FederationResponse);
            account = account.NullSafe().Trim();


            if ((payway == PayWay.Alipay && (emailReg.IsMatch(account) || mobileReg.IsMatch(account))) ||
                (payway == PayWay.Tenpay && (emailReg.IsMatch(account) || mobileReg.IsMatch(account) || qqReg.IsMatch(account))))
            {
                var cmd = new CreateOutboundTransfer(payway, account, CurrencyType.CNY.ToString(), amount, amount, description.NullSafe().Trim(), this.CurrentUser.UserID);

                this.CommandBus.Send(cmd);

                return Redirect("~/transfertpp/{0}/confirm?orderid={1}".FormatWith(payway, cmd.Result));
            }

            return View();
        }
예제 #36
0
        public ThirdPartyPaymentTransferComplete(int transferId, string transferNo, decimal amount, PayWay payway, PayWay transferPayway, int byUserID)
        {
            Check.Argument.IsNotNegativeOrZero(transferId, "transferId");
            Check.Argument.IsNotEmpty(transferNo, "transferNo");
            Check.Argument.IsNotNegativeOrZero((int)payway, "payway");
            Check.Argument.IsNotNegativeOrZero(amount, "amount");

            this.TransferId = transferId;
            this.TransferNo = transferNo;
            this.Amount = amount;
            this.PayWay = payway;
            this.TransferPayway = transferPayway;
            this.ByUserID = byUserID;
        }
예제 #37
0
 public ActionResult MarkThirdPartyPaymentTransferProcessing(int tppTransferId, PayWay payway)
 {
     try
     {
         var cmd = new MarkThirdPartyPaymentTransferProcessing(tppTransferId, payway, this.CurrentUser.UserID);
         this.CommandBus.Send(cmd);
         return Json(JsonResult.Success);
     }
     catch (CommandExecutionException ex)
     {
         if (ex.ErrorCode == (int)ErrorCode.TransferTransactionNotInit)
             return Json(new JsonResult(-3));
         else return Json(new JsonResult(ex.ErrorCode));
     }
 }
예제 #38
0
        public CreateOutboundTransfer(PayWay payway, string destination, string targetCurrency, decimal sourceAmount, decimal targetAmount, string description, int byUserID)
        {
            Check.Argument.IsNotNegativeOrZero(byUserID, "byUserID");
            Check.Argument.IsNotEmpty(targetCurrency, "targetCurrency");
            Check.Argument.IsNotNegativeOrZero((int)payway, "payway");
            Check.Argument.IsNotEmpty(destination, "destination");
            Check.Argument.IsNotNegativeOrZero(sourceAmount, "sourceAmount");
            Check.Argument.IsNotNegativeOrZero(targetAmount, "targetAmount");

            this.ByUserID = byUserID;
            this.TargetCurrency = targetCurrency;
            this.PayWay = payway;
            this.SourceAmount = sourceAmount;
            this.TargetAmount = targetAmount;
            this.Destination = destination;
            this.Description = description;
        }
예제 #39
0
 public ActionResult ThirdPartyPaymentTransferFail(int transferId, string reason, PayWay payway)
 {
     try
     {
         var cmd = new ThirdPartyPaymentTransferFail(transferId, reason, payway, this.CurrentUser.UserID);
         this.CommandBus.Send(cmd);
         return Json(JsonResult.Success);
     }
     catch (CommandExecutionException ex)
     {
         if (ex.ErrorCode == (int)ErrorCode.NoPermission)
             return Json(new JsonResult(-3));
         else return Json(new JsonResult(ex.ErrorCode));
     }
 }
예제 #40
0
        public MarkThirdPartyPaymentTransferProcessing(int tppTransferId, PayWay payway, int byUserID)
        {
            Check.Argument.IsNotNegativeOrZero(tppTransferId, "tppTransferId");
            Check.Argument.IsNotNegativeOrZero((int)payway, "payway");
            Check.Argument.IsNotNegativeOrZero(byUserID, "byUserID");

            this.TppTransferID = tppTransferId;
            this.PayWay = payway;
            this.ByUserID = byUserID;
        }