| | |
| | | using Mapster; |
| | | using MediatR; |
| | | using Microsoft.EntityFrameworkCore; |
| | | using Microsoft.Extensions.Options; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | |
| | | /// 支付宝资金二级商户KYB代进件 |
| | | /// </summary> |
| | | public class AlipayFundExpandindirectCommandHandler( |
| | | IOptions<AlipayOptions> options, |
| | | AlipayUtils alipayUtils, |
| | | IHttpRemoteService httpRemoteService, |
| | | IRepository<AlipayFundExpandindirectOrder> rep |
| | |
| | | IRequestHandler<AlipayFundExpandindirectOrderCancelCommand, Guid>, |
| | | IRequestHandler<AlipayFundExpandindirectCreateNotifyCommand, Guid> |
| | | { |
| | | private readonly IOptions<AlipayOptions> options = options; |
| | | private readonly AlipayUtils alipayUtils = alipayUtils; |
| | | private readonly IHttpRemoteService httpRemoteService = httpRemoteService; |
| | | private readonly IRepository<AlipayFundExpandindirectOrder> rep = rep; |
| | |
| | | await rep.InsertNowAsync(entity); |
| | | } |
| | | var model = entity.Adapt<AlipayFundExpandindirectCreateModel>(); |
| | | var result = alipayUtils.FundExpandindirectCreate(model); |
| | | var result = alipayUtils.FundExpandindirectCreate(model, $"{options.Value.NotifyUrl}/api/user/enterpriseWallet/alipayFundExpandindirectCreateNotify"); |
| | | if (result.IsError) |
| | | { |
| | | entity.RiskReviewRemark = result.Msg; |