YaseiAkira.WX.NetCore 1.0.4

There is a newer version of this package available.
See the version list below for details.
dotnet add package YaseiAkira.WX.NetCore --version 1.0.4                
NuGet\Install-Package YaseiAkira.WX.NetCore -Version 1.0.4                
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="YaseiAkira.WX.NetCore" Version="1.0.4" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add YaseiAkira.WX.NetCore --version 1.0.4                
#r "nuget: YaseiAkira.WX.NetCore, 1.0.4"                
#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 YaseiAkira.WX.NetCore as a Cake Addin
#addin nuget:?package=YaseiAkira.WX.NetCore&version=1.0.4

// Install YaseiAkira.WX.NetCore as a Cake Tool
#tool nuget:?package=YaseiAkira.WX.NetCore&version=1.0.4                

封装微信相关接口,目前只有普通商户支付和服务商支付接口V2版

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  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. 
.NET Core netcoreapp3.1 is compatible. 
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
1.0.4.2 363 4/15/2021
1.0.4 308 4/4/2021

1.封装了部分微信接口
   2.目前只有普通商户支付接口
   3.后续接口陆续会新增

   使用
   1.统一下单,普通商户版
   var order = new Unifiedorder();
       /// 参数 name="appid">
       /// 参数 name="mch_id">
       /// 参数 name="mch_secret">
       /// 参数 name="out_trade_no">
       /// 参数 name="total_fee">只需传递费用,如 0.5, 转换成 分 已在内部处理
       /// 参数 name="ip">
       /// 参数 name="body">已做超长处理
       /// 参数 name="notify_url">
       /// 参数 name="product_id">
       /// 参数 name="openid">
       /// 参数 name="detail">已做超长处理
       /// 参数 name="trade_type">
       /// 参数 name="others">其他符合微信支付对应接口的字段信息 如fee_type,goods_tag 等
       /// 返回值说明
       /// Success : 是否支付成功
       /// Message: 支付成功没有数据, 支付失败则是失败信息
       /// Data:
       /// 如果是 JSAPI/APP/小程序支付:Data 为二次签名的数据, 可以直接返回给前端调起支付;
       /// 如果是 H5支付:Data 为 微信返回的源数据, Data["mweb_url"] 返回给前端跳转支付;
       /// 如果是 NATIVE支付: Data 为 微信返回源数据 , Data["code_url"] 用来生成支付二维码, Data["prepay_id"] 自行处理
       
   var result = await order.PayAsync(string appid,
            mch_id,  
            mch_secret,  
            out_trade_no,
            total_fee,
            ip,
            body,  
            notify_url,
            product_id ,
            openid ,
            detail ,
            trade_type ,
            others );

   2.付款码支付,普通商户版
   var microPay = new MicroPay();
   
       /// 参数 name="appid">
       /// 参数 name="mch_id">
       /// 参数 name="mch_secret">
       /// 参数 name="out_trade_no">
       /// 参数 name="total_fee">只需传递费用,如 0.5, 转换成 分 已在内部处理
       /// 参数 name="ip">
       /// 参数 name="auth_code">
       /// 参数 name="body">已做超长处理
       /// 参数 name="detail">已做超长处理
       /// 参数 name="others">其他符合微信支付对应接口的字段信息 如fee_type,goods_tag 等
       /// 返回值说明
       /// Success : 是否支付成功;
       /// Message: 支付成功没有数据, 支付失败则是失败信息;
       /// Data : 为微信支付返回的源响应数据
       
   var result = microPay.PayAsync(appid,
           mch_id,
           mch_secret,
           out_trade_no,
           total_fee,
           ip,
           auth_code,
           body,
           detail,
           others);

   3.统一下单,服务商版
   var order = new SPUnifiedorder();
       
       /// appid"
       /// mch_id"
       /// mch_secret"
       /// sub_appid">微信分配的子商户公众账号ID
       /// sub_mch_id">微信支付分配的子商户号
       /// out_trade_no"
       /// total_fee">只需传递费用,如 0.5, 转换成 分 已在内部处理
       /// ip"
       /// body">已做超长处理
       /// notify_url"
       /// product_id"
       /// openid"
       /// sub_openid">trade_type=JSAPI,此参数必传,用户在子商户appid下的唯一标识。openid和sub_openid可以选传其中之一
       /// detail">已做超长处理
       /// trade_type"
       /// others">其他符合微信支付对应接口的字段信息 如fee_type,goods_tag 等

       /// 返回说明
       /// Success : 是否支付成功
       /// Message: 支付成功没有数据, 支付失败则是失败信息
       /// Data:
       /// 如果是 JSAPI/APP/小程序支付:Data 为二次签名的数据, 可以直接返回给前端调起支付;
       /// 如果是 H5支付:Data 为 微信返回的源数据, Data["mweb_url"] 返回给前端跳转支付;
       /// 如果是 NATIVE支付: Data 为 微信返回源数据 , Data["code_url"] 用来生成支付二维码, Data["prepay_id"] 自行处理
       
   var result = await order.PayAsync(appid,
            mch_id, mch_secret,
            sub_appid,
            sub_mch_id,
            out_trade_no,
            total_fee,  ip,
            body,notify_url,
            product_id ,
            openid,
            sub_openid,
            detail,trade_type,
           others);

   4.付款码支付,服务商版
   var microPay = new SPMicroPay();
   
       /// appid
       /// mch_id
       /// mch_secret
       /// sub_appid">微信分配的子商户公众账号ID
       /// sub_mch_id">微信支付分配的子商户号
       /// out_trade_no
       /// total_fee">只需传递费用,如 0.5, 转换成 分 已在内部处理
       /// ip
       /// auth_code
       /// body">已做超长处理
       /// detail">已做超长处理
       /// others">其他符合微信支付对应接口的字段信息 如fee_type,goods_tag 等

       /// 返回说明
       /// Success : 是否支付成功;
       /// Message: 支付成功没有数据, 支付失败则是失败信息;
       /// Data : 为微信支付返回的源响应数据
       
   var result = microPay.PayAsync(appid,
            mch_id,
            mch_secret,
            sub_appid,
            sub_mch_id,
            out_trade_no,
            total_fee,
            ip,
            auth_code,
            body, detail, others);

   异步通知验签
   var signer = new UnifiedorderCore();
   
   /// paramsList">带sign的所有通知参数字典
   /// mchSecret">商户密钥
   signer.VerifyNotify(paramsList,mchSecret);