Bitzsoft.Integrations.Xft
1.0.0-alpha.7
This is a prerelease version of Bitzsoft.Integrations.Xft.
dotnet add package Bitzsoft.Integrations.Xft --version 1.0.0-alpha.7
NuGet\Install-Package Bitzsoft.Integrations.Xft -Version 1.0.0-alpha.7
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="Bitzsoft.Integrations.Xft" Version="1.0.0-alpha.7" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Bitzsoft.Integrations.Xft" Version="1.0.0-alpha.7" />
<PackageReference Include="Bitzsoft.Integrations.Xft" />
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 Bitzsoft.Integrations.Xft --version 1.0.0-alpha.7
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Bitzsoft.Integrations.Xft, 1.0.0-alpha.7"
#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 Bitzsoft.Integrations.Xft@1.0.0-alpha.7
#: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=Bitzsoft.Integrations.Xft&version=1.0.0-alpha.7&prerelease
#tool nuget:?package=Bitzsoft.Integrations.Xft&version=1.0.0-alpha.7&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Bitzsoft.Integrations.Xft
薪福通(XFT)一站式人财事数字开放平台集成客户端。
功能特性
本包对接招商银行薪福通开放平台,提供以下业务域的完整 API 访问能力:
- 国密签名:内置
XftSignHandler自动使用 SM2/SM3/SM4 算法签名,调用方无需处理签名细节 - 第三方请求日志:内置 RequestLogging DelegatingHandler,记录所有出站 HTTP 请求与响应,便于问题排查
- 事件回调解析:
XftEventParser解析薪福通平台推送的事件回调
Phase 1: 公共服务 (5 APIs)
XftPublicServiceProvider— 公共服务
Phase 2: HR 基础域 (84 APIs)
XftOrganizationProvider— 组织管理XftUserProvider— 用户管理XftEmployeeProvider— 员工管理XftPermissionProvider— 权限管理
Phase 3: 薪资社保域 (98 APIs)
XftPayrollProvider— 薪资管理XftSmartSalaryProvider— 智能薪资XftAttendanceProvider— 考勤管理XftBatchAccountProvider— 批量账户XftElectronicPayslipProvider— 电子工资单
Phase 4: 财务税务域 (169 APIs)
XftFinanceProvider— 财务管理XftTaxFilingProvider— 税务申报XftTaxCloudProvider— 税务云
Phase 5: 费控与办公域 (225 APIs)
XftExpenseControlProvider— 费控管理XftApprovalProvider— 审批流程XftMessageProvider— 消息通知XftUnionBenefitProvider— 工会福利
Phase 6: 其他域 + 事件回调 (28 APIs)
XftCustomerProvider— 客户管理XftPartnerProvider— 合作伙伴XftLowCodeProvider— 低代码XftOpenServiceProvider— 开放服务XftEventParser— 事件回调解析(Singleton)
安装
dotnet add package Bitzsoft.Integrations.Xft
<PackageReference Include="Bitzsoft.Integrations.Xft" Version="*" />
配置
{
"Xft": {
"AppKey": "薪福通提供的 AppKey",
"AppSecret": "双方约定的 AppSecret",
"BaseUrl": "https://open.xft.cmbchina.com",
"EnterpriseId": "企业 ID"
}
}
| 参数 | 必填 | 默认值 | 说明 |
|---|---|---|---|
AppKey |
是 | — | 薪福通侧提供的对接码 |
AppSecret |
是 | — | 双方约定的签名密钥 |
BaseUrl |
否 | 薪福通正式环境地址 | API 基地址 |
EnterpriseId |
是 | — | 企业 ID |
注册服务
using Bitzsoft.Integrations.Xft;
services.AddBitzsoftXft(configuration);
或使用代码配置:
services.AddBitzsoftXft(options =>
{
options.AppKey = "your-app-key";
options.AppSecret = "your-app-secret";
options.BaseUrl = "https://open.xft.cmbchina.com";
options.EnterpriseId = "your-enterprise-id";
});
第三方请求日志
内置 Bitzsoft.Integrations.RequestLogging 出站请求记录管道,默认使用 NullRequestLogStore 不持久化。
// ① 默认:启用记录管道但不持久化(日志丢弃)
services.AddBitzsoftXft(options => { /* ... */ });
// ② 持久化:宿主注册 IRequestLogStore 实现后,所有出站请求自动落库
services.AddRequestLogging<MyRequestLogStore>(opts =>
{
opts.MaxBodyLength = 8192;
opts.SensitiveFields.Add("mySecret");
});
services.AddBitzsoftXft(options => { /* ... */ });
签名机制
本包自动处理薪福通 API 的签名流程:
- 使用 SM2/SM3/SM4 国密算法进行签名
- 通过
XftSignHandler自动为请求添加签名 - 支持
XftHttpClient的 Typed HttpClient 模式
事件回调
使用 XftEventParser 解析薪福通平台推送的事件回调:
var eventParser = serviceProvider.GetRequiredService<XftEventParser>();
var xftEvent = await eventParser.ParseAsync(requestBody);
目标框架
- .NET 5.0
- .NET 8.0
- .NET 10.0
相关包
| 包名 | 说明 |
|---|---|
| Bitzsoft.Integrations.Finance | 财税管理公共基础 |
| Bitzsoft.Integrations.Finance.Payroll | 薪酬社保抽象层 |
| Bitzsoft.Integrations.Compatibility | 基础工具库 |
外部依赖
- BouncyCastle.Cryptography — 国密算法支持(SM2/SM3/SM4)
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 is compatible. 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 is compatible. 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. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- Bitzsoft.Integrations.Compatibility (>= 1.0.0-alpha.7)
- Bitzsoft.Integrations.RequestLogging (>= 1.0.0-alpha.7)
- BouncyCastle.Cryptography (>= 2.5.1)
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.9)
- Microsoft.Extensions.Http (>= 10.0.9)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.9)
-
net5.0
- Bitzsoft.Integrations.Compatibility (>= 1.0.0-alpha.7)
- Bitzsoft.Integrations.RequestLogging (>= 1.0.0-alpha.7)
- BouncyCastle.Cryptography (>= 2.5.1)
- Microsoft.Extensions.Configuration.Abstractions (>= 5.0.0)
- Microsoft.Extensions.Http (>= 5.0.0)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 5.0.0)
-
net8.0
- Bitzsoft.Integrations.Compatibility (>= 1.0.0-alpha.7)
- Bitzsoft.Integrations.RequestLogging (>= 1.0.0-alpha.7)
- BouncyCastle.Cryptography (>= 2.5.1)
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.9)
- Microsoft.Extensions.Http (>= 10.0.9)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.9)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Bitzsoft.Integrations.Xft:
| Package | Downloads |
|---|---|
|
Bitzsoft.Integrations.All
Bitzsoft 第三方集成聚合包 — 包含全部 Integration 模块 |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0-alpha.7 | 55 | 6/16/2026 |
| 1.0.0-alpha.6 | 64 | 6/16/2026 |
| 1.0.0-alpha.5 | 55 | 6/14/2026 |