| | |
| | | using LifePayment.Application.Contracts; |
| | | using Alipay.AopSdk.F2FPay.Model; |
| | | using Castle.Core.Internal; |
| | | using LifePayment.Application.Contracts; |
| | | using LifePayment.Domain.Shared; |
| | | using Microsoft.AspNetCore.Authorization; |
| | | using Microsoft.AspNetCore.Mvc; |
| | |
| | | using System.Threading.Tasks; |
| | | using Volo.Abp.AspNetCore.Mvc; |
| | | using Volo.Abp.Uow; |
| | | using ZeroD.Util; |
| | | |
| | | namespace LifePayment.HttpApi |
| | | { |
| | |
| | | { |
| | | |
| | | private readonly ILifePayService _lifePayService; |
| | | private readonly ILifePayOrderService _lifePayOrderService; |
| | | |
| | | private readonly ILogger<AliPayNotifyController> _logger; |
| | | |
| | |
| | | |
| | | ILogger<AliPayNotifyController> logger, |
| | | |
| | | ILifePayService lifePayService) |
| | | ILifePayService lifePayService, |
| | | ILifePayOrderService lifePayOrderService) |
| | | { |
| | | _logger = logger; |
| | | _lifePayService = lifePayService; |
| | | _lifePayOrderService = lifePayOrderService; |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | |
| | | if (input.OutTradeNo.Contains("JF")) |
| | | { |
| | | if (input.TradeStatus == LifePaymentConstant.AliPayStatus.支付成功) |
| | | if (input.TradeStatus == LifePaymentConstant.AliPayStatus.支付成功 && input.OutBizNo.IsNullOrEmpty()) |
| | | { |
| | | await _lifePayService.LifePaySuccessHandler(input.OutTradeNo, input.TradeNo); |
| | | // 插入收支流水 |
| | | await _lifePayOrderService.AddLifePayExpensesReceipts(new AddLifePayExpensesReceiptsInput() { OrderNo = input.OutTradeNo, |
| | | OutOrderNo = input.TradeNo ,LifePayType = LifePayTypeEnum.AliPay,ExpensesReceiptsType = ExpensesReceiptsTypeEnum.Expenses }); |
| | | } |
| | | else if((input.TradeStatus == LifePaymentConstant.AliPayStatus.支付成功 && input.OutBizNo.IsNotNullOrEmpty() && input.RefundFee.HasValue) || |
| | | input.TradeStatus == LifePaymentConstant.AliPayStatus.超时关闭) |
| | | { |
| | | await _lifePayService.LifePayRefundsHandler(input.OutTradeNo, LifePayRefundStatusEnum.已退款); |
| | | // 插入收支流水 |
| | | await _lifePayOrderService.AddLifePayExpensesReceipts(new AddLifePayExpensesReceiptsInput() |
| | | { |
| | | OrderNo = input.OutTradeNo, |
| | | OutRefundNo = input.OutBizNo, |
| | | OutOrderNo = input.TradeNo, |
| | | LifePayType = LifePayTypeEnum.AliPay, |
| | | ExpensesReceiptsType = ExpensesReceiptsTypeEnum.Receipts |
| | | }); |
| | | } |
| | | } |
| | | else |
| | |
| | | }; |
| | | } |
| | | |
| | | |
| | | |
| | | #endif |
| | | |
| | | /// <summary> |