PHP code example of jiuyueyun / composer-wework-finance-sdk

1. Go to this page and download the library: Download jiuyueyun/composer-wework-finance-sdk library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

jiuyueyun / composer-wework-finance-sdk example snippets


## 企业配置
$corpConfig = [
    'corpid'       => 'xxxx',
    'secret'       => 'xxxx',
    'private_keys' => [
        '密钥版本号' => '私钥',
    ],
];
## 包配置
$srcConfig = [
    'default'   => 'php-ext',
    'providers' => [
        'php-ext' => [
            'driver' => \MoChat\WeWorkFinanceSDK\Provider\PHPExtProvider::class,
        ],
        'php-ffi' => [
            'driver' => \MoChat\WeWorkFinanceSDK\Provider\FFIProvider::class,
        ],
    ],
];

## 1、实例化
$sdk = MoChat\WeWorkFinanceSDK\WxFinanceSDK::init($corpConfig, $srcConfig);

## 获取聊天记录
$chatData = $sdk->getDecryptChatData($seq, $limit);

## 解析media
$medium = $sdk->getMediaData($sdkFileId, $ext)