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

ActiveLibrary

draguo/beecloud-pay
===================

pay wechat alipay unionpay

1.0.0(7y ago)02MITPHP

Since Oct 15Pushed 6y ago1 watchersCompare

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

READMEChangelogDependencies (3)Versions (2)Used By (0)

支付 sdk
======

[](#支付-sdk)

依赖 beecloud 实现支付功能

### 配置

[](#配置)

```
$config = [
    'beecloud' => [
        'id' => '',
        'secret' => '',
        'master_secret' => '',
        'test_secret' => ''
    ],
    'unionpay' => [
        'mch_id' => '', // 商户号
        'return_url' => '', // 前台支付完成返回地址，可单独覆盖
        'notify_url' => '', // 后台回调, 可单独覆盖
        'cert_path' => '', // 签名证书位置，服务器绝对路径
        'cert_pwd' => '000000', // 签名密码
    ]
]
```

### 支付

[](#支付)

```
$order = [
    'trade_no' => '20180627181607', // 订单号
    'total_fee' => '2000', // 订单金额,单位分
    'bill_timeout' => 15, // 订单有效时间，单位：分钟
    'txn_time' => '20180628170154', // 下单时间，银联在后续查询的时候需要，格式 YYYYMMDDhhmmss，北京时间
    'return_url' => 'https://', // 支付完成跳转地址
];

// 微信二维码
Pay::wechat($config)->scan($order);
// 微信小程序
Pay::wechat($config)->miniapp($order);
// 支付宝收银台 pc
Pay::alipay($config)->web($order);
// 银联 B2B pc
Pay::b2b($config)->web($order);
```

### 查询

[](#查询)

```
// $trade_no 系统订单号，$txn_time 银联必填，下单时间，格式 YYYYMMDDhhmmss，北京时间
// 微信
$order = Pay::wechat($config)->find($trade_no);
// 支付宝
$order = Pay::alipay($config)->find($trade_no);
// b2b
$order = Pay::alipay($config)->find($trade_no, $txn_time);
```

### 退款

[](#退款)

```
$pay_channel = 'WX_NATIVE'; // 渠道名，可选项参看下表

$order = [
    'trade_no' => '20180627181607', // 商家自定义的交易单号
    'refund_fee' => '2000', // 退款金额
    'refund_no' => '201806271816051', // 退款单号
];
// 银联额外参数
[
    'txn_time' => '20180628170154', // 下单时间 , 银联需要
    'transaction_id' => '', // 银联渠道必填, 由银联返回
]
$result = Pay::alipay($config)->refund($order);
$result = Pay::wechat($config)->refund($order);
$result = Pay::b2b($config)->refund($order);
```

### 验证签名

[](#验证签名)

```
// wechat && alipay
Pay::beecloud($config)->verify();
// B2B todo
Pay::b2b($config)->verify();
```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity61

Established project with proven stability

 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

Unknown

Total

1

Last Release

2763d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/72f9a53e815a82dcedc10a1e865bc34defeed186b7a0b931d67885d6b6b251b5?d=identicon)[draguo](/maintainers/draguo)

---

Top Contributors

[![draguo](https://avatars.githubusercontent.com/u/12272760?v=4)](https://github.com/draguo "draguo (10 commits)")

---

Tags

alipayb2b-payunionpaywechat-pay

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[symfony/security-bundle

Provides a tight integration of the Security component into the Symfony full-stack framework

2.5k172.9M1.8k](/packages/symfony-security-bundle)[statamic/cms

The Statamic CMS Core Package

4.8k3.2M718](/packages/statamic-cms)[laravel/reverb

Laravel Reverb provides a real-time WebSocket communication backend for Laravel applications.

1.5k9.4M48](/packages/laravel-reverb)[elgg/elgg

Elgg is an award-winning social networking engine, delivering the building blocks that enable businesses, schools, universities and associations to create their own fully-featured social networks and applications.

1.7k15.7k3](/packages/elgg-elgg)[api-platform/http-cache

API Platform HttpCache component

223.2M7](/packages/api-platform-http-cache)[bitrix24/b24phpsdk

An official PHP library for the Bitrix24 REST API

9230.2k4](/packages/bitrix24-b24phpsdk)

PHPackages © 2026

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