PHPackages                             troynew/cnvex - 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. troynew/cnvex

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

troynew/cnvex
=============

Cnvex is a PHP library for e.cnvex.cn

1.12.6(6y ago)0237MITPHPPHP ^5.5.9 || ^7.0

Since Oct 25Pushed 6y ago1 watchersCompare

[ Source](https://github.com/tcyfree/cnvex)[ Packagist](https://packagist.org/packages/troynew/cnvex)[ RSS](/packages/troynew-cnvex/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (2)Dependencies (4)Versions (40)Used By (0)

The [e.cnvex.cn](http://bxapi.cnvex.cn/apiService/intoSchemeService.html) API PHP SDK
=====================================================================================

[](#the-ecnvexcn-api-php-sdk)

简介
--

[](#简介)

[企账通2.0](http://www.cnvex.cn/ProductQzt.html) 是重庆汽摩交易所其他企业级交易计算工具，本项目是PHP版本接口实现，官方接口文档参考[这里](http://bxapi.cnvex.cn/apiService/intoSchemeService.html)。目前支持以下功能：

- 微信、支付宝原生APP支付，二维码支付
- 账户余额支付（转账）
- 账户注册、绑定银行卡
- 查询交易记录

另外，项目支持Laravel Framework快速集成，所有接口都已做单元测试，具体参考`tests`目录文件。

扩展包依赖

- PHP 5.6+ || PHP 7.0+
- guzzlehttp/guzzle
- phpunit/phpunit
- illuminate/log

安装 Cnvex.cn PHP SDK
-------------------

[](#安装-cnvexcn-php-sdk)

### 使用[composer](https://getcomposer.org/)

[](#使用composer)

> composer 是php的包管理工具， 通过composer.json里的配置管理依赖的包，同时可以在使用类时自动加载对应的包, 在你的composer.json中添加如下依赖

执行

```
composer require bravist/cnvex

```

使用 Composer 的 autoload 引入

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

### 手动引入

[](#手动引入)

```
require_once('/path/to/cnvex/api.php');
```

For Laravel
-----------

[](#for-laravel)

Add the following line to the section `providers` of `config/app.php`:

```
'providers' => [
    //...
    Bravist\Cnvex\ServiceProvider::class,
],
```

publish the configuration:

```
php artisan vendor:publish --provider="Bravist\Cnvex\ServiceProvider"

```

as optional, you can use facade:

```
'aliases' => [
    'Cnvex' => Bravist\Cnvex\Facade\Cnvex::class,
    'CnvexSigner' => Bravist\Cnvex\Facade\Signature::class
],
```

support package auto discover on laravel 5.5.

Usage
-----

[](#usage)

```
# 数据签名
CnvexSigner::sign(['tody' => 'hello']);

# 数据验签
CnvexSigner::verify(['today' => 'hello'], 'hello'); // false

CnvexSigner::verify(['tody' => 'hello'], 'c8ef86e1cab2e2daeabdc9c516120463'); // true

# 查询企账通用户信息，更多接口参考下面开放接口部分
Cnvex::queryUser('17090516435200300009');
```

For Lumen
---------

[](#for-lumen)

Add the following line to `bootstrap/app.php` after `// $app->withEloquent();`

```
...
// $app->withEloquent();
$app->register(Bravist\Cnvex\ServiceProvider::class);
...
```

开放接口
----

[](#开放接口)

- 查询用户信息 [queryUser](https://github.com/bravist/cnvex/blob/master/src/Api.php#L15)
- 查询用户余额 [queryUserBalance](https://github.com/bravist/cnvex/blob/master/src/Api.php#L51)
- 发送短信验证码 [sendCaptcha](https://github.com/bravist/cnvex/blob/master/src/Api.php#L69)
- 注册个人类型用户[registerUser](https://github.com/bravist/cnvex/blob/master/src/Api.php#L93)
- 查询单笔转账交易 [queryTransfer](https://github.com/bravist/cnvex/blob/master/src/Api.php#L118)
- 统一收单交易创建接口 [createTransaction](https://github.com/bravist/cnvex/blob/master/src/Api.php#L156)
- 微信扫码支付 [payWechatQrCode](https://github.com/bravist/cnvex/blob/master/src/Api.php#L180)
- 查询多笔转账交易记录 [queryTransfers](https://github.com/bravist/cnvex/blob/master/src/Api.php#L207)
- 查询用户绑卡记录 [queryBankCards](https://github.com/bravist/cnvex/blob/master/src/Api.php#L237)
- 绑定对私银行卡 [bindPrivateBankCard](https://github.com/bravist/cnvex/blob/master/src/Api.php#L261)
- 绑定对公/对公&amp;&amp;对私银行卡 [bindPublicBankCard](https://github.com/bravist/cnvex/blob/master/src/Api.php##L289)
- 解绑银行卡 [unbindBankCard](https://github.com/bravist/cnvex/blob/master/src/Api.php#L327)

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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

Recently: every ~23 days

Total

38

Last Release

2527d ago

### Community

Maintainers

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

---

Top Contributors

[![BadTudou](https://avatars.githubusercontent.com/u/62945829?v=4)](https://github.com/BadTudou "BadTudou (14 commits)")[![lolfans](https://avatars.githubusercontent.com/u/19467359?v=4)](https://github.com/lolfans "lolfans (10 commits)")[![huiyonghkw](https://avatars.githubusercontent.com/u/1323776?v=4)](https://github.com/huiyonghkw "huiyonghkw (8 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/troynew-cnvex/health.svg)

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

###  Alternatives

[flarum/core

Delightfully simple forum software.

211.3M1.9k](/packages/flarum-core)[nativephp/mobile

NativePHP for Mobile

82724.0k43](/packages/nativephp-mobile)[ashallendesign/favicon-fetcher

A Laravel package for fetching website's favicons.

190272.4k3](/packages/ashallendesign-favicon-fetcher)[bensampo/laravel-embed

Painless responsive embeds for videos, slideshows and more.

142146.8k](/packages/bensampo-laravel-embed)[glhd/conveyor-belt

14797.0k](/packages/glhd-conveyor-belt)[aedart/athenaeum

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

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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