PHPackages                             ansuns/pay - 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. ansuns/pay

ActiveLibrary[Payment Processing](/categories/payments)

ansuns/pay
==========

支付包

1.0.1(5y ago)10154MITPHPPHP ^7.2

Since Mar 16Pushed 2y ago2 watchersCompare

[ Source](https://github.com/ansuns/pay)[ Packagist](https://packagist.org/packages/ansuns/pay)[ Docs](https://github.com/ansuns/pay)[ RSS](/packages/ansuns-pay/feed)WikiDiscussions master Synced 1mo ago

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

三方支付
====

[](#三方支付)

整合微信服务商、支付包服务商、随行付、上海电银等三方服务商支付通道。

主要是以服务商模式进件，实现多种方式支付（二维码，条码，刷脸，小程序，公众号，H5支付）。

快速入门
----

[](#快速入门)

首先说明，该SDK主要是为在中国大陆开展支付业务提供服务的，请确保你开展业务是否满足不同第三方支付服务商的合作条件，确保你以及商户的资金安全。

同时请确保你的商户进件时，提供的资料是合法的，正确的。

其他请结合个人或公司的自身条件决定是否使用该SDK

当你决定使用时，那么请借着往下看吧

### 先决条件

[](#先决条件)

PHP &gt; 5.6

Composer

```
[ansuns@centos-devfull ~]# php -v
PHP 7.1.33 (cli) (built: Mar 28 2022 17:37:07) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies

[ansuns@centos-devfull root]$ composer -V
Composer version 1.10.26 2022-04-13 16:39:56

```

### Installing

[](#installing)

当你的软件环境符合要求后，那么可以安装了

```
composer require ansuns/pay

```

使用例子

```
use Ansuns\Pay\Pay;

$payConfig = [
    'org_id' => '', // 机构号
    'public_key' => '',  // 代理商公钥
    'private_key' => '',  // 代理商私钥
    'merc_id' => '',  // 商户号
];

$pay = new Pay(['chinaebi' => $payConfig]);

$opition['trancde'] = 'P05';
$opition['title'] = '测试支付';
$opition['notify_url'] = "https://www.xxx.com/pay_notify_url";  // 回调地址
$opition['pay_amount'] = 100;
$opition['mer_order_no'] = time();
$pay = new Pay(['chinaebi' => $payConfig]);
$res = $pay->driver('chinaebi')->gateway('pos')->apply($opition);
```

贡献
--

[](#贡献)

请阅读[contribution.md](https://gist.github.com/ansuns/b24679402957c63ec426)有关我们的行为准则以及向我们提交拉取请求的流程的详细信息。

Authors
-------

[](#authors)

- **Ansuns** - *a unknow developer* - [HomePage](https://github.com/ansuns)

另请参见 \[贡献者\] 列表 () 谁参与了这个项目。

License
-------

[](#license)

此项目是根据MIT许可证授权的-有关详细信息，请参阅\[License.md\]（License.md）文件

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity50

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

Total

3

Last Release

66d ago

Major Versions

1.0.1 → v2.x-dev2026-03-13

PHP version history (2 changes)1.0.0PHP ^7.2

v2.x-devPHP &gt;=7.4

### Community

Maintainers

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

---

Top Contributors

[![ansuns](https://avatars.githubusercontent.com/u/10016560?v=4)](https://github.com/ansuns "ansuns (181 commits)")

### Embed Badge

![Health badge](/badges/ansuns-pay/health.svg)

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

###  Alternatives

[chargebee/chargebee-php

ChargeBee API client implementation for PHP

768.0M9](/packages/chargebee-chargebee-php)[imdhemy/google-play-billing

Google Play Billing

491.3M5](/packages/imdhemy-google-play-billing)[bitpay/sdk

Complete version of the PHP library for the new cryptographically secure BitPay API

42337.5k4](/packages/bitpay-sdk)[buckaroo/sdk

Buckaroo payment SDK

12189.1k9](/packages/buckaroo-sdk)[contica/facturador-electronico-cr

Un facturador de código libre para integrar facturación electrónica en Costa Rica a un proyecto PHP

2128.8k](/packages/contica-facturador-electronico-cr)[karson/mpesa-php-sdk

172.2k](/packages/karson-mpesa-php-sdk)

PHPackages © 2026

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