PHPackages                             mangdin/thinkphp5.1-weixinpay-wap - 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. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. mangdin/thinkphp5.1-weixinpay-wap

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

mangdin/thinkphp5.1-weixinpay-wap
=================================

thinkphp5.1 微信支付 H5手机网页支付

1.1(7y ago)172Apache-2.0PHP

Since Jul 27Pushed 7y agoCompare

[ Source](https://github.com/mangdin/thinkphp5.1-weixinpay-wap)[ Packagist](https://packagist.org/packages/mangdin/thinkphp5.1-weixinpay-wap)[ RSS](/packages/mangdin-thinkphp51-weixinpay-wap/feed)WikiDiscussions master Synced today

READMEChangelog (2)DependenciesVersions (3)Used By (0)

thinkphp5.1-weixinpay-wap
=========================

[](#thinkphp51-weixinpay-wap)

thinkphp5.1 微信支付 手机H5 支付

将根目录的weixinpay\_wap.php拷贝到config目录

调用支付的控制器代码:

```
    /**
     * 微信H5支付
     * @param $orderid  //订单号
     */
    public function h5wap($orderid){// 获取配置项
        \think\facade\Config::get('weixinpay_wap.');
        $order=array(
            'body' => '测试描述',// 商品描述（需要根据自己的业务修改）
            'total_fee' => 1,// 订单金额  以(分)为单位（需要根据自己的业务修改）
            'out_trade_no' => time().rand(1000,9999),// 订单号（需要根据自己的业务修改）
            'product_id' => '234242342',// 商品id（需要根据自己的业务修改）
            'trade_type' => 'MWEB',// JSAPI公众号支付
            );
        //统一下单 获取prepay_id
        $redirect_url=urlencode('http://'.$_SERVER['HTTP_HOST'].'/index.php');  //支付完成后跳回地址
        $weixin = new \mangdin\weixinpaywap\WeixinH4Pay();
        $unified_order= $weixin->unifiedOrder($order);
        $this->redirect($unified_order['mweb_url']."&redirect_url=".$redirect_url);

    }
```

回调控制器代码：

```
    /**
     * notify_url接收页面
     */
    public function notify(){
        // 导入微信支付sdk
        $wxpay=new \mangdin\weixinpaywap\WeixinH4Pay();
        $result=$wxpay->notify();
        if ($result) {
            //完成支付后处理业务逻辑

        }
    }
```

\#注意，支付控制器代码一定要通过其他方法调用，不可以直接访问，否则会提示 “商家参数格式有误，请联系商家解决”

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity63

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

Total

2

Last Release

2845d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/41657311?v=4)[mangdin](/maintainers/mangdin)[@mangdin](https://github.com/mangdin)

---

Top Contributors

[![mangdin](https://avatars.githubusercontent.com/u/41657311?v=4)](https://github.com/mangdin "mangdin (6 commits)")

---

Tags

auththinkphp5.1mangdin

### Embed Badge

![Health badge](/badges/mangdin-thinkphp51-weixinpay-wap/health.svg)

```
[![Health](https://phpackages.com/badges/mangdin-thinkphp51-weixinpay-wap/health.svg)](https://phpackages.com/packages/mangdin-thinkphp51-weixinpay-wap)
```

###  Alternatives

[tymon/jwt-auth

JSON Web Token Authentication for Laravel and Lumen

11.5k49.1M350](/packages/tymon-jwt-auth)[league/oauth2-server

A lightweight and powerful OAuth 2.0 authorization and resource server library with support for all the core specification grants. This library will allow you to secure your API with OAuth and allow your applications users to approve apps that want to access their data from your API.

6.6k136.0M248](/packages/league-oauth2-server)[lab404/laravel-impersonate

Laravel Impersonate is a plugin that allows to you to authenticate as your users.

2.3k16.4M48](/packages/lab404-laravel-impersonate)[auth0/auth0-php

PHP SDK for Auth0 Authentication and Management APIs.

40820.2M68](/packages/auth0-auth0-php)[kreait/firebase-tokens

A library to work with Firebase tokens

24040.8M14](/packages/kreait-firebase-tokens)

PHPackages © 2026

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