PHPackages                             aichenk/icbc-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. aichenk/icbc-sdk

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

aichenk/icbc-sdk
================

ICBC 工商银行二类户金融服务接口sdk

1.3.1(6y ago)111MITPHPPHP &gt;=5.6

Since Aug 8Pushed 6y ago1 watchersCompare

[ Source](https://github.com/aiChenK/icbc-sdk)[ Packagist](https://packagist.org/packages/aichenk/icbc-sdk)[ RSS](/packages/aichenk-icbc-sdk/feed)WikiDiscussions master Synced 4d ago

READMEChangelogDependencies (1)Versions (10)Used By (0)

icbc-sdk
========

[](#icbc-sdk)

> 工商银行二类户金融服务接口SDK 实现快速调用，传入私钥即可对请求进行签名

运行环境
----

[](#运行环境)

- PHP 5.6+
- openssl extension
- aichenk/http-client ^1.0

安装方法
----

[](#安装方法)

1. 根目录运行

    ```
     composer require aichenk/icbc-sdk

    ```
2. 在`composer.json`中声明

    ```
     "require": {
         "aichenk/icbc-sdk": "^1.0"
     }

    ```

使用
--

[](#使用)

```
//参数声明
$appId  = '';
$corpNo = '';
$apiUrl = '';
$priKey = "./pri.pem"; //文件地址或字符串内容
$pubKey = "./pub.cer"; //支持字符串/cer/pem，可不传入，不传入则不对内容验签

//初始化
$apiClient = new \Icbc\ApiClient($apiUrl, $appId, $priKey, $pubKey);
$apiClient->setCorpNo($corpNo);

$apiClient->addParams('busisno', '1')
    //->addParams('corp_no', $corpNo)
    ->addParams('cert_type', '0')
    ->addParams('cert_no', 'xxx');

//接口调用
$response = $apiClient->execute('com.icbc.xxxxx');
//文件上传
$response = $apiClient->upload('./touxiang.png');

//获取结果
if (!$response->isSuccess()) {
    throw new \Exception($response->getError());
}
//var_dump($response->getRspData());
var_dump($response->getData());
```

更新日志
----

[](#更新日志)

2019-10-17 - v1.3.0

- http-client库升级到2.0

2019-08-26 - v1.2.3

- 修复当response为空时验签失败bug
- 增加getAppId方法（即"一级机构商户号"）

2019-08-15 - v1.2.2

- 增加setCorpNo|getCorpNo方法
- 初始化corpNo后不在需要每个请求单独增加corp\_no参数

2019-08-14 - v1.2.1

- 修复请求错误时验签的bug
- 请求结束后清空params，可复用ApiClient调用下一请求

2019-08-13 - v1.2.0

- pubKey可选，如传入则针对返回内容验签
- pubKey支持字符串，pem/cer格式文件路径，自动解析
- 增加Exception类
- php版本要求增加到5.6

2019-08-09 - v1.1.1

- 更新说明内容

2019-08-08 - v1.1.0

- 更改目录结构
- 增加Key类，支持密钥文件解析（pem,cer）

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

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.

###  Release Activity

Cadence

Every ~12 days

Recently: every ~23 days

Total

9

Last Release

2374d ago

PHP version history (2 changes)1.0.0PHP &gt;=5.5

1.2.0PHP &gt;=5.6

### Community

Maintainers

![](https://www.gravatar.com/avatar/c7b581cba80f4aa30ab4a73b3edeecbcdbcc2c4e0c8af6d015e0571d9e2246fd?d=identicon)[aiChenK](/maintainers/aiChenK)

---

Top Contributors

[![aiChenK](https://avatars.githubusercontent.com/u/15376814?v=4)](https://github.com/aiChenK "aiChenK (11 commits)")

---

Tags

icbc

### Embed Badge

![Health badge](/badges/aichenk-icbc-sdk/health.svg)

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

###  Alternatives

[illuminate/conditionable

The Illuminate Conditionable package.

9043.1M32](/packages/illuminate-conditionable)[leedavis81/vent

PHP variable events.

814.6k](/packages/leedavis81-vent)[codingfreaks/cf-cookiemanager

Manage cookies, scripts, and GDPR compliance on your Typo3 website with CodingFreaks Typo3 Cookie Manager. Customize cookie banners, streamline workflow, and enhance user experience. Ensure GDPR compliance and take control of cookie management with our Typo3 cookie management extension. Visit the official Typo3 Documentation page to learn more.

1625.8k](/packages/codingfreaks-cf-cookiemanager)

PHPackages © 2026

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