PHPackages                             lyt8384/pingpp-laravel5-plus - 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. lyt8384/pingpp-laravel5-plus

ActiveLibrary[API Development](/categories/api)

lyt8384/pingpp-laravel5-plus
============================

Simple Pingpp wrapper for Laravel 5

1.1.0(9y ago)75.1k7[2 issues](https://github.com/lyt8384/pingpp-laravel5-plus/issues)MITPHPPHP &gt;=5.4.0CI failing

Since Jan 6Pushed 6y agoCompare

[ Source](https://github.com/lyt8384/pingpp-laravel5-plus)[ Packagist](https://packagist.org/packages/lyt8384/pingpp-laravel5-plus)[ Docs](https://github.com/lyt8384/pingpp-laravel5-plus)[ RSS](/packages/lyt8384-pingpp-laravel5-plus/feed)WikiDiscussions master Synced today

READMEChangelog (2)Dependencies (3)Versions (3)Used By (0)

pingpp-laravel5-plus
====================

[](#pingpp-laravel5-plus)

pingxx基于laravel5的封装

[![Latest Stable Version](https://camo.githubusercontent.com/af42344a12efa6bcc7ce8314cb3243445f839de8126e777e1457b5140476b1e3/68747470733a2f2f706f7365722e707567782e6f72672f6c7974383338342f70696e6770702d6c61726176656c352d706c75732f762f737461626c65)](https://packagist.org/packages/lyt8384/pingpp-laravel5-plus) [![Total Downloads](https://camo.githubusercontent.com/9c76838d31b4c5a84c4e303f3211bb657ac71973ee6596b660183e947112a5a9/68747470733a2f2f706f7365722e707567782e6f72672f6c7974383338342f70696e6770702d6c61726176656c352d706c75732f646f776e6c6f616473)](https://packagist.org/packages/lyt8384/pingpp-laravel5-plus) [![Latest Unstable Version](https://camo.githubusercontent.com/901a5da58c08d68ae1ea767634031689a1578c4a865a8e12ff29dc5c5888781f/68747470733a2f2f706f7365722e707567782e6f72672f6c7974383338342f70696e6770702d6c61726176656c352d706c75732f762f756e737461626c65)](https://packagist.org/packages/lyt8384/pingpp-laravel5-plus) [![License](https://camo.githubusercontent.com/dd33913542adac08d913faf14731cd2aced85e30939d51e24c5a1e0e927f1282/68747470733a2f2f706f7365722e707567782e6f72672f6c7974383338342f70696e6770702d6c61726176656c352d706c75732f6c6963656e7365)](https://packagist.org/packages/lyt8384/pingpp-laravel5-plus)

配置方法
====

[](#配置方法)

1. 在`composer.json`里添加如下内容，并运行`composer update`:

```
{
    "require": {
        "lyt8384/pingpp-laravel5-plus": "dev-master"
    }
}
```

1. 在`app/config/app.php`文件里的providers变量下添加`lyt8384\Pingpp\PingppServiceProvider::class,`
2. 在`app/config/app.php`文件里的aliases变量下添加`'Pingpp' => lyt8384\Pingpp\Facades\Pingpp::class,`
3. 运行`php artisan vendor:publish --provider="lyt8384\Pingpp\PingppServiceProvider"`生成配置文件
4. 修改配置文件里面的2组key
5. 若需回调验证，请填写`public_key_path`，**注意该处是路径！**，这里参考官方已改为路径，同时当前会兼容旧版本配置文件
6. 若需要使用商户身份验证，请填写`private_key_path`，**注意该处是路径！**线上生产环境建议配置`.evn`来配置生产环境

使用方法
====

[](#使用方法)

```
use Pingpp;

class SomeClass extends Controller {

    public function someFunction()
    {
    	Pingpp::Charge()->create([
            'order_no'  => '123456789',
		    'amount'    => '100',
		    'app'       => array('id' => 'app_xxxxxxxxxxxxxx'),
		    'channel'   => 'upacp',
		    'currency'  => 'cny',
		    'client_ip' => '127.0.0.1',
		    'subject'   => 'Your Subject',
		    'body'      => 'Your Body'
        ]);
    }
}
```

```
use Pingpp;

class SomeClass extends Controller {

    public function someFunction()
    {
    	Pingpp::RedEnvelope()->create([
            'order_no'  => '123456789',
	        'app'       => array('id' => 'APP_ID'),
	        'channel'   => 'wx_pub',
	        'amount'    => 100,
	        'currency'  => 'cny',
	        'subject'   => 'Your Subject',
	        'body'      => 'Your Body',
	        'extra'     => array(
	            'nick_name' => 'Nick Name',
	            'send_name' => 'Send Name'
	        ),
	        'recipient'   => 'Openid',
	        'description' => 'Your Description'
        ]);
    }
}
```

错误调用
====

[](#错误调用)

当Pingpp调用发生错误的时候会`return false`，此时调用`Pingpp::getError();`返回具体错误内容。

接收 Webhooks 通知
==============

[](#接收-webhooks-通知)

直接调用`Pingpp::notice()`，若验证成功,会返回通知的`array`结构数据,若失败直接弹出错误回Pingpp。如果需要记录错误，请自行监听系统错误，详见[Errors &amp; Logging](https://laravel.com/docs/5.3/errors)

其他使用方法见官方文档[PingPlusPlus](https://github.com/PingPlusPlus/pingpp-php)

感谢
==

[](#感谢)

感谢几位forked的同学的改进，当时写的很简单，无入侵式的写法，其实在接收webhooks方面，可以用Laravel自己的[Events](https://laravel.com/docs/5.3/events)去监听处理，显得更Laravel风格。

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance14

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 90.5% 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 ~362 days

Total

2

Last Release

3466d ago

### Community

Maintainers

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

---

Top Contributors

[![lyt8384](https://avatars.githubusercontent.com/u/3069157?v=4)](https://github.com/lyt8384 "lyt8384 (19 commits)")[![ElaineKoo](https://avatars.githubusercontent.com/u/22931775?v=4)](https://github.com/ElaineKoo "ElaineKoo (1 commits)")[![skys215](https://avatars.githubusercontent.com/u/4977935?v=4)](https://github.com/skys215 "skys215 (1 commits)")

---

Tags

laravellaravel 5pingppPingxx

### Embed Badge

![Health badge](/badges/lyt8384-pingpp-laravel5-plus/health.svg)

```
[![Health](https://phpackages.com/badges/lyt8384-pingpp-laravel5-plus/health.svg)](https://phpackages.com/packages/lyt8384-pingpp-laravel5-plus)
```

###  Alternatives

[statamic/cms

The Statamic CMS Core Package

4.8k3.5M925](/packages/statamic-cms)[defstudio/telegraph

A laravel facade to interact with Telegram Bots

815320.5k3](/packages/defstudio-telegraph)[api-platform/laravel

API Platform support for Laravel

59156.3k11](/packages/api-platform-laravel)[riclep/laravel-storyblok

A Laravel wrapper around the Storyblok API to provide a familiar experience for Laravel devs

6277.0k5](/packages/riclep-laravel-storyblok)[tomshaw/electricgrid

A feature-rich Livewire package designed for projects that require dynamic, interactive data tables.

119.2k](/packages/tomshaw-electricgrid)

PHPackages © 2026

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