PHPackages                             xy113/chinapay - 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. xy113/chinapay

ActiveLibrary[Payment Processing](/categories/payments)

xy113/chinapay
==============

chinapay kit

1.4.0(6y ago)1541[1 PRs](https://github.com/xy113/chinapay/pulls)MITPHPPHP &gt;=7.0

Since Apr 24Pushed 3y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (4)Used By (0)

\##使用方法

```
        $merId = "531112004160001";
        $orderNo = "20201122593490438098";
        $propFile = __DIR__ . '/security.ini';
        $tranTime = date('His');
        $cardTranData = [
            'CertType' => '01',
            'CertNo' => '211221199608090813',
            'AccType' => '01',
            'AccName' => '张三',
            'CardNo' => '62122624020######',
            'MobileNo'=>'187########'
        ];
        $merBgUrl = url('notify');

        //签约短信
        try {
            $builder = new SmsContentBuilder();
            $builder->setSecurityPropFile($propFile);
            $builder->setMerId($merId);
            $builder->setMerOrderNo($orderNo);
            $builder->setTranDate(date('Ymd'));
            $builder->setTranTime($tranTime);
            $builder->setCardTranData($cardTranData);

            $content = $builder->getBizContent();
            dump($content);

            $res = Factory::signSms()->sendRequest($builder->getBizContent());
            parse_str($res, $arr);
            dump($arr);
        }catch (ChinaPayException $exception){
            dump($exception->getMessage());
        }

        //后台签约
        try {
            $builder = new SignContentBuilder();
            $builder->setSecurityPropFile($propFile);
            $builder->setMerId($merId);
            $builder->setMerOrderNo($orderNo);
            $builder->setMerBgUrl($merBgUrl);
            $builder->setTranDate(date('Ymd'));
            $builder->setTranTime($tranTime);
            $builder->setTranType('9004');
            $builder->setCardTranData($cardTranData);

            $content = $builder->getBizContent();
            dump($content);

            $res = Factory::signing()->testBgSigning()->sendRequest($content);
            parse_str($res, $arr);
            dump($arr);
        } catch (ChinaPayException $exception) {
            return urldecode($exception->getMessage());
        }

```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity53

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

Total

2

Last Release

2195d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/13481027?v=4)[贵州大师兄](/maintainers/xy113)[@xy113](https://github.com/xy113)

---

Top Contributors

[![xy113](https://avatars.githubusercontent.com/u/13481027?v=4)](https://github.com/xy113 "xy113 (12 commits)")

---

Tags

chinapay

### Embed Badge

![Health badge](/badges/xy113-chinapay/health.svg)

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

###  Alternatives

[omnipay/paypal

PayPal gateway for Omnipay payment processing library

3156.8M53](/packages/omnipay-paypal)[eduardokum/laravel-boleto

Biblioteca com boletos para o laravel

626351.9k2](/packages/eduardokum-laravel-boleto)[tbbc/money-bundle

This is a Symfony bundle that integrates moneyphp/money library (Fowler pattern): https://github.com/moneyphp/money.

1961.9M](/packages/tbbc-money-bundle)[2checkout/2checkout-php

2Checkout PHP Library

83740.3k2](/packages/2checkout-2checkout-php)[smhg/sepa-qr-data

Generate QR code data for SEPA payments

61717.2k5](/packages/smhg-sepa-qr-data)[omnipay/braintree

Braintree gateway for Omnipay payment processing library

35558.0k3](/packages/omnipay-braintree)

PHPackages © 2026

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