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

ActiveLibrary

bravist/cnvex
=============

Cnvex is a PHP library for e.cnvex.cn

1.12.1(7y ago)24943MITPHPPHP ^5.5.9 || ^7.0

Since Oct 25Pushed 7y ago1 watchersCompare

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

READMEChangelogDependencies (4)Versions (35)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

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 56% 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 ~9 days

Total

33

Last Release

2816d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/195282e1beeb9475b56cbf1b7fcb9c28f9e3232834181d3e95b3f150e3be4b5a?d=identicon)[bravist](/maintainers/bravist)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[spatie/laravel-sitemap

Create and generate sitemaps with ease

2.6k14.6M107](/packages/spatie-laravel-sitemap)[laravel/cashier-paddle

Cashier Paddle provides an expressive, fluent interface to Paddle's subscription billing services.

264778.4k3](/packages/laravel-cashier-paddle)[larabug/larabug

Laravel 6.x/7.x/8.x/9.x/10.x/11.x/12.x/13.x bug notifier

299549.3k1](/packages/larabug-larabug)[vluzrmos/slack-api

Wrapper for Slack.com WEB API.

102589.1k3](/packages/vluzrmos-slack-api)[smodav/mpesa

M-Pesa API implementation

16363.7k1](/packages/smodav-mpesa)[flarum/core

Delightfully simple forum software.

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

PHPackages © 2026

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