Giter Site home page Giter Site logo

php7-wxwork-finance-sdk's Introduction

wxwork_finance_sdk_wrapper

企业微信-会话内容存档PHP扩展

依赖

企业微信提供的sdk;

PHP VERSION >= 7.0

openssl扩展

安装步骤及要求

       $INSATLL_PATH_PATH/bin/phpize
        
       ./configure --with-php-config=$INSTALL_PHP_PATH/php-config --with-wxwork-finance-sdk=$WXWORK_FINANCE_C_SDK_PATH
       
        make && make install
php.ini 增加 extension=wxwork_finance_sdk.so

API

    WxworkFinanceSdkExcption::__construct();
    WxworkFinanceSdk::__construct(string $corpId, string $secret, array $options);
    string $corpId 企业号

    string $secret 秘钥

    array $options = [ // 可选参数
        'proxy_host' => string,
        'proxy_password' => string,
        'timeout' => 10, // 默认超时时间为10s
    ]
   string WxworkFinanceSdk::getChatData(int $seq, int $limit);
    * 拉取聊天数据
    $seq 起始位置
    $limit 获取条数
   bool WxworkFinanceSdk::downloadMedia(string $sdkfileid, string $saveTo)
   * 下载资源
   $sdkfileid 资源id。来自chat 中的数据sdkfileid
   $saveTo 本地保存的路径
   array WxworkFinanceSdk::getMediaData(string $sdkfileid, string $indexBuf='');
   * 拉取静态资源数据,用于可以支持追加模式的三方存储平台
   返回的数据结构体
   $ret = [
       'data' => '' // string 返回的数据
       'nextIndex' => 'ddd' // string 获取下一段数据的句柄
       'isFinished' => int // 1 数据已拉取完毕 
   ];
   
   
  • 感谢 @zhanzhaopeng1 PR
       string WxworkFinanceSdk::decryptData(string $randomKey, string $encryptStr);
       * 解密数据
       $randomKey 通过openssl解密后的key
       $encryptStr chats 的加密数据

问题

  1. free(): invalid pointer
   * 定位intl扩展的冲突问题. php -m |grep intl 建议重新编译php 取消intl扩展

示例

wxwork_finance_sdk.php

  • 遇到问题可以加我的麻花藤号 5687046

打赏一下的话就更好了~ Alipay

php7-wxwork-finance-sdk's People

Contributors

pangdahua avatar zhanzhaopeng1 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.