essensoft / paylink Goto Github PK
View Code? Open in Web Editor NEW一套基于 .NET 开发的支付SDK,它简化了API调用及通知的处理流程。
License: MIT License
一套基于 .NET 开发的支付SDK,它简化了API调用及通知的处理流程。
License: MIT License
在微信分账接口中,参数为 transaction_id 和 out_order_no。但在 payment中,参数为 transaction_id 和 out_trade_no
微信支付接口V3, V2什么不一样?
不知道关于微信企业付款到零钱能不能撤销的?或者作者是否知道这个?
测试demo退款接口调用不通
Sample里面没有写appsetting.json 相关内容,想问下银联支付是如何配置的
在window服务器正常,在Centos7上出错,错误信息
System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception.--->System.Security.Authentication.AuthenticationException: The remote certificate is invalid according to the validation procedure.\n at System.Net.Security.SslState.StartSendAuthResetSignal(ProtocolToken message, AsyncProtocolRequest asyncRequest, ExceptionDispatchInfo exception)\n at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)\n at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)\n at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest)\n at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)\n at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)\n at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)\n at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)\n at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest)\n at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)\n at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)\n at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)\n at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)\n at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest)\n at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)\n at System.Net.Security.SslState.PartialFrameCallback(AsyncProtocolRequest asyncRequest)\n---End of stack trace from previous location where exception was thrown---\n at System.Net.Security.SslState.ThrowIfExceptional()\n at System.Net.Security.SslState.InternalEndProcessAuthentication(LazyAsyncResult lazyResult)\n at System.Net.Security.SslState.EndProcessAuthentication(IAsyncResult result)\n at System.Net.Security.SslStream.EndAuthenticateAsClient(IAsyncResult asyncResult)\n at System.Net.Security.SslStream. < >c. < AuthenticateAsClientAsync > b__47_1(IAsyncResult iar)\n at System.Threading.Tasks.TaskFactory
1.FromAsyncCoreLogic(IAsyncResult iar, Func2 endFunction, Action
1 endAction, Task1 promise, Boolean requiresSynchronization)\n---End of stack trace from previous location where exception was thrown---\n at System.Net.Http.ConnectHelper.EstablishSslConnectionAsyncCore(Stream stream, SslClientAuthenticationOptions sslOptions, CancellationToken cancellationToken)\n---End of inner exception stack trace---\n at System.Net.Http.ConnectHelper.EstablishSslConnectionAsyncCore(Stream stream, SslClientAuthenticationOptions sslOptions, CancellationToken cancellationToken)\n at System.Threading.Tasks.ValueTask
1.get_Result()\n at System.Net.Http.HttpConnectionPool.CreateConnectionAsync(HttpRequestMessage request, CancellationToken cancellationToken)\n at System.Threading.Tasks.ValueTask1.get_Result()\n at System.Net.Http.HttpConnectionPool.WaitForCreatedConnectionAsync(ValueTask
1 creationTask)\n at System.Threading.Tasks.ValueTask1.get_Result()\n at System.Net.Http.HttpConnectionPool.SendWithRetryAsync(HttpRequestMessage request, Boolean doRequestAuth, CancellationToken cancellationToken)\n at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)\n at Microsoft.Extensions.Http.Logging.LoggingHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)\n at Microsoft.Extensions.Http.Logging.LoggingScopeHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)\n at System.Net.Http.HttpClient.FinishSendAsyncBuffered(Task
1 sendTask, HttpRequestMessage request, CancellationTokenSource cts, Boolean disposeCts)\n at Essensoft.AspNetCore.Payment.WeChatPay.Utility.HttpClientExtensions.DoPostAsync(HttpClient client, String url, String content)\n at Essensoft.AspNetCore.Payment.WeChatPay.WeChatPayClient.ExecuteAsync[T](IWeChatPayRequest1 request, String optionsName)\n at Donvv.Meeting.Controllers.PaymentController.MpPay(Int32 id, String openId) in E: \\DonvvMeeting\\server\\Meeting\\Meeting\\Donvv.Meeting\\Controllers\\PaymentController.cs: line 84 ","Properties ":{"SourceContext ":"Donvv.Meeting.Controllers.PaymentController ","ActionId ":"0791aadb - d831 - 4f4c - 95cd - 8fb940f6595e ","ActionName ":"Donvv.Meeting.Controllers.PaymentController.MpPay(Donvv.Meeting)","RequestId ":"0HLLUB9I9NS1B: 00000001 ","RequestPath ":" / api / Payment / MpPay
尝试解决方法:
ServicePointManager.ServerCertificateValidationCallback +=
(sender, certificate, chain, sslPolicyErrors) => true;无效
ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls; 无效
export DOTNET_SYSTEM_NET_HTTP_USESOCKETSHTTPHANDLER=0 无效
export SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt
export SSL_CERT_DIR=/dev/null 无效
我支付是正常的
但是退款就提示这个问题:
The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters.
支付宝异步会掉老是报错,但正常支持成功!在支付成功后进行异步回调时会报签名不正确问题,为啥??
using (var rsa = RSA.Create())
{
var type = "RSA2" == signType ? HashAlgorithmName.SHA256 : HashAlgorithmName.SHA1;
rsa.ImportParameters(parameters);
var request= rsa.VerifyData(Encoding.UTF8.GetBytes(data), Convert.FromBase64String(sign), type, RSASignaturePadding.Pkcs1);
return request;
}
就这段一直返回false
公众号jssdk调用时提示,支付验证签名失败
我在领域层实现功能,但怎么在web去注入相关的服务呢?
教程是 // 引入Payment 依赖注入
services.AddAlipay();
services.AddWeChatPay();
// 在 appsettings.json(开发环境:appsettings.Development.json) 中 配置选项
services.Configure<AlipayOptions>(Configuration.GetSection("Alipay"));
services.Configure<WeChatPayOptions>(Configuration.GetSection("WeChatPay"));
Now .NET Standard 2.1 is released:
https://docs.microsoft.com/en-us/dotnet/standard/net-standard#net-implementation-support
Any plan to upgrade?
我没有在【Essensoft.AspNetCore.Payment.Alipay.Notify】这个命名空间下找到
https://docs.open.alipay.com/20180417160701241302/ckfuuu/
这个网址中的4个对应回调模型,可否新增一下?
https://pay.weixin.qq.com/wiki/doc/api/allocation_sl.php?chapter=25_9&index=9
您好,这个【微信分账动账通知】后期有考虑加上吗?
我看代码验证签名的参数,都验证了公钥证书、商户证书和根证书,代码位置如下
Essensoft.AspNetCore.Payment.Alipay.AlipayClient类中的方法
public async Task<T> CertificateExecuteAsync<T>(IAlipayRequest<T> request, AlipayOptions options, string accessToken, string appAuthToken) where T : AlipayResponse
{
if (options == null)
{
throw new ArgumentNullException(nameof(options));
}
if (string.IsNullOrEmpty(options.AppId))
{
throw new ArgumentNullException(nameof(options.AppId));
}
if (string.IsNullOrEmpty(options.SignType))
{
throw new ArgumentNullException(nameof(options.SignType));
}
if (string.IsNullOrEmpty(options.AppPrivateKey))
{
throw new ArgumentNullException(nameof(options.AppPrivateKey));
}
if (string.IsNullOrEmpty(options.AppCert))
{
throw new ArgumentNullException(nameof(options.AppCert));
}
if (string.IsNullOrEmpty(options.AlipayPublicCert))
{
throw new ArgumentNullException(nameof(options.AlipayPublicCert));
}
if (string.IsNullOrEmpty(options.RootCert))
{
throw new ArgumentNullException(nameof(options.RootCert));
}
if (string.IsNullOrEmpty(options.ServerUrl))
{
throw new ArgumentNullException(nameof(options.ServerUrl));
}
请问是否考虑支持一下 PayPal 呢
Hey!
I am looking for a solution for Visa pay on .NET Core.
Do you have any plan for this?
应用网关 消息服务
https://docs.open.alipay.com/10381
升级到 支付宝 到 Alipay-sdk-NET-4.1.0,并且抛弃Newtonsoft.Json,改用System.Text.Json
希望项目可以支持:
1/分帐功能
2/多appid支持
你好,感觉最近拼多多和有赞支付也比较多,可以考虑下支持吗
因社区参与度低,且部分渠道使用人数不多。
现决定终止维护 [连连支付、京东支付、银联支付、QQ钱包] 渠道。
后续精力主要集中在维护 [支付宝、微信支付] 上。
如果你项目中使用到了相关渠道,建议Fork,自行维护。
希望大家能够谅解。
Repro steps:
I guess it was because those files are using GBK encoding but my Visual Studio opened it with UTF-8.
I suggest switching all files with Chinese to use UTF-8 encoding to improve reading experience.
Now WeChat payment SDK seems only supports 商户支付
. But we are acting as a 服务商
. I could not find a place to configure 服务商
.
But official WeChat pay document supports it:
https://pay.weixin.qq.com/wiki/doc/api/sl.html
How can we implement it?
如题,为什么IWeChatPayNotifyClient及其一些相关代码被设计为只在NETCOREAPP3_1下进行编译?
Nuget 站点(https://www.nuget.org/packages/Essensoft.AspNetCore.Payment.Alipay/ )上没有 2.4.5 的版本, Security 和 WeChatPay 都有 2.4.5 的版本。
Question: 请问对于微信子商户支付,除了要在Options参数中额外提供SubAppId和SubMchId应当如何使用呢?
现在我的使用方法是:
对于这里的Value,额外给其赋值子商户Appid和商户Id。看起来似乎没问题。但是这样是正确的使用方法吗?
App端的开发人员说,他们收到的签名是错误的。
#if NETCOREAPP3_0
services.AddSingleton<IWeChatPayNotifyClient, WeChatPayNotifyClient>();
#endif
你好!
请问 不是3.0 的版本,怎么取使用IWeChatPayNotifyClient 相关业务呢?
Method not found: 'Void Essensoft.AspNetCore.Payment.Alipay.AlipayOptions.set_AppPrivateKey(System.String)'.
我看支付宝开发了好多好多功能,但是分帐的功能还没呢.
支付增加分帐和多app功能
返回结果任然是一个form形式的表单
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.