mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2026-03-22 16:17:21 +08:00
【新增】增加支付宝支付功能,方便APP调用。
This commit is contained in:
@@ -415,9 +415,6 @@ namespace CoreCms.Net.Configuration
|
|||||||
public const string TransactionComponentAfterSaleCreateSync = "TransactionComponentAfterSaleCreateSyncQueue";
|
public const string TransactionComponentAfterSaleCreateSync = "TransactionComponentAfterSaleCreateSyncQueue";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//用户相关
|
//用户相关
|
||||||
|
|
||||||
//订单支付成功后,用户升级处理
|
//订单支付成功后,用户升级处理
|
||||||
@@ -428,6 +425,10 @@ namespace CoreCms.Net.Configuration
|
|||||||
//发送微信模板消息
|
//发送微信模板消息
|
||||||
public const string MessageSendWxMessageTemplet = "MessageSendWxMessageTempletQueue";
|
public const string MessageSendWxMessageTemplet = "MessageSendWxMessageTempletQueue";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 支付宝支付成功后推送到接口进行数据处理
|
||||||
|
/// </summary>
|
||||||
|
public const string AliPayNotice = "AliPayNoticeQueue";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ namespace CoreCms.Net.Core.Config
|
|||||||
typeof(SendWxTemplateMessageSubscribe),
|
typeof(SendWxTemplateMessageSubscribe),
|
||||||
typeof(AfterSalesReviewSubscribe),
|
typeof(AfterSalesReviewSubscribe),
|
||||||
typeof(AfterSalesReviewForPointSubscribe),
|
typeof(AfterSalesReviewForPointSubscribe),
|
||||||
|
typeof(AliPayNoticeSubscribe),
|
||||||
};
|
};
|
||||||
//显示日志
|
//显示日志
|
||||||
m.ShowLog = false;
|
m.ShowLog = false;
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
* Description: 暂无
|
* Description: 暂无
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
|
|
||||||
|
using System.Threading.Tasks;
|
||||||
using CoreCms.Net.Model.Entities;
|
using CoreCms.Net.Model.Entities;
|
||||||
using CoreCms.Net.Model.ViewModels.UI;
|
using CoreCms.Net.Model.ViewModels.UI;
|
||||||
|
|
||||||
@@ -23,6 +24,6 @@ namespace CoreCms.Net.IServices
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="entity">实体数据</param>
|
/// <param name="entity">实体数据</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
WebApiCallBack PubPay(CoreCmsBillPayments entity);
|
Task<WebApiCallBack> PubPay(CoreCmsBillPayments entity);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -5,6 +5,7 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Essensoft.Paylink.Alipay" Version="4.0.12" />
|
||||||
<PackageReference Include="Essensoft.Paylink.WeChatPay" Version="4.0.12" />
|
<PackageReference Include="Essensoft.Paylink.WeChatPay" Version="4.0.12" />
|
||||||
<PackageReference Include="InitQ" Version="1.0.0.12" />
|
<PackageReference Include="InitQ" Version="1.0.0.12" />
|
||||||
<PackageReference Include="Qc.YilianyunSdk" Version="1.0.7" />
|
<PackageReference Include="Qc.YilianyunSdk" Version="1.0.7" />
|
||||||
|
|||||||
76
CoreCms.Net.RedisMQ/Subscribe/AliPayNoticeSubscribe.cs
Normal file
76
CoreCms.Net.RedisMQ/Subscribe/AliPayNoticeSubscribe.cs
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
/***********************************************************************
|
||||||
|
* Project: CoreCms
|
||||||
|
* ProjectName: 核心内容管理系统
|
||||||
|
* Web: https://www.corecms.net
|
||||||
|
* Author: 大灰灰
|
||||||
|
* Email: jianweie@163.com
|
||||||
|
* CreateTime: 2022/1/31 21:45:10
|
||||||
|
* Description: 暂无
|
||||||
|
***********************************************************************/
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using CoreCms.Net.Configuration;
|
||||||
|
using CoreCms.Net.IServices;
|
||||||
|
using CoreCms.Net.Loging;
|
||||||
|
using Essensoft.Paylink.Alipay;
|
||||||
|
using Essensoft.Paylink.Alipay.Notify;
|
||||||
|
using InitQ.Abstractions;
|
||||||
|
using InitQ.Attributes;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
namespace CoreCms.Net.RedisMQ.Subscribe
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 支付宝支付成功后推送到接口进行数据处理
|
||||||
|
/// </summary>
|
||||||
|
public class AliPayNoticeSubscribe : IRedisSubscribe
|
||||||
|
{
|
||||||
|
private readonly ICoreCmsBillPaymentsServices _billPaymentsServices;
|
||||||
|
|
||||||
|
public AliPayNoticeSubscribe(ICoreCmsBillPaymentsServices billPaymentsServices)
|
||||||
|
{
|
||||||
|
_billPaymentsServices = billPaymentsServices;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 支付宝支付成功后推送到接口进行数据处理
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="msg"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[Subscribe(RedisMessageQueueKey.AliPayNotice)]
|
||||||
|
private async Task AliPayNotice(string msg)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var notify = JsonConvert.DeserializeObject<AlipayTradeAppPayNotify>(msg);
|
||||||
|
if (notify is { TradeStatus: AlipayTradeStatus.Success })
|
||||||
|
{
|
||||||
|
if (notify.TradeStatus == AlipayTradeStatus.Success)
|
||||||
|
{
|
||||||
|
var money = decimal.Parse(notify.TotalAmount);
|
||||||
|
await _billPaymentsServices.ToUpdate(notify.OutTradeNo,
|
||||||
|
(int)GlobalEnumVars.BillPaymentsStatus.Payed,
|
||||||
|
GlobalEnumVars.PaymentsTypes.alipay.ToString(), money, notify.TradeStatus,notify.TradeNo);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var money = decimal.Parse(notify.TotalAmount);
|
||||||
|
var message = notify.TradeStatus;
|
||||||
|
await _billPaymentsServices.ToUpdate(notify.OutTradeNo,
|
||||||
|
(int)GlobalEnumVars.BillPaymentsStatus.Other,
|
||||||
|
GlobalEnumVars.PaymentsTypes.alipay.ToString(), money, message, notify.TradeNo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
NLogUtil.WriteAll(NLog.LogLevel.Info, LogType.RedisMessageQueue, "支付宝支付成功后推送到接口进行数据处理", msg);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
NLogUtil.WriteAll(NLog.LogLevel.Error, LogType.RedisMessageQueue, "支付宝支付成功后推送到接口进行数据处理", msg, ex);
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
await Task.CompletedTask;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -479,7 +479,7 @@ namespace CoreCms.Net.Services
|
|||||||
//支付宝支付
|
//支付宝支付
|
||||||
else if (paymentCode == GlobalEnumVars.PaymentsTypes.alipay.ToString())
|
else if (paymentCode == GlobalEnumVars.PaymentsTypes.alipay.ToString())
|
||||||
{
|
{
|
||||||
jm = aliPayServices.PubPay(billPayments);
|
jm = await aliPayServices.PubPay(billPayments);
|
||||||
|
|
||||||
}
|
}
|
||||||
//余额支付
|
//余额支付
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Aliyun.OSS.SDK.NetCore" Version="2.13.0" />
|
<PackageReference Include="Aliyun.OSS.SDK.NetCore" Version="2.13.0" />
|
||||||
|
<PackageReference Include="Essensoft.Paylink.Alipay" Version="4.0.12" />
|
||||||
<PackageReference Include="Essensoft.Paylink.WeChatPay" Version="4.0.12" />
|
<PackageReference Include="Essensoft.Paylink.WeChatPay" Version="4.0.12" />
|
||||||
<PackageReference Include="Flurl.Http" Version="3.2.4" />
|
<PackageReference Include="Flurl.Http" Version="3.2.4" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.2.0" />
|
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.2.0" />
|
||||||
|
|||||||
@@ -8,10 +8,21 @@
|
|||||||
* Description: 暂无
|
* Description: 暂无
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
|
|
||||||
|
using CoreCms.Net.Configuration;
|
||||||
using CoreCms.Net.IRepository;
|
using CoreCms.Net.IRepository;
|
||||||
using CoreCms.Net.IServices;
|
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 Newtonsoft.Json;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using NLog;
|
||||||
|
using System;
|
||||||
|
using Essensoft.Paylink.Alipay;
|
||||||
|
using Essensoft.Paylink.Alipay.Domain;
|
||||||
|
using Essensoft.Paylink.Alipay.Request;
|
||||||
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
using Essensoft.Paylink.WeChatPay;
|
||||||
|
using Microsoft.Extensions.Options;
|
||||||
|
|
||||||
namespace CoreCms.Net.Services
|
namespace CoreCms.Net.Services
|
||||||
{
|
{
|
||||||
@@ -20,20 +31,57 @@ namespace CoreCms.Net.Services
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class AliPayServices : BaseServices<CoreCmsSetting>, IAliPayServices
|
public class AliPayServices : BaseServices<CoreCmsSetting>, IAliPayServices
|
||||||
{
|
{
|
||||||
public AliPayServices(IWeChatPayRepository dal)
|
private readonly IAlipayClient _client;
|
||||||
|
private readonly IServiceProvider _serviceProvider;
|
||||||
|
private readonly IOptions<AlipayOptions> _optionsAccessor;
|
||||||
|
|
||||||
|
|
||||||
|
public AliPayServices(IWeChatPayRepository dal, IServiceProvider serviceProvider, IAlipayClient client, IOptions<AlipayOptions> optionsAccessor)
|
||||||
{
|
{
|
||||||
|
_serviceProvider = serviceProvider;
|
||||||
|
_client = client;
|
||||||
|
_optionsAccessor = optionsAccessor;
|
||||||
BaseDal = dal;
|
BaseDal = dal;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 发起支付
|
/// 发起支付宝支付
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="entity">实体数据</param>
|
/// <param name="entity">实体数据</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public WebApiCallBack PubPay(CoreCmsBillPayments entity)
|
public async Task<WebApiCallBack> PubPay(CoreCmsBillPayments entity)
|
||||||
{
|
{
|
||||||
var jm = new WebApiCallBack();
|
var jm = new WebApiCallBack();
|
||||||
|
using var container = _serviceProvider.CreateScope();
|
||||||
|
var billPaymentsServices = container.ServiceProvider.GetService<ICoreCmsBillPaymentsServices>();
|
||||||
|
var payment = await billPaymentsServices.QueryByClauseAsync(p => p.paymentId == entity.paymentId);
|
||||||
|
var allPayUrl = AppSettingsConstVars.PayCallBackAlipayUrl;
|
||||||
|
var allPayReturnUrl = AppSettingsConstVars.PayCallBackAlipayUrl;
|
||||||
|
if (string.IsNullOrEmpty(allPayUrl))
|
||||||
|
{
|
||||||
|
jm.msg = "未获取到配置的回调地址";
|
||||||
return jm;
|
return jm;
|
||||||
}
|
}
|
||||||
|
var model = new AlipayTradeAppPayModel
|
||||||
|
{
|
||||||
|
OutTradeNo = entity.paymentId,
|
||||||
|
Subject = entity.payTitle.Length > 40 ? entity.payTitle[..40] : entity.payTitle,
|
||||||
|
ProductCode = entity.paymentCode,
|
||||||
|
TotalAmount = entity.money.ToString(),
|
||||||
|
Body = entity.payTitle.Length > 40 ? entity.payTitle[..40] : entity.payTitle
|
||||||
|
};
|
||||||
|
var req = new AlipayTradeAppPayRequest();
|
||||||
|
req.SetBizModel(model);
|
||||||
|
req.SetNotifyUrl(allPayUrl);
|
||||||
|
Loging.NLogUtil.WriteAll(LogLevel.Trace, Loging.LogType.Order, "支付宝支付拼接APP入参", JsonConvert.SerializeObject(model));
|
||||||
|
var response = await _client.SdkExecuteAsync(req, _optionsAccessor.Value);
|
||||||
|
Loging.NLogUtil.WriteAll(LogLevel.Trace, Loging.LogType.Order, "支付宝支付返回数据", JsonConvert.SerializeObject(response));
|
||||||
|
jm.data = response.Body;
|
||||||
|
response.TradeNo = entity.paymentId;
|
||||||
|
jm.otherData = response;
|
||||||
|
jm.status = true;
|
||||||
|
return jm;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -141,16 +141,19 @@
|
|||||||
/**
|
/**
|
||||||
* 支付宝支付需要模拟GET提交数据
|
* 支付宝支付需要模拟GET提交数据
|
||||||
*/
|
*/
|
||||||
|
console.log("支付宝支付入参app", data)
|
||||||
_this.$u.api.pay(data).then(res => {
|
_this.$u.api.pay(data).then(res => {
|
||||||
|
//console.log("支付宝支付返回参数app", res)
|
||||||
|
//console.log("支付宝app支付get提交数据", res.data)
|
||||||
if (res.status) {
|
if (res.status) {
|
||||||
uni.requestPayment({
|
uni.requestPayment({
|
||||||
provider: "alipay",
|
provider: "alipay",
|
||||||
orderInfo: res.data.data,
|
orderInfo: res.data,
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
_this.$refs.uToast.show({
|
_this.$refs.uToast.show({
|
||||||
message: '支付成功', type: 'success', complete: function () {
|
message: '支付成功', type: 'success', complete: function () {
|
||||||
_this.redirectHandler(res.data.paymentId)
|
console.log("支付id", res.otherData.tradeNo)
|
||||||
|
_this.redirectHandler(res.otherData.tradeNo)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -224,7 +224,7 @@
|
|||||||
//微信退款回调
|
//微信退款回调
|
||||||
"WeChatRefundUrl": "https://api.pro.coreshop.cn/Notify/WeChatPay/Refund",
|
"WeChatRefundUrl": "https://api.pro.coreshop.cn/Notify/WeChatPay/Refund",
|
||||||
//支付宝支付回调
|
//支付宝支付回调
|
||||||
"AlipayUrl": "",
|
"AlipayUrl": "https://api.pro.coreshop.cn/Notify/AliPay/Unifiedorder",
|
||||||
//支付宝退款回调
|
//支付宝退款回调
|
||||||
"AlipayRefundUrl": ""
|
"AlipayRefundUrl": ""
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -7,15 +7,19 @@
|
|||||||
* CreateTime: 2021/1/31 21:45:10
|
* CreateTime: 2021/1/31 21:45:10
|
||||||
* Description: 暂无
|
* Description: 暂无
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
|
using CoreCms.Net.Caching.AutoMate.RedisCache;
|
||||||
|
using CoreCms.Net.Configuration;
|
||||||
|
using CoreCms.Net.Loging;
|
||||||
using Essensoft.Paylink.Alipay;
|
using Essensoft.Paylink.Alipay;
|
||||||
using Essensoft.Paylink.Alipay.Notify;
|
using Essensoft.Paylink.Alipay.Notify;
|
||||||
using Essensoft.Paylink.Alipay.Utility;
|
using Essensoft.Paylink.Alipay.Utility;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.Extensions.Options;
|
using Microsoft.Extensions.Options;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using NLog;
|
||||||
|
|
||||||
namespace CoreCms.Net.Web.WebApi.Controllers.PayNotify
|
namespace CoreCms.Net.Web.WebApi.Controllers.PayNotify
|
||||||
{
|
{
|
||||||
@@ -27,18 +31,52 @@ namespace CoreCms.Net.Web.WebApi.Controllers.PayNotify
|
|||||||
{
|
{
|
||||||
private readonly IAlipayNotifyClient _client;
|
private readonly IAlipayNotifyClient _client;
|
||||||
private readonly IOptions<AlipayOptions> _optionsAccessor;
|
private readonly IOptions<AlipayOptions> _optionsAccessor;
|
||||||
|
private readonly IRedisOperationRepository _redisOperationRepository;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 构造函数
|
/// 构造函数
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="client"></param>
|
/// <param name="client"></param>
|
||||||
/// <param name="optionsAccessor"></param>
|
/// <param name="optionsAccessor"></param>
|
||||||
public AliPayController(IAlipayNotifyClient client, IOptions<AlipayOptions> optionsAccessor)
|
/// <param name="redisOperationRepository"></param>
|
||||||
|
public AliPayController(IAlipayNotifyClient client, IOptions<AlipayOptions> optionsAccessor, IRedisOperationRepository redisOperationRepository)
|
||||||
{
|
{
|
||||||
_client = client;
|
_client = client;
|
||||||
_optionsAccessor = optionsAccessor;
|
_optionsAccessor = optionsAccessor;
|
||||||
|
_redisOperationRepository = redisOperationRepository;
|
||||||
|
}
|
||||||
|
#region 支付宝统一回调接口
|
||||||
|
/// <summary>
|
||||||
|
/// APP支付统一下单支付结果通知
|
||||||
|
/// https://api.pro.coreshop.cn/Notify/AliPay/Unifiedorder
|
||||||
|
/// </summary>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<IActionResult> Unifiedorder()
|
||||||
|
{
|
||||||
|
NLogUtil.WriteAll(LogLevel.Trace, LogType.Order, "支付宝支付回调开始", "支付宝回调开始数据标记");
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var notify = await _client.ExecuteAsync<AlipayTradeAppPayNotify>(Request, _optionsAccessor.Value);
|
||||||
|
NLogUtil.WriteAll(LogLevel.Trace, LogType.Order, "支付宝支付回调支付宝返回的参数", JsonConvert.SerializeObject(notify));
|
||||||
|
if (notify.TradeStatus == AlipayTradeStatus.Success)
|
||||||
|
{
|
||||||
|
NLogUtil.WriteAll(LogLevel.Trace, LogType.Order, "支付宝支付回调开始处理订单业务,队列名称:", RedisMessageQueueKey.AliPayNotice);
|
||||||
|
await _redisOperationRepository.ListLeftPushAsync(RedisMessageQueueKey.AliPayNotice, JsonConvert.SerializeObject(notify));
|
||||||
|
return AlipayNotifyResult.Success;
|
||||||
|
}
|
||||||
|
NLogUtil.WriteAll(LogLevel.Trace, LogType.Order, "支付宝支付成功回调", JsonConvert.SerializeObject(notify));
|
||||||
|
return NoContent();
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
NLogUtil.WriteAll(LogLevel.Trace, LogType.Order, "支付宝支付成功回调", "统一下单支付结果通知", ex);
|
||||||
|
return NoContent();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 其他
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 应用网关
|
/// 应用网关
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -57,7 +95,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers.PayNotify
|
|||||||
var options = _optionsAccessor.Value;
|
var options = _optionsAccessor.Value;
|
||||||
|
|
||||||
// 获取参数
|
// 获取参数
|
||||||
var parameters =await _client.GetParametersAsync(Request);
|
var parameters = await _client.GetParametersAsync(Request);
|
||||||
var sign = parameters["sign"];
|
var sign = parameters["sign"];
|
||||||
parameters.Remove("sign");
|
parameters.Remove("sign");
|
||||||
|
|
||||||
@@ -146,17 +184,18 @@ namespace CoreCms.Net.Web.WebApi.Controllers.PayNotify
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var notify = await _client.CertificateExecuteAsync<AlipayTradePrecreateNotify>(Request, _optionsAccessor.Value);
|
var notify = await _client.ExecuteAsync<AlipayTradeAppPayNotify>(Request, _optionsAccessor.Value);
|
||||||
if (notify.TradeStatus == AlipayTradeStatus.Success)
|
if (notify.TradeStatus == AlipayTradeStatus.Success)
|
||||||
{
|
{
|
||||||
Console.WriteLine("OutTradeNo: " + notify.OutTradeNo);
|
await _redisOperationRepository.ListLeftPushAsync(RedisMessageQueueKey.AliPayNotice, JsonConvert.SerializeObject(notify));
|
||||||
|
|
||||||
return AlipayNotifyResult.Success;
|
return AlipayNotifyResult.Success;
|
||||||
}
|
}
|
||||||
|
NLogUtil.WriteAll(LogLevel.Trace, LogType.Order, "支付宝支付成功回调", JsonConvert.SerializeObject(notify));
|
||||||
return NoContent();
|
return NoContent();
|
||||||
}
|
}
|
||||||
catch
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
NLogUtil.WriteAll(LogLevel.Trace, LogType.Order, "支付宝支付成功回调", "统一下单支付结果通知", ex);
|
||||||
return NoContent();
|
return NoContent();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -183,7 +222,6 @@ namespace CoreCms.Net.Web.WebApi.Controllers.PayNotify
|
|||||||
return NoContent();
|
return NoContent();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 电脑网站支付异步通知
|
/// 电脑网站支付异步通知
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -278,6 +316,6 @@ namespace CoreCms.Net.Web.WebApi.Controllers.PayNotify
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -224,7 +224,7 @@
|
|||||||
//微信退款回调
|
//微信退款回调
|
||||||
"WeChatRefundUrl": "https://api.pro.coreshop.cn/Notify/WeChatPay/Refund",
|
"WeChatRefundUrl": "https://api.pro.coreshop.cn/Notify/WeChatPay/Refund",
|
||||||
//支付宝支付回调
|
//支付宝支付回调
|
||||||
"AlipayUrl": "",
|
"AlipayUrl": "https://api.pro.coreshop.cn/Notify/AliPay/Unifiedorder",
|
||||||
//支付宝退款回调
|
//支付宝退款回调
|
||||||
"AlipayRefundUrl": ""
|
"AlipayRefundUrl": ""
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user