PHPackages                             tongduiba/open-sdk - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. tongduiba/open-sdk

ActiveLibrary

tongduiba/open-sdk
==================

通兑吧服务端SDK

0.1.0(5y ago)010MITPHP

Since Sep 9Pushed 5y ago1 watchersCompare

[ Source](https://github.com/idouzi/tongduiba-open-sdk-php)[ Packagist](https://packagist.org/packages/tongduiba/open-sdk)[ RSS](/packages/tongduiba-open-sdk/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

tongduiba-open-sdk-php
======================

[](#tongduiba-open-sdk-php)

通兑吧 SDK for PHP

[![Latest Version on Packagist](https://camo.githubusercontent.com/fa5746f2401ab89e3f5b3ee7addc30fd2205124224944c84b3363ef197c9c514/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f746f6e6764756962612f6f70656e2d73646b2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tongduiba/open-sdk)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Total Downloads](https://camo.githubusercontent.com/9a621dc84cd9a69ae7aff19dfcd4a69e729450023c4b45901ddf2cee3ab43b7d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f746f6e6764756962612f6f70656e2d73646b2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tongduiba/open-sdk)

NOTICE
------

[](#notice)

请确保服务器端php版本 &gt;= 5.6.0, 建议 &gt;= 7.0, 且php开启ssl支持; 且商城后台正确获取到appKey,appSecret参数 已开放授权调用的API文档，请查看()

安装
--

[](#安装)

1. 使用 `Composer`推荐使用该方式安装, 更优雅

```
$ composer require tongduiba/open-sdk
```

2. 不适应 `Composer` 管理

如果你的项目不使用`Composer`管理, 可以直接下载[Release包](https://github.com/idouzi/tongduiba-open-sdk-php/releases) 并解压, 然后在项目中添加如下代码:
请注意, 需要下载的是最新的 `tongduiba-open-sdk.zip` 压缩包, 而不是 `Source code` 压缩包.
`/path/to/` 更改为项目实际路径.

```
require_once '/YOUR_SDK_PATH/tongduiba-open-sdk-php/open-sdk/vendor/autoload.php';
```

使用
--

[](#使用)

详情参考[examples](examples) 更多API文档请查看()

### 1. 生成自动登录url链接

[](#1-生成自动登录url链接)

#### 生成自动登录url链接

[](#生成自动登录url链接)

```
require_once './vendor/autoload.php';

$appKey = 'YOUR_APP_KEY';
$appSecret = 'YOUR_APP_SECRET';

$client = new \Tongduiba\Open\Client($appKey, $appSecret);
$method = '/user/login/auto-login';
$apiVersion = '0.1.0';

$params = ['unionId' => 'Your APP User’s UnionId', 'redirect' => ''];
$response = $client->getUrl($method, $apiVersion, $params);
var_dump($response);
```

### 2. 更改用户会员等级

[](#2-更改用户会员等级)

#### 更改用户会员等级

[](#更改用户会员等级)

```
require_once './vendor/autoload.php';

$appKey = 'YOUR_APP_KEY';
$appSecret = 'YOUR_APP_SECRET';
$apiVersion = '0.1.0';

$params = ['unionId' => 'Your APP User’s UnionId', 'memberLevel' => 'To Change Member’s Level'];
$response = $client->get($method, $apiVersion, $params);
var_dump($response);
```

Security
--------

[](#security)

If you discover any security related issues, please using the issue tracker.

License
-------

[](#license)

The MIT License. Please see [License File](LICENSE) for more information.

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 83.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2069d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/38717872?v=4)[jiuxikeji](/maintainers/jiuxikeji)[@jiuxikeji](https://github.com/jiuxikeji)

---

Top Contributors

[![gongjieming-idouzi](https://avatars.githubusercontent.com/u/70999119?v=4)](https://github.com/gongjieming-idouzi "gongjieming-idouzi (5 commits)")[![idouzi](https://avatars.githubusercontent.com/u/38717656?v=4)](https://github.com/idouzi "idouzi (1 commits)")

---

Tags

php-sdktongdui8

### Embed Badge

![Health badge](/badges/tongduiba-open-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/tongduiba-open-sdk/health.svg)](https://phpackages.com/packages/tongduiba-open-sdk)
```

###  Alternatives

[neuron-core/neuron-ai

The PHP Agentic Framework.

1.8k245.3k20](/packages/neuron-core-neuron-ai)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
