PHPackages                             zodream/thirdparty - 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. [API Development](/categories/api)
4. /
5. zodream/thirdparty

ActiveLibrary[API Development](/categories/api)

zodream/thirdparty
==================

pay or oauth or sms api client

5.3(2y ago)01571MITPHPPHP &gt;=8.2

Since Jan 4Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/zodream/thirdparty)[ Packagist](https://packagist.org/packages/zodream/thirdparty)[ Docs](https://github.com/zodream/thirdparty)[ RSS](/packages/zodream-thirdparty/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (10)Dependencies (4)Versions (13)Used By (1)

thirdparty
==========

[](#thirdparty)

第三方api 开发

第三方接口目录
=======

[](#第三方接口目录)

- [第三方登录](#oauth)
    - [QQ](#oauth-qq)
    - [微信](#oauth-wechat)
    - [微博](#oauth-weibo)
- [第三方支付](#pay)
    - [微信支付](#pay-wechat)
    - [支付宝支付](#pay-alipay)
- [第三方短信](#sms)
    - [阿里大于](#sms-alidayu)
    - [i互亿](#sms-ihuyi)
- [微信公众号](WeChat.md)
- [其他](#other)
    - [搜索](#other-search)

特别说明
----

[](#特别说明)

```
所有错误都通过 throw new Exception();
请注意使用 try 捕获

```

第三方登录
-----

[](#第三方登录)

### QQ

[](#qq)

配置

```
'qq' => [
    'client_id' => '',
    'redirect_uri' => '',
    'client_secret' => ''
],
```

跳转网址

```
$uri = QQ::login();
```

回调

```
$oauth->callback();
$oauth->info();
```

### 微信

[](#微信)

配置

```
'wechat' => [
    'appid' => '',
    'redirect_uri' =>  ,
    'secret' => ''
],
```

跳转网址

```
$uri = QQ::login();
```

回调

```
$oauth->callback();
$oauth->info();
```

### 微博

[](#微博)

配置

```
'weibo' => [
    'client_id' => ' ',
    'redirect_uri' => '',
    'client_secret' => ''
],
```

跳转网址

```
$uri = QQ::login();
```

回调

```
$oauth->callback();
$oauth->info();
```

支付
--

[](#支付)

### 微信APP支付

[](#微信app支付)

配置

```
'wechat' => array(
    'appid' => '应用ID',
    'mch_id' => '商户号',
    'device_info' => 'web',
    'notify_url' => '异步回调网址',
    'trade_type' => 'APP',
    'key' => '密钥'
)
```

下订单

```
$pay = new WeChat();
$order = $pay->order([
    'body' => '应用名-商品名',
    'out_trade_no' => 订单号,
    'total_fee' => 1分钱,
    'spbill_create_ip' => IP,
    'time_start' => date('Ymdis')
]);
```

调起支付的参数

```
$pay->pay([
    'timestamp' =>  $model->created_at
])
```

异步回调

```
$pay = new WeChat();
$data = $pay->callback();
if (empty($data)) {
    die($pay->appCallbackReturn([
        'return_code' => 'FAIL',
        'return_msg' => $pay->getError()
    ]));
}
die($pay->notifySuccess()); //成功时输出
```

### 支付宝APP支付

[](#支付宝app支付)

### 特别注意：支付宝签名需要包含 sign\_type, 验签时不能包含 sign\_type

[](#特别注意支付宝签名需要包含-sign_type-验签时不能包含-sign_type)

配置

```
'alipay' => array(
    'key' => '',
    'privateKeyFile' => '/alipay/rsa_private_key.pem',
    //'publicKeyFile' => '/alipay/alipay_rsa_public_key.pem',
    'publicKey' => '',
    'notify_url' => '',
    'partner' => '商户号',
    'seller_id' => 收款账号
)
```

调起支付的参数

```
$pay = new AliPay();
$pay->mobilePayOrder([
    'timestamp' => date('Y-m-d H:i:s'),
    'subject' => 标题,
    'out_trade_no' => 订单号,
    'total_fee' => 0.01 元,
    'body' => 介绍
]);
```

异步回调

```
$pay = new AliPay();
$data = $pay->callback();
die('success'); //成功时输出
```

第三方短信
-----

[](#第三方短信)

### 阿里大于

[](#阿里大于)

配置

```
'sms' => array(
    'app_key' => '',
    'secret' => '',
)
```

发送短信

```
$sms = new ALiDaYu();
$sms->send('手机号', '模板id', [模板参数], '签名');
```

### i互亿

[](#i互亿)

配置

```
'sms' => array(
    'account' => '账号',
    'password' => '密码',
    'template' => '{code}',   // 设置验证码模板
)
```

发送验证码

```
IHuYi::sendCode('13412341234', '123456'): bool|ErrorException;
```

发送短信

```
IHuYi::send('13412341234', '');
```

查询余额

```
IHuYi::balance();
```

其他
--

[](#其他)

### 搜索

[](#搜索)

百度链接提交

```
Search::putBaiDu(['site' => '', 'token' => '']);
```

###  Health Score

45

—

FairBetter than 91% of packages

Maintenance60

Regular maintenance activity

Popularity11

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity83

Battle-tested with a long release history

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

Recently: every ~364 days

Total

11

Last Release

827d ago

Major Versions

v1.1 → v2.02018-01-24

2.4 → 4.02020-10-02

4.0 → 5.02021-01-04

PHP version history (4 changes)v1.0PHP &gt;=5.6.0

4.0PHP &gt;=7.0.0

5.0PHP &gt;=8.0

5.3PHP &gt;=8.2

### Community

Maintainers

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

---

Top Contributors

[![zx648383079](https://avatars.githubusercontent.com/u/9996852?v=4)](https://github.com/zx648383079 "zx648383079 (103 commits)")

---

Tags

zodreamthirdparty api

### Embed Badge

![Health badge](/badges/zodream-thirdparty/health.svg)

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

###  Alternatives

[hubspot/api-client

Hubspot API client

24016.2M18](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172437.8k11](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

94452.6k6](/packages/botman-driver-telegram)

PHPackages © 2026

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