PHPackages                             busyphp/trade - 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. busyphp/trade

ActiveLibrary[Payment Processing](/categories/payments)

busyphp/trade
=============

用于BusyPHP支付、退款、转账等操作，使用三方支付必须安装的基本模块

v2.0.3(4y ago)1402CC-BY-NC-4.0PHPPHP &gt;=7.1.0

Since Oct 12Pushed 4y ago1 watchersCompare

[ Source](https://github.com/busyphp/trade)[ Packagist](https://packagist.org/packages/busyphp/trade)[ Docs](http://www.harter.cn/?form=BusyPHP&plugin=busyphp/trade)[ RSS](/packages/busyphp-trade/feed)WikiDiscussions master Synced 5d ago

READMEChangelog (6)Dependencies (3)Versions (7)Used By (2)

交易中心模块
======

[](#交易中心模块)

说明
--

[](#说明)

用于BusyPHP支付、退款、转账等操作，使用三方支付必须安装的基本模块

安装
--

[](#安装)

```
composer require busyphp/trade

```

配置
--

[](#配置)

> 通过composer安装成功后，登录后台，前往开发模式下的插件管理进行安装/卸载/设置

启动退款任务
------

[](#启动退款任务)

配置 `config/trade.php` 中的 `refund_queue.enable` 为 `true`

> 如果安装了`busyphp/swoole` 请使用swoole命令启动任务，参考

`cd` 到项目根目录下执行

> 以下两种命令二选一执行，具体参考

```
php think queue:listen plugin_trade --queue plugin_trade_refund --delay 3600 --sleep 60

php think queue:work plugin_trade --queue plugin_trade_refund --delay 3600 --sleep 60
```

启动交易订单失效任务
----------

[](#启动交易订单失效任务)

配置 `config/trade.php` 中的 `pay_queue.enable` 为 `true`

> 如果安装了`busyphp/swoole` 请使用swoole命令启动任务，参考

`cd` 到项目根目录下执行

> 以下两种命令二选一执行，具体参考

```
php think queue:listen plugin_trade --queue plugin_trade_pay --delay 60 --sleep 60

php think queue:work plugin_trade --queue plugin_trade_pay --delay 60 --sleep 60
```

配置 `config/trade.php`
---------------------

[](#配置-configtradephp)

```
