EasySeries.Pay 3.2.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package EasySeries.Pay --version 3.2.0
NuGet\Install-Package EasySeries.Pay -Version 3.2.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="EasySeries.Pay" Version="3.2.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add EasySeries.Pay --version 3.2.0
#r "nuget: EasySeries.Pay, 3.2.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install EasySeries.Pay as a Cake Addin
#addin nuget:?package=EasySeries.Pay&version=3.2.0

// Install EasySeries.Pay as a Cake Tool
#tool nuget:?package=EasySeries.Pay&version=3.2.0

EasySerise.Pay

Easy支付,Easy系列的首个应用,用于微信支付,阿里支付。

使用说明:

预先配置模式
//appsettings.json
  "AliPaySecurityOptions": {
    "AppId": "xxx",
    "PrivateKeyPath": "xx/xx.txt",
    "AliPublicKeyPath": "xx/xx.txt",
    "PayNotifyUrl": "https://xx/api/xxx"
  },
  "WechatPaySecurityOptions": {
    "AppId": "xxx",
    "MchId": "xxx",
    "Key": "v3 key",
    "CertSerialno": "xxx",
    "PlatCertPath": "xx/xx.pem",
    "PrivateKeyPath": "xx/xx.pem",
    "PayNotifyUrl": "https://xx/api/xxx"
  }
//注册
builder.Services.AddEasyPayService();

//使用
public YourController(IEasyPayWechat easyPayWechat, IEasyPayAli easyPayAli)
{
  _easyPayWechat = easyPayWechat;
  _easyPayAli = easyPayAli;
}
    
[HttpGet("wechat")]
public async Task<PayQueryResponse> QueryAsync(string outTradeNo)
{
  return await _easyPayWechat.WechatQueryPayAsync(outTradeNo, "");
}
    
[HttpGet("ali")]
public AlipayTradeQueryResponse QueryAli(string outTradeNo)
{
  return _easyPayAli.AlipayQuery(outTradeNo);
}
即时配置模式
//注册
builder.Services.AddEasyPayService();

//使用
public YourController(IEasyPayWechat easyPayWechat, IEasyPayAli easyPayAli)
{
        _easyPayWechat = easyPayWechat;
        _easyPayAli = easyPayAli;
}
    
[HttpGet("wechat")]
public async Task<PayQueryResponse> QueryAsync(string outTradeNo)
{
    var options = new WechatPaySecurityOptions
    {
      AppId = "your appid",
      MchId = "your MchId",
      Key = "v3 key",
      CertSerialno = "",
      PlatCertPath = "file path .pem",
      PrivateKeyPath = "file path .pem",
      PayNotifyUrl = "your api url"
    };
    return await _easyPayWechat.WechatQueryPayAsync(outTradeNo, "", options);
}
    
[HttpGet("ali")]
public AlipayTradeQueryResponse QueryAli(string outTradeNo)
{
    var options = new AliPaySecurityOptions
    {
      AppId = "your appid",
      PrivateKeyPath = "file path .txt",
      AliPublicKeyPath = "file path .txt",
      PayNotifyUrl = "your api url"
    };
    return _easyPayAli.AlipayQuery(outTradeNo, options);
}
Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
3.4.2 90 4/22/2024
3.4.1 86 4/21/2024
3.4.0 96 4/17/2024
3.3.3 82 4/16/2024
3.3.2 88 4/16/2024
3.3.1 97 4/15/2024
3.3.0 87 4/12/2024
3.2.5 109 9/19/2023
3.2.1 151 8/27/2023
3.2.0 127 6/22/2023