321
This commit is contained in:
parent
a631ec2a5a
commit
5b2b9b7de8
|
|
@ -971,6 +971,9 @@ namespace CoreCms.Net.Configuration
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Description("服务订单")]
|
[Description("服务订单")]
|
||||||
ServiceOrder = 5,
|
ServiceOrder = 5,
|
||||||
|
|
||||||
|
[Description("鸽子费")]
|
||||||
|
GeZiFei = 6,
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 付款单状态【对应CoreCmsBillPayments.status字段】
|
/// 付款单状态【对应CoreCmsBillPayments.status字段】
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@ using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Linq.Expressions;
|
using System.Linq.Expressions;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
using CoreCms.Net.Configuration;
|
using CoreCms.Net.Configuration;
|
||||||
using CoreCms.Net.IRepository;
|
using CoreCms.Net.IRepository;
|
||||||
using CoreCms.Net.IRepository.UnitOfWork;
|
using CoreCms.Net.IRepository.UnitOfWork;
|
||||||
|
|
@ -26,13 +27,17 @@ using CoreCms.Net.Model.ViewModels.UI;
|
||||||
using CoreCms.Net.Utility.Extensions;
|
using CoreCms.Net.Utility.Extensions;
|
||||||
using CoreCms.Net.Utility.Helper;
|
using CoreCms.Net.Utility.Helper;
|
||||||
using CoreCms.Net.WeChat.Service.Options;
|
using CoreCms.Net.WeChat.Service.Options;
|
||||||
|
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using Microsoft.Extensions.Hosting;
|
using Microsoft.Extensions.Hosting;
|
||||||
using Microsoft.Extensions.Options;
|
using Microsoft.Extensions.Options;
|
||||||
|
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
|
|
||||||
using NLog;
|
using NLog;
|
||||||
|
|
||||||
using SqlSugar;
|
using SqlSugar;
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -227,6 +232,22 @@ namespace CoreCms.Net.Services
|
||||||
jm.status = true;
|
jm.status = true;
|
||||||
jm.data = dto;
|
jm.data = dto;
|
||||||
}
|
}
|
||||||
|
else if (type == (int)GlobalEnumVars.BillPaymentsType.GeZiFei)
|
||||||
|
{
|
||||||
|
dto.money = 10;
|
||||||
|
if (@params != null && @params.ContainsKey("money"))
|
||||||
|
{
|
||||||
|
dto.money = @params["money"].ObjectToDecimal(0); //充值金额
|
||||||
|
}
|
||||||
|
|
||||||
|
dto.rel.Add(new rel()
|
||||||
|
{
|
||||||
|
sourceId = orderId,
|
||||||
|
money = dto.money
|
||||||
|
});
|
||||||
|
jm.status = true;
|
||||||
|
jm.data = dto;
|
||||||
|
}
|
||||||
|
|
||||||
else if (false)
|
else if (false)
|
||||||
{
|
{
|
||||||
|
|
@ -382,6 +403,7 @@ namespace CoreCms.Net.Services
|
||||||
jm.data = dto;
|
jm.data = dto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
else if (false)
|
else if (false)
|
||||||
{
|
{
|
||||||
//todo 其他业务逻辑
|
//todo 其他业务逻辑
|
||||||
|
|
@ -466,6 +488,7 @@ namespace CoreCms.Net.Services
|
||||||
if (paymentCode == GlobalEnumVars.PaymentsTypes.wechatpay.ToString())
|
if (paymentCode == GlobalEnumVars.PaymentsTypes.wechatpay.ToString())
|
||||||
{
|
{
|
||||||
jm = await weChatPayServices.PubPay(billPayments);
|
jm = await weChatPayServices.PubPay(billPayments);
|
||||||
|
|
||||||
}
|
}
|
||||||
//支付宝支付
|
//支付宝支付
|
||||||
else if (paymentCode == GlobalEnumVars.PaymentsTypes.alipay.ToString())
|
else if (paymentCode == GlobalEnumVars.PaymentsTypes.alipay.ToString())
|
||||||
|
|
@ -561,7 +584,7 @@ namespace CoreCms.Net.Services
|
||||||
var paymentRelData = new CheckPayDTO();
|
var paymentRelData = new CheckPayDTO();
|
||||||
|
|
||||||
var sourceStrArr = sourceStr.Split(",");
|
var sourceStrArr = sourceStr.Split(",");
|
||||||
if (sourceStrArr.Length > 0)
|
if (!string.IsNullOrEmpty(sourceStr) && sourceStrArr.Length > 0)
|
||||||
{
|
{
|
||||||
var paymentRel = await BatchFormatPaymentRel(sourceStrArr, type, @params);
|
var paymentRel = await BatchFormatPaymentRel(sourceStrArr, type, @params);
|
||||||
if (paymentRel.status == false)
|
if (paymentRel.status == false)
|
||||||
|
|
@ -750,6 +773,9 @@ namespace CoreCms.Net.Services
|
||||||
break;
|
break;
|
||||||
case (int)GlobalEnumVars.BillPaymentsType.ServiceOrder:
|
case (int)GlobalEnumVars.BillPaymentsType.ServiceOrder:
|
||||||
break;
|
break;
|
||||||
|
case (int)GlobalEnumVars.BillPaymentsType.GeZiFei:
|
||||||
|
res = "鸽子费";
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
using CoreCms.Net.Auth.HttpContextUser;
|
using CoreCms.Net.Auth.HttpContextUser;
|
||||||
using CoreCms.Net.Configuration;
|
using CoreCms.Net.Configuration;
|
||||||
using CoreCms.Net.IRepository;
|
using CoreCms.Net.IRepository;
|
||||||
|
|
@ -18,10 +19,13 @@ using CoreCms.Net.IServices;
|
||||||
using CoreCms.Net.Model.Entities;
|
using CoreCms.Net.Model.Entities;
|
||||||
using CoreCms.Net.Model.ViewModels.UI;
|
using CoreCms.Net.Model.ViewModels.UI;
|
||||||
using CoreCms.Net.Utility.Extensions;
|
using CoreCms.Net.Utility.Extensions;
|
||||||
|
|
||||||
using Essensoft.Paylink.WeChatPay;
|
using Essensoft.Paylink.WeChatPay;
|
||||||
using Essensoft.Paylink.WeChatPay.V2;
|
using Essensoft.Paylink.WeChatPay.V2;
|
||||||
using Essensoft.Paylink.WeChatPay.V2.Request;
|
using Essensoft.Paylink.WeChatPay.V2.Request;
|
||||||
|
|
||||||
using Microsoft.Extensions.Options;
|
using Microsoft.Extensions.Options;
|
||||||
|
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
|
|
||||||
|
|
@ -129,7 +133,7 @@ namespace CoreCms.Net.Services
|
||||||
jm.status = true;
|
jm.status = true;
|
||||||
jm.msg = "支付成功";
|
jm.msg = "支付成功";
|
||||||
jm.data = parameter;
|
jm.data = parameter;
|
||||||
jm.otherData = response;
|
//jm.otherData = response;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -5528,7 +5528,7 @@
|
||||||
微信小程序消息模板
|
微信小程序消息模板
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:CoreCms.Net.Web.Admin.Controllers.CoreCmsUserWeChatMsgTemplateController.#ctor(Microsoft.AspNetCore.Hosting.IWebHostEnvironment,CoreCms.Net.IServices.ICoreCmsUserWeChatMsgTemplateServices)">
|
<member name="M:CoreCms.Net.Web.Admin.Controllers.CoreCmsUserWeChatMsgTemplateController.#ctor(Microsoft.AspNetCore.Hosting.IWebHostEnvironment,CoreCms.Net.IServices.ICoreCmsUserWeChatMsgTemplateServices,CoreCms.Net.Caching.AutoMate.RedisCache.IRedisOperationRepository)">
|
||||||
<summary>
|
<summary>
|
||||||
构造函数
|
构造函数
|
||||||
</summary>
|
</summary>
|
||||||
|
|
|
||||||
BIN
CoreCms.Net.Web.Admin/WxPayCert/apiclient_cert.p12
Normal file
BIN
CoreCms.Net.Web.Admin/WxPayCert/apiclient_cert.p12
Normal file
Binary file not shown.
|
|
@ -51,6 +51,7 @@ using System.Text.RegularExpressions;
|
||||||
using CoreCms.Net.Model.ViewModels.User;
|
using CoreCms.Net.Model.ViewModels.User;
|
||||||
using CoreCms.Net.Repository.UnitOfWork;
|
using CoreCms.Net.Repository.UnitOfWork;
|
||||||
using CoreCms.Net.IRepository.UnitOfWork;
|
using CoreCms.Net.IRepository.UnitOfWork;
|
||||||
|
using Newtonsoft.Json.Linq;
|
||||||
|
|
||||||
namespace CoreCms.Net.Web.WebApi.Controllers
|
namespace CoreCms.Net.Web.WebApi.Controllers
|
||||||
{
|
{
|
||||||
|
|
@ -1266,6 +1267,43 @@ namespace CoreCms.Net.Web.WebApi.Controllers
|
||||||
return jm;
|
return jm;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 支付
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
[Authorize]
|
||||||
|
public async Task<WebApiCallBack> UsePay([FromBody] JObject @params)
|
||||||
|
{
|
||||||
|
var jm = new WebApiCallBack();
|
||||||
|
|
||||||
|
var userId = _user.ID;
|
||||||
|
if (@params == null || !@params.ContainsKey("money"))
|
||||||
|
{
|
||||||
|
jm.status = false;
|
||||||
|
jm.msg = "参数不全";
|
||||||
|
return jm;
|
||||||
|
}
|
||||||
|
if (@params.ContainsKey("nonce"))
|
||||||
|
{
|
||||||
|
@params.Remove("nonce");
|
||||||
|
}
|
||||||
|
if (@params.ContainsKey("sign"))
|
||||||
|
{
|
||||||
|
@params.Remove("sign");
|
||||||
|
}
|
||||||
|
if (!@params.ContainsKey("trade_type"))
|
||||||
|
{
|
||||||
|
@params.Add("trade_type", "JSAPI_OFFICIAL");
|
||||||
|
}
|
||||||
|
|
||||||
|
//生成支付单,并发起支付
|
||||||
|
jm = await _billPaymentsServices.Pay("", "wechatpay", _user.ID, 6, @params);
|
||||||
|
|
||||||
|
return jm;
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 订单评价
|
#region 订单评价
|
||||||
|
|
|
||||||
|
|
@ -1133,6 +1133,12 @@
|
||||||
</summary>
|
</summary>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:CoreCms.Net.Web.WebApi.Controllers.UserController.UsePay(Newtonsoft.Json.Linq.JObject)">
|
||||||
|
<summary>
|
||||||
|
支付
|
||||||
|
</summary>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
<member name="M:CoreCms.Net.Web.WebApi.Controllers.UserController.OrderEvaluate(CoreCms.Net.Model.ViewModels.DTO.OrderEvaluatePost)">
|
<member name="M:CoreCms.Net.Web.WebApi.Controllers.UserController.OrderEvaluate(CoreCms.Net.Model.ViewModels.DTO.OrderEvaluatePost)">
|
||||||
<summary>
|
<summary>
|
||||||
订单评价
|
订单评价
|
||||||
|
|
|
||||||
BIN
CoreCms.Net.Web.WebApi/WxPayCert/apiclient_cert.p12
Normal file
BIN
CoreCms.Net.Web.WebApi/WxPayCert/apiclient_cert.p12
Normal file
Binary file not shown.
|
|
@ -92,16 +92,16 @@
|
||||||
"WeChatPay": {
|
"WeChatPay": {
|
||||||
// 应用号
|
// 应用号
|
||||||
// 如:微信公众平台AppId、微信开放平台AppId、微信小程序AppId、企业微信CorpId等
|
// 如:微信公众平台AppId、微信开放平台AppId、微信小程序AppId、企业微信CorpId等
|
||||||
"AppId": "",
|
"AppId": "wxa17265f5fe8374b1",
|
||||||
// 商户号
|
// 商户号
|
||||||
// 为微信支付商户平台的商户号
|
// 为微信支付商户平台的商户号
|
||||||
"MchId": "",
|
"MchId": "1727621532",
|
||||||
// API密钥
|
// API密钥
|
||||||
// 为微信支付商户平台的API密钥,请注意不是APIv3密钥
|
// 为微信支付商户平台的API密钥,请注意不是APIv3密钥
|
||||||
"APIKey": "",
|
"APIKey": "zZ1uE0kU3iU5pB0tF4vA9xJ3oK7kR4cZ",
|
||||||
// APIv3密钥
|
// APIv3密钥
|
||||||
// 为微信支付商户平台的APIv3密钥,请注意不是API密钥,v3接口必填
|
// 为微信支付商户平台的APIv3密钥,请注意不是API密钥,v3接口必填
|
||||||
"APIv3Key": "",
|
"APIv3Key": "mU8rK7iV0zK1wV9iE1iW5nH5bT8dC9nU",
|
||||||
// API证书(.p12)
|
// API证书(.p12)
|
||||||
// 为微信支付商户平台的API证书(.p12),v3接口必填
|
// 为微信支付商户平台的API证书(.p12),v3接口必填
|
||||||
// 可为证书文件(.p12)路径 / 证书文件(.p12)的base64字符串
|
// 可为证书文件(.p12)路径 / 证书文件(.p12)的base64字符串
|
||||||
|
|
@ -109,7 +109,7 @@
|
||||||
"Certificate": "WxPayCert\\apiclient_cert.p12",
|
"Certificate": "WxPayCert\\apiclient_cert.p12",
|
||||||
// RSA公钥
|
// RSA公钥
|
||||||
// 目前仅调用"企业付款到银行卡API"时使用,执行本示例中的"获取RSA加密公钥API"即可获取。
|
// 目前仅调用"企业付款到银行卡API"时使用,执行本示例中的"获取RSA加密公钥API"即可获取。
|
||||||
"RsaPublicKey": ""
|
"RsaPublicKey": "PUB_KEY_ID_0117276215322025091500291681003001"
|
||||||
},
|
},
|
||||||
// 支付宝(暂未开通)
|
// 支付宝(暂未开通)
|
||||||
// 更多配置,请查看AlipayOptions类
|
// 更多配置,请查看AlipayOptions类
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user