PHPackages                             zithan/bear-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. zithan/bear-sdk

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

zithan/bear-sdk
===============

A bear logistics SDK.

04PHP

Since Sep 22Pushed 7y ago1 watchersCompare

[ Source](https://github.com/zithan/bear-sdk)[ Packagist](https://packagist.org/packages/zithan/bear-sdk)[ RSS](/packages/zithan-bear-sdk/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

### example

[](#example)

```
require __DIR__ .'/vendor/autoload.php';

use Xjw\BearSdk\Bear;

$config = [
    'base_uri' => 'http://api-open.logistics.me/',
    'timeout' => 5.0,
    'bear_params' => [
        'notify_url' => 'http://www.030.cn',
        'grant_type' => 'authorization_code',
        'access_key_id' => '9plwBwovLuaCgwkLA1',
        'access_key_secret' => 'cyNZX6HAtIHI8KOBZcHYRb1TeyBITveM',
        'aes_key' => "ByxFuZqI2u+Zr2rKCF6WTbmRiZWCeiwW",
        'aes_iv' => substr('ByxFuZqI2u+Zr2rKCF6WTbmRiZWCeiwW', 9, 16),
        'maker_unique_id' => '5b117fa5ec177',
    ]
];

$bear = new Bear($config);

echo '**************** 获取token ****************' . PHP_EOL;

try {
    $tokenDt = $bear->getToken();
    print_r($tokenDt);
} catch (\Xjw\BearSdk\Exceptions\Exception $e) {
    echo $e->getMessage();
}

echo "\n";
echo '**************** 推送商品 ****************' . PHP_EOL;

try {
    $authData = [
        'openid' => $tokenDt['openid'],
        'token' => $tokenDt['token'],
    ];
    $pushData = [
        'orders_sn' => 'sn' . date('YmdHis') . mt_rand(1,1000),
        'logistics_title' => '德邦物流',
        'linkman' => '黄百万',
        'mobile' => '18502099886',
        'address' => '广州天河中心广场88号',
        'deliver_expired_at' => strtotime('+3 day'),
        'goods_list' => [
            [
                "title" => "测试商品标题A-001",
                "length" => 1000,
                "width" => 2000,
                "height" => 3000,
                "weight" => 4000,
                "remark" => "测试商品备注信息",
                "total" => 12,
            ]
        ],
    ];
    $rsOfPush = $bear->push($authData, $pushData);

    echo json_encode($rsOfPush, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT);
} catch (\Xjw\BearSdk\Exceptions\Exception $e) {
    echo $e->getMessage();
}

echo "\n";

exit;
```

###  Health Score

19

—

LowBetter than 9% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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.

### Community

Maintainers

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

---

Top Contributors

[![zithan](https://avatars.githubusercontent.com/u/1336063?v=4)](https://github.com/zithan "zithan (3 commits)")

### Embed Badge

![Health badge](/badges/zithan-bear-sdk/health.svg)

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

###  Alternatives

[madebybob/php-number

Deal with numbers the right way

978.9k1](/packages/madebybob-php-number)

PHPackages © 2026

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