| | |
| | | /// <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> |
| | | /// 供应商回调处理 |
| | |
| | | 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, "订单不存在"); |
| | |
| | | default: break; |
| | | } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// ACOOLYO订单通知处理 |
| | |
| | | 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) |
| | |
| | | <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> |
| | | 供应商回调处理 |
| | |
| | | using Alipay.AopSdk.F2FPay.Model; |
| | | using Castle.Core.Internal; |
| | | using LifePayment.Application.Contracts; |
| | | using LifePayment.Domain.Shared; |
| | | using Microsoft.AspNetCore.Authorization; |
| | |
| | | using System.Threading.Tasks; |
| | | using Volo.Abp.AspNetCore.Mvc; |
| | | using Volo.Abp.Uow; |
| | | using ZeroD.Util; |
| | | |
| | | namespace LifePayment.HttpApi |
| | | { |
| | |
| | | |
| | | 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); |
| | | // 插入收支流水 |
| | |
| | | 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 |
| | | { |
| | |
| | | { |
| | | case LifePaymentConstant.WxPayRefundStatus.退款成功: |
| | | case LifePaymentConstant.WxPayRefundStatus.退款关闭: |
| | | await _lifePayService.WxPayDomesticRefundsHandler(wxPayNotice.OutTradeNo, LifePayRefundStatusEnum.已退款); |
| | | await _lifePayService.LifePayRefundsHandler(wxPayNotice.OutTradeNo, LifePayRefundStatusEnum.已退款); |
| | | // 插入收支流水 |
| | | await _lifePayOrderService.AddLifePayExpensesReceipts(new AddLifePayExpensesReceiptsInput() |
| | | { |
| | |
| | | }); |
| | | 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; |
| | | } |
| | | } |
| | | } |