| | |
| | | using StackExchange.Redis; |
| | | using static Volo.Abp.Identity.Settings.IdentitySettingNames; |
| | | using static Microsoft.EntityFrameworkCore.DbLoggerCategory; |
| | | using LifePayment.Application.LifePay; |
| | | |
| | | namespace LifePayment.Application; |
| | | |
| | |
| | | private readonly IRepository<LifePayAccount, Guid> _lifePayAccount; |
| | | private readonly IRepository<OperateHistory, Guid> _operateHistory; |
| | | private readonly IRepository<LifePayChannlesRake, Guid> _lifePayChannlesRakeRepository; |
| | | private readonly ILifePayOrderService _lifePayOrderService; |
| | | private readonly IDataFilter dataFilter; |
| | | private readonly IChannelFilter _channelFilter; |
| | | private readonly IAliPayApi _aliPayApi; |
| | |
| | | IRepository<LifePayIntroInfo, Guid> lifePayIntroInfoRepository, |
| | | IRepository<LifePayChannlesRake, Guid> lifePayChannlesRakeRepository, |
| | | IRepository<OperateHistory, Guid> operateHistory, |
| | | ILifePayOrderService lifePayOrderService, |
| | | IAliPayApi aliPayApi, |
| | | IAlipayInterfaceManager aliPayInterfaceManager, |
| | | IWxPayApi wxPayApi, |
| | |
| | | _lifePayPremiumRepository = lifePayPremiumRepository; |
| | | _lifePayIntroInfoRepository = lifePayIntroInfoRepository; |
| | | _aliPayApi = aliPayApi; |
| | | _lifePayOrderService = lifePayOrderService; |
| | | _alipayInterfaceManager = aliPayInterfaceManager; |
| | | _wxPayApi = wxPayApi; |
| | | _wxPayOptions = wxPayOptions.Value; |
| | |
| | | { |
| | | order.LifePayOrderStatus = LifePayOrderStatusEnum.已退款; |
| | | order.LifePayRefundStatus = LifePayRefundStatusEnum.已退款; |
| | | await _lifePayOrderService.AddLifePayExpensesReceipts(new AddLifePayExpensesReceiptsInput() |
| | | { |
| | | OrderNo = result.OutTradeNo, |
| | | OutOrderNo = result.TradeNo, |
| | | LifePayType = LifePayTypeEnum.AliPay, |
| | | ExpensesReceiptsType = ExpensesReceiptsTypeEnum.Receipts |
| | | }); |
| | | } |
| | | |
| | | return result; |
| | |
| | | } |
| | | |
| | | var outRefundNo = order.ChannelId + CreateRefundOrderNo(); |
| | | order.RefundOrderNo = outRefundNo; |
| | | switch (order.LifePayType) |
| | | { |
| | | case LifePayTypeEnum.WxPay: |
| | |
| | | default: throw new UserFriendlyException("退款失败"); |
| | | } |
| | | |
| | | order.RefundOrderNo = outRefundNo; |
| | | order.RefundCredentialsImgUrl = input.RefundCredentialsImgUrl; |
| | | order.RefundCheckRemark = input.RefundCheckRemark; |
| | | order.RefundTime = DateTime.Now; |