PHPackages                             laeo/paysoul - 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. laeo/paysoul

AbandonedArchivedLibrary[Payment Processing](/categories/payments)

laeo/paysoul
============

支付宝和微信收款SDK整合

218PHP

Since Sep 28Pushed 7y ago1 watchersCompare

[ Source](https://github.com/laeo/paysoul)[ Packagist](https://packagist.org/packages/laeo/paysoul)[ RSS](/packages/laeo-paysoul/feed)WikiDiscussions develop Synced 3d ago

READMEChangelogDependenciesVersions (2)Used By (0)

Paysoul
=======

[](#paysoul)

简单好用的开源支付宝、微信支付SDK。

[![Build Status](https://camo.githubusercontent.com/de35dc2d7ce0c5f17d4f0e835bbba90ad0716815bfb2277164c76762b62c8e94/68747470733a2f2f7472617669732d63692e6f72672f6c61656f2f706179736f756c2e7376673f6272616e63683d646576656c6f70)](https://travis-ci.org/laeo/paysoul)

安装
--

[](#安装)

正在开发中，可尝试使用下述命令安装。

```
composer require laeo/paysoul dev-develop
```

用法
--

[](#用法)

```
use Laeo\Paysoul\Paysoul;

//参照代码仓库中 `config` 目录下的配置文件构造配置信息
$config = [
    //...
];

//使用配置信息创建 Paysoul 实例
$paysoul = new Paysoul($config);

//发起支付宝交易预创建请求
$qrcode = $paysoul->channel('alipay.scan')->deal($orderId, $orderSubject, $orderAmount);

//将 $qrcode 生成二维码，展示给用户扫码即可付款

//处理网关异步通知
$body = file_get_contents('php://input');
$paysoul->channel('alipay.scan')->notify($body, function ($channel, $notify, $exception) {
    if ($exception !== null) {
        //校验回调请求时出现问题
        //记录日志
        info('支付宝扫码付回调异常：' . $exception->getMessage());
        //返回处理失败的响应
        return $channel->respond(false);
    }

    //正常处理业务逻辑，校验订单金额（单位为分）之类
    //最后若处理成功则返回正常响应
    return $channel->respond(true);
});
```

支持的接口
-----

[](#支持的接口)

渠道接口别名支付宝扫码付alipay.scan微信扫码付wxpay.scan微信手机网站wxpay.mweb支持的接口操作
-------

[](#支持的接口操作)

- 预下单 `deal`
- 退款 `refund`
- 退款查询 `refundQuery`
- 关闭订单 `close`
- 订单查询 `query`
- 回调校验 `verify`
- 响应回调请求 `respond`
- 处理异步通知 `notify`

协议
--

[](#协议)

本组建基于 MIT 协议开发，欢迎参与开发、发起合并请求。

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/8bc2ce804ea65d4e405f0ab49a0b0e9fbd8c17bab93c57479134762815f2c3a0?d=identicon)[laeo](/maintainers/laeo)

---

Top Contributors

[![laeo](https://avatars.githubusercontent.com/u/8142123?v=4)](https://github.com/laeo "laeo (38 commits)")

### Embed Badge

![Health badge](/badges/laeo-paysoul/health.svg)

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

###  Alternatives

[omnipay/paypal

PayPal gateway for Omnipay payment processing library

3156.8M53](/packages/omnipay-paypal)[eduardokum/laravel-boleto

Biblioteca com boletos para o laravel

626351.9k2](/packages/eduardokum-laravel-boleto)[tbbc/money-bundle

This is a Symfony bundle that integrates moneyphp/money library (Fowler pattern): https://github.com/moneyphp/money.

1961.9M](/packages/tbbc-money-bundle)[2checkout/2checkout-php

2Checkout PHP Library

83740.3k2](/packages/2checkout-2checkout-php)[smhg/sepa-qr-data

Generate QR code data for SEPA payments

61717.2k5](/packages/smhg-sepa-qr-data)[omnipay/dummy

Dummy driver for the Omnipay payment processing library

271.2M33](/packages/omnipay-dummy)

PHPackages © 2026

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