PHPackages                             chengang/joy-interaction - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. chengang/joy-interaction

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

chengang/joy-interaction
========================

这个扩展提供了乐换机各个系统内部调用方法的接口封装。

v1.0.7(7y ago)2322BSD-4-ClausePHP

Since Mar 29Pushed 7y ago1 watchersCompare

[ Source](https://github.com/chengang99/joy-interaction)[ Packagist](https://packagist.org/packages/chengang/joy-interaction)[ RSS](/packages/chengang-joy-interaction/feed)WikiDiscussions master Synced 3d ago

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

chengang/joy-interaction
========================

[](#chengangjoy-interaction)

这个扩展提供了乐换机各个系统内部调用方法的接口封装。

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist chengang/joy-interaction "*"

```

or add

```
"chengang/joy-interaction": "*"

```

to the require section of your `composer.json` file.

Usage
-----

[](#usage)

请求系统使用方式：

一.组件方式

1.在配置文件中 components 加入配置项。如下：

```
'components'=>{
 'joyInteraction' => [ //组件名称
            'class' => \chengang\joyInteraction\HttpPush::class,
            'signMethod' => '', //签名实现方法 需要实现chengang\joyInteraction\AuthMethod接口，返回签名字符串
            'httpHeader' => '', //头部参数 需要继承chengang\joyInteraction\HttpHeader类 无特殊需要无需设置
            'source' => '1213', //需要配置目标系统分配的来源标识
        ]
}

```

2.在需要使用时，直接引用

```
$res = Yii::$app->joyInteraction->push($method, $url, $data = [], $header = []);
$res: 为请求结果
$method 请求方式，请引用HttpPush提供的请求方式枚举
$url 请求目标地址
$data 请求数据 可空
$header 请求头部需要传入的字段 可空

```

目标系统使用方式

一、基类控制器需要继承\\chengang\\joyInteraction\\BaseController 控制器

1.签名验证方法 需要重新，必须实现chengang\\joyInteraction\\AuthMethod接口，返回签名字符串

$signMethod = '\\chengang\\joyInteraction\\SignMethod'; //签名实现方法 可重写

2.头部参数 需要继承chengang\\joyInteraction\\HttpHeader类 无特殊需要无需设置

$httpHeader = '\\chengang\\joyInteraction\\HttpHeaderModel'; //请求头部对象 可重写

3.需要在params配置文件设置httpValidate参数，参数内容为数组，允许请求系统通过的source

```
    'httpValidate' => [
        'sources' => ['source1','source2'],
        'ips' => ['ip1','ip2'], //允许通过ip
        'outtime' => 3, //超时设置
    ],

```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity65

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

Total

8

Last Release

2570d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ffd92b2dd65e47a0b8b45acc64fa1623845201f68cbf01c098a1324e1fe728df?d=identicon)[chengang99](/maintainers/chengang99)

---

Top Contributors

[![freegang](https://avatars.githubusercontent.com/u/21105268?v=4)](https://github.com/freegang "freegang (13 commits)")

---

Tags

yii2extensioninteractionjoyexchange

### Embed Badge

![Health badge](/badges/chengang-joy-interaction/health.svg)

```
[![Health](https://phpackages.com/badges/chengang-joy-interaction/health.svg)](https://phpackages.com/packages/chengang-joy-interaction)
```

###  Alternatives

[abei2017/yii2-wx

一个专注于yii2的微信sdk

1482.8k](/packages/abei2017-yii2-wx)[dmstr/yii2-cookie-consent

Yii2 Cookie Consent Widget

1452.6k](/packages/dmstr-yii2-cookie-consent)[imanilchaudhari/yii2-currency-converter

This extension will help to find out current currency conversion rate.

2011.6k](/packages/imanilchaudhari-yii2-currency-converter)[richardfan1126/yii2-js-register

Yii2 widget to register JS into view

1357.2k7](/packages/richardfan1126-yii2-js-register)[degordian/yii2-webhooks

Yii2 extension for webhooks

117.1k](/packages/degordian-yii2-webhooks)

PHPackages © 2026

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