x2nx/wework-finance-sdk 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

x2nx/wework-finance-sdk

Composer 安装命令:

composer require x2nx/wework-finance-sdk

包简介

Enterprise WeChat Conversation Content Archive PHP Extension

README 文档

README

English · 简体中文

This extension package provides PHP access capabilities for the WeChat Enterprise session content archiving service, supporting the following three access methods:

  1. API method - start the API service through Docker (API based on GO)
  2. FFI method - call the official SDK through the PHP FFI extension
  3. Extension method - use the compiled PHP native extension

Environmental requirements

  • If you use the FFI method, you need to install the PHP FFI extension
  • If you use the extension method, you need to compile and install the extension
  • PHP <= 7.3 It is recommended to use the API or native extension method to connect
  • PHP >= 7.4 It is recommended to use the FFI or API method to connect

Functional features

  • Support for obtaining session archive content
  • Support for decrypting session messages
  • Support for obtaining media files
  • Support for multiple message types: text, pictures, voice, video, files, etc.
  • Support for specifying multiple private keys for decryption by version number
  • The data structure is consistent, you only need to set the SDK method to use it quickly

Getting Started

Install using Composer:

composer require x2nx/wework-finance-sdk

Code Example:

$sdk = new \X2nx\WeworkFinance\SDK([
    // 'api_mase'=>'Custom API Service Address' is available when provider=API
    'provider' => 'api', // ffi ext api three methods optional default api method
    'corpid' => 'xxxxxxxxxxxxxxxxxxxx',
    'secret' => 'xxxxxxxxxxxxxxxxxxxx',
    'private_keys' => [
        'version number' => 'decryption private key'
    ]
]);

$data = $sdk->getDecryptChatData(0, 50, 3);

Build toolkit

The build directory contains three scripts to help build and manage the SDK:

  1. build.sh - Build Docker image for API service
# Enter directory
cd build/docker/
#Build API service Docker image for installation and uninstallation
./build.sh install
# Uninstall image and container
./build.sh uninstall
# You can also use our Docker Hub image to start with just one click
docker run -itd --restart=always --privileged=true -h weworkmsg --name=weworkmsg -e WECOMMSG_HOST=0.0.0.0 -p 7149:7149 x2nx/wework-finances-api:v1.0.0
  1. ffi.sh - Compile PHP native FFI extension
# Enter directory
cd build/
# Build SDK library file for FFI mode Usage example: ./ffi.sh 7.4.33
./ffi.sh {php version}
  1. wxwork_finance_sdk.sh - Compile PHP wxwork_finance_sdk extension
# Enter directory
cd build/
# Compile and install PHP Extension
./wxwork_finance_sdk.sh

Choose the appropriate build script based on your preferred access method:

  • For API mode: simple and fast one-click start, no need to consider environment and other issues
  • For extension mode: use PHP7.4 and below, compiling extensions is more cumbersome
  • For FFI mode: use PHP7.4 and above
  • Due to compatibility issues between alpine and glibc, the extension compilation and installation will fail to run after successful installation. It is recommended to use the API method
  • If the PHP environment is installed, the script can run normally

Participate and contribute

We warmly welcome contributions in various forms. If you encounter any code or environment configuration issues during use, please feel free to submit feedback on GitHub [Issues] [GitHub issues link]. We also welcome your suggestions on features and user experience to help us continuously improve.

Thanks and Related Links

Copyright and license

The MIT License (MIT) http://www.opensource.org/licenses/mit-license.php

x2nx/wework-finance-sdk 适用场景与选型建议

x2nx/wework-finance-sdk 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 129 次下载、GitHub Stars 达 2, 最近一次更新时间为 2025 年 01 月 02 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 x2nx/wework-finance-sdk 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 x2nx/wework-finance-sdk 我们能提供哪些服务?
定制开发 / 二次开发

基于 x2nx/wework-finance-sdk 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 129
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 28
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-01-02