Commit 0112da95 authored by 吴春's avatar 吴春
parents 140efc0f bfe3e56d
......@@ -287,6 +287,7 @@ namespace Mall.Module.User
//更新订单信息
Dictionary<string, object> keyValues = new Dictionary<string, object>() {
{ nameof(RB_Goods_Order_Extend.OrderStatus),Common.Enum.Goods.OrderStatusEnum.WaitSendGoods},
{ nameof(RB_Goods_Order_Extend.MerchantsNo),Out_Trade_No},
{ nameof(RB_Goods_Order_Extend.PaymentTime),Time_End},
{ nameof(RB_Goods_Order_Extend.PaymentWay),Common.Enum.Goods.OrderPaymentTypeEnum.OnlinePayment}
};
......
......@@ -324,6 +324,7 @@ namespace Mall.WebApi.App_Code
packageReq.SetParameter("refund_fee", param.RefundFee.Value.ToString(System.Globalization.CultureInfo.InvariantCulture));
packageReq.SetParameter("sign", packageReq.CreateMd5Sign(_accessor, model.WeChatApiSecret));
var reqXml = packageReq.ParseXml();
LogHelper.Write(reqXml);
LogHelper.WriteInfo("退款正式路径" + Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "App_Data/Certs/WeChatApp/" + model.WeChatPayCertificateUrl));
if (!System.IO.File.Exists(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "App_Data/Certs/WeChatApp/" + model.WeChatPayCertificateUrl)))
{
......
......@@ -480,12 +480,15 @@ namespace Mall.WebApi.Controllers.MallBase
if (OrderId <= 0) {
return ApiResult.ParamIsNull();
}
if (Type == 2) {
if (string.IsNullOrEmpty(Remark)) {
return ApiResult.ParamIsNull("请输入取消申请备注");
}
//if (Type == 2) {
// if (string.IsNullOrEmpty(Remark)) {
// return ApiResult.ParamIsNull("请输入取消申请备注");
// }
//}
if (string.IsNullOrEmpty(Remark))
{
Remark = "无";
}
bool flag = orderModule.CancelAppletGoodsOrderInfo(OrderId, Type, Remark, userInfo.UserId, userInfo.TenantId, userInfo.MallBaseId);
if (flag) { return ApiResult.Success(); } else { return ApiResult.Failed(); }
}
......
......@@ -677,8 +677,8 @@ namespace Mall.WebApi.Controllers.MallBase
var pram = new Common.Pay.WeChatPat.PayParam()
{
TotalFee = Convert.ToInt32((omodel.Income ?? 0) * 100),
RefundFee = (omodel.Income ?? 0),
OrderNumber = omodel.MerchantsNo,
RefundFee = (omodel.Income ?? 0) * 100,
OrderNumber = omodel.OrderNo,
RefundNumber = RefundOrderNo
};
var Robj = new App_Code.PayUtil().Refund(pram, mallModel, _accessor);
......@@ -1472,10 +1472,11 @@ namespace Mall.WebApi.Controllers.MallBase
var pram = new Common.Pay.WeChatPat.PayParam()
{
TotalFee = Convert.ToInt32(Refund * 100),
RefundFee = Refund,
RefundFee = Refund * 100,
OrderNumber = orderModel.MerchantsNo,
RefundNumber = RefundOrderNo
};
LogHelper.Write(JsonConvert.SerializeObject(pram));
var Robj = new App_Code.PayUtil().Refund(pram, mallModel, _accessor);
if (Robj.IsSuccess)
{
......@@ -1487,7 +1488,11 @@ namespace Mall.WebApi.Controllers.MallBase
}
return ApiResult.Success("");
}
return ApiResult.Failed();
else
{
LogHelper.Write(JsonConvert.SerializeObject(Robj));
return ApiResult.Failed();
}
}
else {
bool flag = orderModule.SetOrderAfterSaleForRefunds(ReOrderId, Refund, "", req.TenantId, req.MallBaseId);
......@@ -1556,7 +1561,7 @@ namespace Mall.WebApi.Controllers.MallBase
var pram = new Common.Pay.WeChatPat.PayParam()
{
TotalFee = Convert.ToInt32(Refund * 100),
RefundFee = Refund,
RefundFee = Refund * 100,
OrderNumber = orderModel.MerchantsNo,
RefundNumber = RefundOrderNo
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment