a3bfd6cd7ee9580db08aa03a8656ad5572089756..7ec7f65993e6e2ee465aee7c063ccef96c3cbf91
2025-03-31 zhengyuxuan
Merge branch 'dev-lifepay-v1.3' of http://120.26.58.240:8888/r/LifePaymentA...
7ec7f6 对比 | 目录
2025-03-31 zhengyuxuan
fix:支付宝支付回调
d3df52 对比 | 目录
5个文件已修改
49 ■■■■ 已修改文件
LifePayment/LifePayment.Application.Contracts/LifePay/ILifePayService.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LifePayment/LifePayment.Application/LifePay/LifePayService.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LifePayment/LifePayment.Host/LifePaymentServices.Application.Contracts.xml 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LifePayment/LifePayment.HttpApi/LifePay/AliPayNotifyController.cs 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LifePayment/LifePayment.HttpApi/LifePay/WxPayNotifyController.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LifePayment/LifePayment.Application.Contracts/LifePay/ILifePayService.cs
@@ -50,7 +50,15 @@
    /// <returns></returns>
    Task LifePaySuccessHandler(string orderNo, string outOrderNo);
    Task WxPayDomesticRefundsHandler(string orderNo, LifePayRefundStatusEnum refundStatus);
    /// <summary>
    /// 退款成功回调处理
    /// </summary>
    /// <param name="orderNo"></param>
    /// <param name="refundStatus"></param>
    /// <returns></returns>
    Task LifePayRefundsHandler(string orderNo, LifePayRefundStatusEnum refundStatus);
    /// <summary>
    /// 供应商回调处理
LifePayment/LifePayment.Application/LifePay/LifePayService.cs
@@ -1321,7 +1321,7 @@
        await _lifePayOrderRepository.UpdateAsync(order);
    }
    public async Task WxPayDomesticRefundsHandler(string orderNo, LifePayRefundStatusEnum refundStatus)
    public async Task LifePayRefundsHandler(string orderNo, LifePayRefundStatusEnum refundStatus)
    {
        var order = await _lifePayOrderRepository.Where(x => x.OrderNo == orderNo).FirstOrDefaultAsync();
        CheckExtensions.IfTrueThrowUserFriendlyException(order == null, "订单不存在");
@@ -1338,6 +1338,7 @@
            default: break;
        }
    }
    /// <summary>
    /// ACOOLYO订单通知处理
@@ -1598,7 +1599,7 @@
            await _lifePayAccount.InsertAsync(userAccount);
        }
        if (input.LifePayType == LifePayOrderTypeEnum.PhoneOrder)
        if (input.LifePayType == LifePayOrderTypeEnum.PhoneOrder || input.LifePayType == LifePayOrderTypeEnum.ElectricOrder)
        {
            var extraProperties = JsonConvert.DeserializeObject<Model_UserAccountExtraProperties>(input.ExtraProperties);
            if (!string.IsNullOrEmpty(extraProperties.Name) && extraProperties.Phone == user.PhoneNumber)
LifePayment/LifePayment.Host/LifePaymentServices.Application.Contracts.xml
@@ -42,6 +42,14 @@
            <param name="outOrderNo"></param>
            <returns></returns>
        </member>
        <member name="M:LifePayment.Application.Contracts.ILifePayService.LifePayRefundsHandler(System.String,LifePayment.Domain.Shared.LifePayRefundStatusEnum)">
            <summary>
            退款成功回调处理
            </summary>
            <param name="orderNo"></param>
            <param name="refundStatus"></param>
            <returns></returns>
        </member>
        <member name="M:LifePayment.Application.Contracts.ILifePayService.ACOOLYOrderNotifyHandler(System.String,System.String,LifePayment.Domain.Shared.LifePayOrderStatusEnum,LifePayment.Domain.Shared.ACOOLYStatusEnum,System.Decimal,System.String)">
            <summary>
            供应商回调处理
LifePayment/LifePayment.HttpApi/LifePay/AliPayNotifyController.cs
@@ -1,4 +1,5 @@
using Alipay.AopSdk.F2FPay.Model;
using Castle.Core.Internal;
using LifePayment.Application.Contracts;
using LifePayment.Domain.Shared;
using Microsoft.AspNetCore.Authorization;
@@ -11,6 +12,7 @@
using System.Threading.Tasks;
using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.Uow;
using ZeroD.Util;
namespace LifePayment.HttpApi
{
@@ -57,7 +59,7 @@
            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);
                    // 插入收支流水
@@ -65,6 +67,20 @@
                        OutOrderNo = input.TradeNo ,LifePayType = LifePayTypeEnum.AliPay,ExpensesReceiptsType = ExpensesReceiptsTypeEnum.Expenses,
                        Amount = input.ReceiptAmount.Value });
                }
                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,
                        OutOrderNo = input.TradeNo,
                        LifePayType = LifePayTypeEnum.AliPay,
                        ExpensesReceiptsType = ExpensesReceiptsTypeEnum.Receipts,
                        Amount = input.ReceiptAmount.Value
                    });
                }
            }
            else
            {
LifePayment/LifePayment.HttpApi/LifePay/WxPayNotifyController.cs
@@ -110,7 +110,7 @@
                    {
                        case LifePaymentConstant.WxPayRefundStatus.退款成功:
                        case LifePaymentConstant.WxPayRefundStatus.退款关闭:
                            await _lifePayService.WxPayDomesticRefundsHandler(wxPayNotice.OutTradeNo, LifePayRefundStatusEnum.已退款);
                            await _lifePayService.LifePayRefundsHandler(wxPayNotice.OutTradeNo, LifePayRefundStatusEnum.已退款);
                            // 插入收支流水
                            await _lifePayOrderService.AddLifePayExpensesReceipts(new AddLifePayExpensesReceiptsInput()
                            {
@@ -122,12 +122,12 @@
                            });
                            break;
                        case LifePaymentConstant.WxPayRefundStatus.退款处理中:
                            await _lifePayService.WxPayDomesticRefundsHandler(wxPayNotice.OutTradeNo, LifePayRefundStatusEnum.退款中);
                            await _lifePayService.LifePayRefundsHandler(wxPayNotice.OutTradeNo, LifePayRefundStatusEnum.退款中);
                            break;
                        case LifePaymentConstant.WxPayRefundStatus.退款异常:
                            await _lifePayService.WxPayDomesticRefundsHandler(wxPayNotice.OutTradeNo, LifePayRefundStatusEnum.退款中);
                            await _lifePayService.LifePayRefundsHandler(wxPayNotice.OutTradeNo, LifePayRefundStatusEnum.退款中);
                            break;
                        default : await _lifePayService.WxPayDomesticRefundsHandler(wxPayNotice.OutTradeNo, LifePayRefundStatusEnum.退款中);break;
                        default : await _lifePayService.LifePayRefundsHandler(wxPayNotice.OutTradeNo, LifePayRefundStatusEnum.退款中);break;
                    }
                }
            }