PHPackages                             rmtop/rmsf-cloud-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. rmtop/rmsf-cloud-pay

ActiveLibrary[Payment Processing](/categories/payments)

rmtop/rmsf-cloud-pay
====================

"pay mananage"

1.1.7(4y ago)115PHP

Since Jun 7Pushed 4y ago1 watchersCompare

[ Source](https://github.com/jhz-code/rmtop-cloud-pay)[ Packagist](https://packagist.org/packages/rmtop/rmsf-cloud-pay)[ RSS](/packages/rmtop-rmsf-cloud-pay/feed)WikiDiscussions main Synced today

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

rmtop-cloud-pay
===============

[](#rmtop-cloud-pay)

支付管理

云端支付sdk

### 安装

[](#安装)

```
 composer require rmtop/rmsf-cloud-pay

```

### 发布支付文件

[](#发布支付文件)

```

 php think rmtop:publish_pay

```

### 数据迁移 创建支付相关配置文件

[](#数据迁移-创建支付相关配置文件)

```
php think migrate:run

```

### 支付配置操作

[](#支付配置操作)

```
 addConfig(array $data) //创建配置

editConfig(int $id, array $data)

deleteConfig(int $id)

getConfig(int $id) //获取配置

```

#### 微信支付配置

[](#微信支付配置)

```

$data['merchantId'] = '15196xxxx';
$data['merchantSerialNumber'] = '6A6E499099E0F19FE334Cxxxxxxxx';
$data['apiV3key'] = 'xN5nxxxxxxxxx;
TopPayConfig::addConfig($data);

```

微信V3版相关支付
---------

[](#微信v3版相关支付)

##### jsApi支付

[](#jsapi支付)

```
$result =    TopWxPay::JsApi([
'configId'=>'1',
'appid'=>'wxc1ee20xxxxx',
'mchid'=>'1519xxxxx',
'description'=>'支持测试',
'out_trade_no'=>time(),
'amount'=>array('total'=>100,'currency'=>'CNY'),
'notify_url'=>'http://127.0.0.1:8000/admin/',
'payer'=>array('openid'=>'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o'),
]);

```

##### h5支付

[](#h5支付)

```
$result =    TopWxPay::H5Api([
'configId'=>'1',
'appid'=>'wxxxxxxxxxx7',
'mchid'=>'15196xxxxxx',
'description'=>'支持测试',
'out_trade_no'=>time(),
'amount'=>array('total'=>100,'currency'=>'CNY'),
'notify_url'=>'http://127.0.0.1:8000/',
'scene_info'=>array('payer_client_ip'=>'http://127.0.0.1:8000/admin/','h5_info'=>array('type'=>'wap')),
]);

```

##### app支付

[](#app支付)

```
$result =    TopWxPay::AppApi([
'configId'=>'1',
'appid'=>'wxc1eexxxxxxxx',
'mchid'=>'1519xxxxx',
'description'=>'支持测试',
'out_trade_no'=>time(),
'amount'=>array('total'=>100,'currency'=>'CNY'),
'notify_url'=>'http://127.0.0.1:8000/',
]);

```

##### Native 支付 二维码支付

[](#native-支付-二维码支付)

```
 $result =    TopWxPay::NativeApi([
'configId'=>'1',
'appid'=>'wxc1ee20xxxx',
'mchid'=>'1519xxx',
'description'=>'支持测试',
'out_trade_no'=>time(),
'amount'=>array('total'=>100,'currency'=>'CNY'),
'notify_url'=>'http://127.0.0.1:8000/',
]);

```

#### 查询订单

[](#查询订单)

```
queryByTransactions(string $transaction_id,string $mchid)

queryByOrderId(string $orderId,string $mchid)

```

\####关闭订单

```
closeOrder(string $orderId,string $mchid)

```

#### 订单退款

[](#订单退款)

```
queryRefundsOrder($out_refund_no)`

```

\####申请交易账单API

```
queryTradeBill(string $bill_date,string $bill_type = 'ALL',string $tar_type = '')

```

#### 申请资金账单API

[](#申请资金账单api)

```
function fundFloBill(string $bill_date,string $account_type ='BASIC',string $tar_type='')`

```

#### 支付回调处理

[](#支付回调处理)

如果能得到返回数据，则接受数据并验证成功，只需根据参数处理订单即可：

```
 $result =  (new PayClient())->Notify(intput());
if($result['out_trade_no']){
  //处理订单
}
exit(json(['code'=>'SUCCESS','message'=>'']));//通知微信支付网关

```

#### 退款回调处理

[](#退款回调处理)

```
$result =  (new PayClient())->Notify(intput());

$result 为退款回调通知数据

```

支付宝
---

[](#支付宝)

```
支付宝配置

$data['appId'] = '15196xxxx';
$data['merchantPrivateKey'] = '6A6E499099E0F19FE334Cxxxxxxxx';
$data['alipayPublicKey'] = 'xN5nxxxxxxxxx;
$data['notifyUrl'] = 'xN5nxxxxxxxxx;
$data['encryptKey'] = 'xN5nxxxxxxxxx;
TopPayConfig::addConfig($data);

```

```

支付宝 PC端扫码支付

$configId = 1;
$orderdes = '';
$order_sn = '';
$money = '';
$aliPay = new TopAlipay($configId);
$result =  $aliPay->appPay($orderdes,$order_sn,$money);
return $result;

支付宝 花呗支付
$aliPay = new TopAlipay(2);
$orderDes = '';
$order_sn = '';
$money = '';
$buyerId = '';
$extendParams = '';
$result =  $aliPay->huabeiPay($orderDes,$order_sn,$money,$buyerId,$extendParams);
return $result;

支付宝 扫条形码收款
$aliPay = new TopAlipay(2);
$orderDes = '';
$order_sn = '';
$money = '';
$authCode = '';
$result =  $aliPay->facePay($orderDes,$order_sn,$money,$authCode);

```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

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

Every ~12 days

Recently: every ~50 days

Total

17

Last Release

1597d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/75cda7b466041ada81703375143554be315e8d558c3d64bfd6878126de608518?d=identicon)[rmsf.top](/maintainers/rmsf.top)

---

Top Contributors

[![jhz-code](https://avatars.githubusercontent.com/u/64343721?v=4)](https://github.com/jhz-code "jhz-code (33 commits)")

### Embed Badge

![Health badge](/badges/rmtop-rmsf-cloud-pay/health.svg)

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

###  Alternatives

[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)

PHPackages © 2026

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