PHPackages                             hyperbolaa/ylpay - 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. hyperbolaa/ylpay

ActiveProject

hyperbolaa/ylpay
================

银联pos通SDK在Laravel5.2封装包。

21292PHP

Since Jul 3Pushed 6y ago1 watchersCompare

[ Source](https://github.com/hyperbolaa/Ylpay)[ Packagist](https://packagist.org/packages/hyperbolaa/ylpay)[ RSS](/packages/hyperbolaa-ylpay/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

银联POS通 &amp; laravel5
---------------------

[](#银联pos通--laravel5)

支付宝SDK在Laravel5/Lumen封装包。

安装
--

[](#安装)

```
composer require hyperbolaa/ylpay dev-master

```

更新你的依赖包 `composer update` 或者全新安装 `composer install`。

使用
--

[](#使用)

### Laravel

[](#laravel)

找到 `config/app.php` 配置文件中，key为 `providers` 的数组，在数组中添加服务提供者。

```
    'providers' => [
        // ...
        Hyperbolaa\Ylpay\YlpayServiceProvider::class,
    ]
```

运行 `php artisan vendor:publish` 命令，发布配置文件到你的项目中。

### 说明

[](#说明)

配置文件 `config/ylpay.php` 为公共配置信息文件

#### 手机端

[](#手机端)

```
	// 创建支付单。
	$ylpay = app('ylpay.mobile');
	$ylpay->setOutTradeNo('order_id');
	$ylpay->setTotalFee('order_price');
	$ylpay->setSubject('goods_name');
	$ylpay->setBody('goods_description');

	// 返回签名后的支付参数给移动端的SDK。
	return $ylpay->getPayPara();
```

### 异步通知

[](#异步通知)

```
public function ylpayNotify()
{
    if (! app('ylpay.mobile')->verify()) {
        Log::notice('ylpay notify post data verification fail.', [
            'data' => Request::instance()->getContent()
        ]);
        return 'fail';
    }

    // 判断通知类型。
    if (Input::get('respCode') == '00') {
            // TODO: 支付成功，取得订单号进行其它相关操作。
            Log::debug('ylpay notify get data verification success.', [
                'out_trade_no'  => Input::get('orderId'),
                'trade_no'      => Input::get('queryId')
            ]);
    }

    return 'success';
}

```

联系&amp;打赏
---------

[](#联系打赏)

如果真心觉得项目帮助到你，为你节省了成本，欢迎鼓励一下。

如果有什么问题，可通过以下方式联系我。提供有偿技术服务。

也希望更多朋友可用提供代码支持。欢迎交流与打赏。

**加入QQ群**：60973229

Related
-------

[](#related)

- [Alipay](https://github.com/hyperbolaa/Alipay) 基于laravel5的支付宝支付
- [Unionpay](https://github.com/hyperbolaa/Unionpay) 基于laravel5的银联支付
- [Wechatpay](https://github.com/hyperbolaa/Wechatpay) 基于laravel5的微信支付
- [Alisms](https://github.com/hyperbolaa/Alisms) 基于laravel5的阿里云短信

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity37

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/6f9d51471cd65ff00a650bdf0bb93893a35d5d1d554ffce46c3a86a31009c587?d=identicon)[hyperbolaa](/maintainers/hyperbolaa)

---

Top Contributors

[![hyperbolaa](https://avatars.githubusercontent.com/u/10859667?v=4)](https://github.com/hyperbolaa "hyperbolaa (40 commits)")

### Embed Badge

![Health badge](/badges/hyperbolaa-ylpay/health.svg)

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

PHPackages © 2026

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