PHPackages                             puins/thinkphp-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. puins/thinkphp-pay

ActiveLibrary[Payment Processing](/categories/payments)

puins/thinkphp-pay
==================

yansongda/pay for thinkphp

03PHP

Since Feb 14Pushed 4y ago1 watchersCompare

[ Source](https://github.com/puins/thinkphp-pay)[ Packagist](https://packagist.org/packages/puins/thinkphp-pay)[ RSS](/packages/puins-thinkphp-pay/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

think-pay
=========

[](#think-pay)

基于yansongda/pay 的thinkphp6 的支付类

安装
--

[](#安装)

> composer require puins/think-pay

使用
--

[](#使用)

### 在控制器中输出支付

[](#在控制器中输出支付)

在控制器的操作方法中使用

```
public function captcha($id = '')
{
	return captcha($id);
}

```

然后注册对应的路由来输出验证码

### 模板里输出支付

[](#模板里输出支付)

首先要在你应用的路由定义文件中，注册一个验证码路由规则。

```
\think\facade\Route::get('captcha/[:id]', "\\think\\captcha\\CaptchaController@index");

```

然后就可以在模板文件中使用

```
{:captcha_img()}

```

或者

```

```

> 上面两种的最终效果是一样的

### 控制器里验证

[](#控制器里验证)

使用TP的内置验证功能即可

```
$this->validate($data,[
    'captcha|验证码'=>'require|captcha'
]);

```

或者手动验证

```
if(!captcha_check($captcha)){
 //验证失败
};

```

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity27

Early-stage or recently created project

 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/e0eadd76c72827e3904e8378477fa43a25005b5f5fe9c446320fa97b845e1ad6?d=identicon)[Puins](/maintainers/Puins)

---

Top Contributors

[![puins](https://avatars.githubusercontent.com/u/54161115?v=4)](https://github.com/puins "puins (2 commits)")

### Embed Badge

![Health badge](/badges/puins-thinkphp-pay/health.svg)

```
[![Health](https://phpackages.com/badges/puins-thinkphp-pay/health.svg)](https://phpackages.com/packages/puins-thinkphp-pay)
```

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