示例#1
0
        public async Task <IActionResult> DownloadFundFlow(string bill_date, string account_type, string tar_type)
        {
            var request = new WeChatPayDownloadFundFlowRequest
            {
                BillDate    = bill_date,
                AccountType = account_type,
                TarType     = tar_type
            };
            var response = await _client.ExecuteAsync(request, "wechatpayCertificateName");

            ResponseModel responseModel = new ResponseModel()
            {
                code = HTTPResponseCode.PartialContent,
                data = response.Body
            };

            Dictionary <string, string> result = new Dictionary <string, string>();

            result.Add("return_code", response.ReturnCode);
            result.Add("return_msg", response.ReturnMsg);

            if (response.ReturnCode == "SUCCESS" && response.ResultCode == "SUCCESS")
            {
                responseModel.code = HTTPResponseCode.Successful;
            }
            else
            {
                responseModel.code = HTTPResponseCode.BadRequest;
                result.Add("err_code", response.ErrCode);
                result.Add("err_code_des", response.ErrCodeDes);
            }
            responseModel.message = JsonConvert.SerializeObject(result);
            return(Json(responseModel));
        }
示例#2
0
        public async Task <IActionResult> DownloadFundFlow(string bill_date, string account_type, string tar_type)
        {
            var request = new WeChatPayDownloadFundFlowRequest()
            {
                BillDate    = bill_date,
                AccountType = account_type,
                TarType     = tar_type,
            };
            var response = await _client.ExecuteAsync(request);

            return(Ok(response.Body));
        }
示例#3
0
        public async Task <IActionResult> DownloadFundFlow(WeChatPayDownloadFundFlowViewModel viewModel)
        {
            var request = new WeChatPayDownloadFundFlowRequest
            {
                BillDate    = viewModel.BillDate,
                AccountType = viewModel.AccountType,
                TarType     = viewModel.TarType
            };
            var response = await _client.ExecuteAsync(request, _optionsAccessor.Value);

            return(Ok(response.Body));
        }
        public async Task <IActionResult> DownloadFundFlow(WeChatPayDownloadFundFlowViewModel viewModel)
        {
            var request = new WeChatPayDownloadFundFlowRequest()
            {
                BillDate    = viewModel.BillDate,
                AccountType = viewModel.AccountType,
                TarType     = viewModel.TarType,
            };
            var response = await _client.ExecuteAsync(request);

            ViewData["response"] = response.Body;
            return(View());
        }