| | |
| | | { |
| | | DiscountAmount = x.DiscountAmount, |
| | | FinishTime = x.FinishTime, |
| | | //LifePayOrderStatus = x.LifePayOrderStatus, |
| | | LifePayOrderStatus = x.LifePayOrderStatus, |
| | | LifePayOrderType = x.LifePayOrderType, |
| | | LifePayType = x.LifePayType, |
| | | OrderNo = x.OrderNo, |
| | |
| | | s.ActualRechargeAmountStr = s.ActualRechargeAmount.ToString("F2"); |
| | | s.LifePayRefundStatusStr = s.LifePayRefundStatus == LifePayRefundStatusEnum.无需退款 ? "" : s.LifePayRefundStatus.GetDescription(); |
| | | s.ACOOLYStatusStr = s.ACOOLYStatus.GetDescription(); |
| | | //s.LifePayOrderStatusStr = s.LifePayOrderStatus.GetDescription(); |
| | | s.LifePayOrderStatusStr = s.LifePayOrderStatus.GetDescription(); |
| | | s.FinishTimeStr = !s.FinishTime.HasValue ? string.Empty : s.FinishTime.Value.ToString(LifePaymentConstant.DateTimeFormatStr.yyyyMMddHHmmss); |
| | | }); |
| | | return result; |
| | |
| | | #endif |
| | | |
| | | CheckExtensions.IfTrueThrowUserFriendlyException(!result.Success || (result.Code != ACOOLYConstant.Code.SUCCESS && result.Code != ACOOLYConstant.Code.PROCESSING), |
| | | "调用ACOOLY接口ConfirmElectricOrder返回错误:" + JsonConvert.SerializeObject(result)); |
| | | result.Message); |
| | | |
| | | return (result.Code, requestInput.RequestNo, result.PhoneChargeOrder.BusiOrderNo); |
| | | } |
| | |
| | | #endif |
| | | |
| | | CheckExtensions.IfTrueThrowUserFriendlyException(!result.Success || (result.Code != ACOOLYConstant.Code.SUCCESS && result.Code != ACOOLYConstant.Code.PROCESSING), |
| | | "调用ACOOLY接口ConfirmElectricOrder返回错误:" + JsonConvert.SerializeObject(result)); |
| | | result.Message); |
| | | |
| | | return (result.Code, requestInput.RequestNo, result.ElectricChargeOrder.BusiOrderNo); |
| | | } |
| | |
| | | #endif |
| | | |
| | | CheckExtensions.IfTrueThrowUserFriendlyException(!result.Success || (result.Code != ACOOLYConstant.Code.SUCCESS && result.Code != ACOOLYConstant.Code.PROCESSING), |
| | | "调用ACOOLY接口ConfirmElectricOrder返回错误:" + JsonConvert.SerializeObject(result)); |
| | | result.Message); |
| | | |
| | | return (result.Code, requestInput.RequestNo, result.GasChargeOrder.BusiOrderNo); |
| | | } |
| | |
| | | if (input.LifePayType == LifePayOrderTypeEnum.话费订单) |
| | | { |
| | | var extraProperties = JsonConvert.DeserializeObject<Model_UserAccountExtraProperties>(input.ExtraProperties); |
| | | if (!string.IsNullOrEmpty(extraProperties.Name)) |
| | | if (!string.IsNullOrEmpty(extraProperties.Name) && extraProperties.Phone == user.PhoneNumber) |
| | | { |
| | | user.Name = extraProperties.Phone == user.PhoneNumber ? extraProperties.Name : string.Empty; |
| | | user.Name = extraProperties.Name; |
| | | } |
| | | } |
| | | |
| | |
| | | private (decimal PayAmont, decimal DiscountAmount, decimal RechargeAmount) CalculateAmount(decimal amount, decimal rate) |
| | | { |
| | | /// 正常支付 |
| | | //var payAmount = decimal.Round(amount * rate / 100, 2, MidpointRounding.AwayFromZero); |
| | | var payAmount = decimal.Round(amount * rate / 100, 2, MidpointRounding.AwayFromZero); |
| | | |
| | | /// 1分钱支付 |
| | | decimal payAmount = 0.01m; |
| | | //decimal payAmount = 0.01m; |
| | | |
| | | CheckExtensions.IfTrueThrowUserFriendlyException(payAmount < 0.01m, "支付金额错误"); |
| | | |