コード例 #1
0
        /// <summary>
        ///     绑定提现账号
        /// </summary>
        /// <param name="userContext">店铺相关信息</param>
        /// <param name="account">提现账号信息</param>
        public ResponseModel AddWithdrawingAccount(UserContext userContext, WithdrawingAccountRequest account)
        {
            //根据ProvinceId和CityId获取省名称和城市名称
            var provinceAndCityNames = _basicDataService.GetProvinceAndCityNameById(account.ProvinceId, account.CityId);

            account.ProvinceName = provinceAndCityNames.Item1;
            account.CityName     = provinceAndCityNames.Item2;
            var withdrawingAccountResponse = new AccountCreditCardResponse();
            var checkResult = _authCodeService.CheckCaptchaCode(CaptchaEnum.BindCreditCard,
                                                                userContext.AccId, CaptchaPhoneEmailEnum.Phone, account.CheckCode, account.Phone);

            var responseModel = new ResponseModel();

            if (checkResult.IsSuccess)
            {
                var result = _accountbookProxyService.AddWithdrawingAccount(userContext, account);
                if (result.Data != null)
                {
                    var resultModel = result.Data;
                    withdrawingAccountResponse.Id           = resultModel.Id;
                    withdrawingAccountResponse.PayeeAccount = resultModel.MasterCardAccount;
                    withdrawingAccountResponse.Phone        = resultModel.MobilePhone;
                    withdrawingAccountResponse.PayeeName    = resultModel.MasterCardName;
                    withdrawingAccountResponse.State        = resultModel.Status;
                    withdrawingAccountResponse.BankName     = resultModel.MasterCardBranch;

                    responseModel.Data = resultModel;
                    responseModel.Code = (int)ErrorCodeEnum.Success;
                }
            }
            else
            {
                responseModel.Code    = 1;
                responseModel.Data    = null;
                responseModel.Message = "验证码校验不正确,请重新输入!";
            }
            return(responseModel);
        }
コード例 #2
0
 public ResponseModel AddWithdrawingAccount([FromBody] WithdrawingAccountRequest model)
 {
     return(Success(_accountbookService.AddWithdrawingAccount(GetUserContext(), model)));
 }
コード例 #3
0
        /// <summary>
        /// 增加(绑定)提现账户
        /// </summary>
        /// <param name="userContext"></param>
        /// <param name="account"></param>
        /// <returns></returns>
        public ResponseSerializationModel <C_AccountCreditCardShowDto> AddWithdrawingAccount(UserContext userContext,
                                                                                             WithdrawingAccountRequest account)
        {
            var requestEntity = account == null ? null : account.ToDto();

            return(RestPost <C_AccountCreditCardShowDto, AccountCreditCardDto>(BaseUrl + "AccountCreditCard", userContext,
                                                                               requestEntity,
                                                                               RestHead(userContext, BankPlatBusinessEnum.Withdrawal)));
        }