PHPackages                             lzbrest/payment-sdk - 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. lzbrest/payment-sdk

ActiveLibrary[Payment Processing](/categories/payments)

lzbrest/payment-sdk
===================

0.0.3(3mo ago)00PHPPHP ^7.4|^8.0

Since Jan 27Pushed 3mo agoCompare

[ Source](https://github.com/lzfr/payment-sdk)[ Packagist](https://packagist.org/packages/lzbrest/payment-sdk)[ RSS](/packages/lzbrest-payment-sdk/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (7)Versions (4)Used By (0)

Payment SDK (Laravel)
---------------------

[](#payment-sdk-laravel)

安装
--

[](#安装)

```
composer require lzbrest/payment-sdk
```

如果包版本还在开发阶段：

```
composer require lzbrest/payment-sdk:@dev
```

配置
--

[](#配置)

发布配置文件：

```
php artisan vendor:publish --provider="Lzbrest\PaymentSdk\PaymentServiceProvider" --tag=config
```

配置文件路径：`config/payment.php`

默认支持驱动：

- alipay
- wechat
- stripe
- paypal

可通过环境变量指定默认驱动与各驱动的接口地址：

```
PAYMENT_DRIVER=alipay
ALIPAY_ENDPOINT=http://localhost:8080/api/payment
WECHAT_ENDPOINT=http://localhost:8080/api/payment
STRIPE_ENDPOINT=http://localhost:8080/api/payment
PAYPAL_ENDPOINT=http://localhost:8080/api/payment
```

使用方式
----

[](#使用方式)

### Facade

[](#facade)

```
use Payment;

$result = Payment::pay([
    'order_id' => 1001,
    'amount' => 199,
]);
```

指定驱动：

```
$result = Payment::pay([
    'order_id' => 1001,
    'amount' => 199,
], 'stripe');
```

说明：如果不传 `$driver`，会使用 `PAYMENT_DRIVER` 配置的默认驱动；未配置默认驱动会抛出异常。

返回结构
----

[](#返回结构)

`pay()` 返回数组：

- `status`：HTTP 状态码
- `body`：响应原始内容
- `json`：解析后的 JSON（若非 JSON 则为 null）

测试
--

[](#测试)

```
vendor/bin/phpunit

```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance80

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity31

Early-stage or recently created project

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

3

Last Release

104d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/51a974d6ccb1d4eb4633432b125d256ce8c1e174dbea1b7d60c53e52b0b3098b?d=identicon)[lzbrest](/maintainers/lzbrest)

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/lzbrest-payment-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/lzbrest-payment-sdk/health.svg)](https://phpackages.com/packages/lzbrest-payment-sdk)
```

###  Alternatives

[sebdesign/laravel-viva-payments

A Laravel package for integrating the Viva Payments gateway

4845.9k](/packages/sebdesign-laravel-viva-payments)[musahmusah/laravel-multipayment-gateways

A Laravel Package that makes implementation of multiple payment Gateways endpoints and webhooks seamless

852.2k1](/packages/musahmusah-laravel-multipayment-gateways)[karson/mpesa-php-sdk

172.2k](/packages/karson-mpesa-php-sdk)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)[henryejemuta/laravel-monnify

A laravel package to seamlessly integrate monnify api within your laravel application

132.1k](/packages/henryejemuta-laravel-monnify)

PHPackages © 2026

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