dg-csharp-sdk 1.0.33

dotnet add package dg-csharp-sdk --version 1.0.33
                    
NuGet\Install-Package dg-csharp-sdk -Version 1.0.33
                    
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="dg-csharp-sdk" Version="1.0.33" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="dg-csharp-sdk" Version="1.0.33" />
                    
Directory.Packages.props
<PackageReference Include="dg-csharp-sdk" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add dg-csharp-sdk --version 1.0.33
                    
#r "nuget: dg-csharp-sdk, 1.0.33"
                    
#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.
#:package dg-csharp-sdk@1.0.33
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=dg-csharp-sdk&version=1.0.33
                    
Install as a Cake Addin
#tool nuget:?package=dg-csharp-sdk&version=1.0.33
                    
Install as a Cake Tool

C# SDK 简介

为了提高客户接入的便捷性,本系统提供 SDK 方式接入,使用本 SDK 将极大的简化开发者的工作,开发者将无需考虑通信、签名、验签等,只需要关注业务参数的输入。

SDK 项目结构说明

  • BasePaySdk -- SDK核心包, 包含通信, 加解签, 接口参数对象等
  • Request -- 接口请求类, 包含接口所有必填字段

SDK 接入说明

以下两种方式任选其一

  1. 直接在项目.csproj文件中引用(version 版本建议使用当前最新版)
    <ItemGroup>
      <PackageReference Include="DG-CSHARP-SDK" Version="x.x.x" />
    </ItemGroup>
  1. 直接下载源码文件, 将BasePaySdk(SDK核心包)源码放入项目中

SDK 使用说明

可参考项目源码中demo的使用方式[源码地址](https://github.com/huifurepo/bspay-csharp-sdk)
接口命名直接根据接口URL来命名, 方便用户使用, 需要使用某接口时, 可直接使用接口中文名, 或接口URL(驼峰格式)进行搜索, 找到对应的request, demo等
  1. 配置初始化
  • 初始化为全局配置(多商户模式下, 可初始化多份, 参考demo中方法)
    InitMerConfig.init();
  1. 组装请求参数
  • 为了接口使用更加方便, 我们将参数粗分为必填/非必填, 必填直接放在类中, 非必填放在extendInfos字段中
    // 2.组装请求参数
    V2MerchantBasicdataQueryRequest request = new V2MerchantBasicdataQueryRequest();
    // 请求流水号
    request.setReqSeqId(DateTime.Now.ToString("yyy-MM-dd HH.mm.ss.fff"));
    // 请求日期
    request.setReqDate(DateTime.Now.ToString("yyyyMMdd"));
    // 汇付客户Id
    request.setHuifuId("6666000108854952");

    // 设置非必填字段
    Dictionary<string, object> extendInfoMap = getExtendInfos();
    request.setExtendInfo(extendInfoMap);
  1. 发起API调用
    // 3. 发起API调用
    Dictionary<string, Object> result = null;
    result = BasePayClient.postRequest(request, null);
Product Compatible and additional computed target framework versions.
.NET Framework net48 is compatible.  net481 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
1.0.33 85 9/24/2026
1.0.32 102 8/28/2026
1.0.31 127 7/24/2026
1.0.30 128 6/26/2026
1.0.29 143 6/11/2026
1.0.28 120 5/29/2026
1.0.27 140 4/24/2026
1.0.26 147 3/25/2026
1.0.25 167 1/28/2026
1.0.24 238 12/24/2025
1.0.23 235 11/26/2025
1.0.22 310 10/29/2025
1.0.21 279 9/25/2025
1.0.20 299 8/26/2025
1.0.19 668 7/23/2025
1.0.18 231 6/27/2025
1.0.17 330 4/24/2025
1.0.16 327 3/27/2025
1.0.15 433 12/5/2024
1.0.14 416 11/8/2024
Loading failed