PHPackages                             fatryst/icbc - 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. [Payment Processing](/categories/payments)
4. /
5. fatryst/icbc

ActiveLibrary[Payment Processing](/categories/payments)

fatryst/icbc
============

工行 商户收单服务 二维码扫码支付

v1.0.1(6y ago)8283MITPHPPHP &gt;=7.0.0

Since Jul 4Pushed 6y ago1 watchersCompare

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

READMEChangelog (2)DependenciesVersions (3)Used By (0)

ICBC
====

[](#icbc)

工行 商户收单服务 二维码扫码支付

### 一、 安装

[](#一-安装)

1. 安装
    `composer require fatryst/icbc`
2. 发布配置文件`icbc.php`
    `php artisan vendor:publish --provider="Fatryst\ICBCPay\ICBCPayServiceProvider"`
    发布时 config/icbc.php 配置文件 包含：

```
return [

    // app id
    'appId' => '',

    //商户线下档案编号(特约商户12位，特约部门15位)
    'mer_id' => '',

    //e生活档案编号
    'store_code' => '',

    // APP应用私钥
    "privateKey" => "",

    // 网关公钥
    'icbcPulicKey' => "",

    // AES加密密钥，缺省为空''
    "encryptKey" => "",

    // 签名方式
    "signType" => "RSA",

    // v2
    'url' => [
        'qrcode' => [
            'generate' => 'https://gw.open.icbc.com.cn/api/qrcode/V2/generate',
            'pay' => 'https://gw.open.icbc.com.cn/api/qrcode/V2/pay',
            'query' => 'https://gw.open.icbc.com.cn/api/qrcode/V2/query',
            'reject' => 'https://gw.open.icbc.com.cn/api/qrcode/V2/reject',
            'reverse' => 'https://gw.open.icbc.com.cn/api/qrcode/V2/reverse',
            'reject_query' => 'https://gw.open.icbc.com.cn/api/qrcode/reject/query/V3',
        ]
    ]
];

```

在 Laravel 5.5 及以上版本，服务提供商将自动获得注册。 在旧版本的框架中，只需在 config/app.php 文件中添加服务提供者即可：

```
'providers' => [
    // ...
    Fatryst\ICBCPay\ICBCPayServiceProvider::class,
];

```

### 二、 使用

[](#二-使用)

1. 根据需要修改配置文件，配置文件中的配置均为必填，不能为空
2. 初始化对象(不填参数时默认使用配置文件中的参数)
    `$icbc = new ICBCPay(params..)`
3. 实现api

- 二维码生成
    `$icbc->generate(params..)`
- 二维码被扫支付
    `$icbc->pay(params..)`
- 二维码查询
    `$icbc->query(params..)`
- 二维码退款
    `$icbc->reject(params..)`
- 二维码冲正
    `$icbc->reverse(params..)`
- 二维码退款查询
    `$icbc->reject_query(params..)`

具体参数详情访问官网：
[工行|开放平台](https://open.icbc.com.cn/icbc/apip/api_list.html?productId=P0039 "工行|开放平台")

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity55

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 ~4 days

Total

2

Last Release

2503d ago

### Community

Maintainers

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

---

Top Contributors

[![fatryst](https://avatars.githubusercontent.com/u/17757014?v=4)](https://github.com/fatryst "fatryst (9 commits)")

---

Tags

qrcodepayicbc

### Embed Badge

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

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

PHPackages © 2026

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