| | |
| | | RefundApplyRemark = a.RefundApplyRemark, |
| | | RefundTime = a.RefundTime, |
| | | ChannelName = b.ChannlesName, |
| | | ActualRechargeAmount = a.ActualRechargeAmount, |
| | | ActualRechargeAmount = a.RechargeAmount, |
| | | PlatformDeductionAmount = a.PlatformDeductionAmount, |
| | | ACOOLYStatus = a.ACOOLYStatus, |
| | | LifePayRefundStatus = a.LifePayRefundStatus, |
| | |
| | | |
| | | var result = await (from a in _channelFilter.GetChannelLifePayOrderFilter(_lifePayOrderRepository) |
| | | .Where(x => x.LifePayOrderStatus == LifePayOrderStatusEnum.待退款 || x.LifePayOrderStatus == LifePayOrderStatusEnum.已退款 || x.LifePayOrderStatus == LifePayOrderStatusEnum.退款中 |
| | | || x.LifePayRefundStatus > LifePayRefundStatusEnum.无需退款) |
| | | || (x.LifePayRefundStatus > LifePayRefundStatusEnum.无需退款 && x.LifePayRefundStatus != LifePayRefundStatusEnum.退款驳回)) |
| | | .WhereIf(input.BeginRefundTime.HasValue, x => x.RefundTime >= input.BeginRefundTime) |
| | | .WhereIf(input.EndRefundTime.HasValue, x => x.RefundTime <= input.EndRefundTime) |
| | | .WhereIf(input.BeginRefundApplyTime.HasValue, x => x.RefundApplyTime >= input.BeginRefundApplyTime) |
| | |
| | | RefundTime = a.RefundTime, |
| | | RefundPrice = a.RefundPrice, |
| | | ChannelName = b.ChannlesName, |
| | | ActualRechargeAmount = a.ActualRechargeAmount, |
| | | ActualRechargeAmount = a.RechargeAmount, |
| | | PlatformDeductionAmount = a.PlatformDeductionAmount, |
| | | ACOOLYStatus = a.ACOOLYStatus, |
| | | LifePayRefundStatus = a.LifePayRefundStatus, |
| | |
| | | PayAmount = x.PayAmount, |
| | | PhoneNumber = x.PhoneNumber, |
| | | RefundOrderNo = x.RefundOrderNo, |
| | | RefundApplyTime = x.RefundApplyTime, |
| | | ChannelName = x.ChannelName, |
| | | CreationTime = x.CreationTime, |
| | | ACOOLYStatus = x.ACOOLYStatus, |
| | |
| | | s.SerialNumber = ++i; |
| | | s.ACOOLYStatusStr = s.ACOOLYStatus.GetDescription(); |
| | | s.LifePayOrderTypeStr = s.LifePayOrderType.GetDescription(); |
| | | s.CreationTimeStr = s.CreationTime.ToString(LifePaymentConstant.DateTimeFormatStr.yyyyMMddHHmm); |
| | | s.RechargeAmountStr = s.RechargeAmount.ToString("F2"); |
| | | s.ActualReceivedAmount = s.ActualReceivedAmount; |
| | | s.LifePayRefundStatusStr = s.LifePayRefundStatus.GetDescription(); |
| | | s.PayAmountStr = s.PayAmount.ToString("F2"); |
| | | s.LifePayTypeStr = s.LifePayType.GetDescription(); |
| | | s.FinishTimeStr = !s.FinishTime.HasValue ? string.Empty : s.FinishTime.Value.ToString(LifePaymentConstant.DateTimeFormatStr.yyyyMMddHHmm); |
| | | s.RefundApplyTimeStr = !s.RefundApplyTime.HasValue? string.Empty:s.RefundApplyTime.Value.ToString(LifePaymentConstant.DateTimeFormatStr.yyyyMMddHHmm); |
| | | }); |
| | | return result; |
| | | } |
| | |
| | | RefundTime = order.RefundTime, |
| | | ACOOLYOrderNo = order.ACOOLYOrderNo, |
| | | LifePayRefundStatus = order.LifePayRefundStatus, |
| | | ActualRechargeAmount = order.ActualRechargeAmount, |
| | | ActualRechargeAmount = order.RechargeAmount, |
| | | RefundPrice = order.RefundPrice, |
| | | PlatformRate = order.PlatformRate, |
| | | PlatformPrice = order.PlatformDeductionAmount, |
| | |
| | | s.LifePayTypeStr = s.LifePayType.GetDescription(); |
| | | s.PayStatusStr = s.PayStatus.GetDescription(); |
| | | s.ActualRechargeAmountStr = s.ActualRechargeAmount.ToString("F2"); |
| | | s.LifePayRefundStatusStr = s.LifePayRefundStatusStr.GetDescription(); |
| | | s.LifePayRefundStatusStr = s.LifePayRefundStatus.GetDescription(); |
| | | s.ACOOLYStatusStr = s.ACOOLYStatus.GetDescription(); |
| | | //s.LifePayOrderStatusStr = s.LifePayOrderStatus.GetDescription(); |
| | | s.FinishTimeStr = !s.FinishTime.HasValue ? string.Empty : s.FinishTime.Value.ToString(LifePaymentConstant.DateTimeFormatStr.yyyyMMddHHmmss); |
| | |
| | | |
| | | break; |
| | | case LifePayTypeEnum.AliPay: |
| | | var aliRefundResult = await AliTradeRefund(new AlipayTradeRefundRequest() { OutTradeNo = order.OrderNo, RefundAmount = Convert.ToInt32(input.RefundPrice * 100).ToString() }); |
| | | var aliRefundResult = await AliTradeRefund(new AlipayTradeRefundRequest() { OutTradeNo = order.OrderNo, RefundAmount = Convert.ToInt32(input.RefundPrice).ToString() }); |
| | | if (aliRefundResult.Code != AlipayResultCode.Success) |
| | | { |
| | | throw new UserFriendlyException("退款失败"); |
| | | throw new UserFriendlyException("退款失败:" + aliRefundResult.SubMsg); |
| | | } |
| | | |
| | | order.LifePayOrderStatus = LifePayOrderStatusEnum.已退款; |