PHPackages                             wehnhew/payments - 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. wehnhew/payments

ActiveLibrary[Payment Processing](/categories/payments)

wehnhew/payments
================

Larave payment gateway adapter.

v1.0.0(12y ago)13871MITPHPPHP &gt;=5.3.0

Since Nov 25Pushed 12y ago1 watchersCompare

[ Source](https://github.com/wehnhew/laravel4-payments)[ Packagist](https://packagist.org/packages/wehnhew/payments)[ Docs](https://github.com/wehnhew/laravel4-payments)[ RSS](/packages/wehnhew-payments/feed)WikiDiscussions master Synced 2w ago

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

Payments for Laravel 4
----------------------

[](#payments-for-laravel-4)

Laravel 4 的支付网关.

[![Latest Stable Version](https://camo.githubusercontent.com/838608845060affce90666c814292576c243c50823a68926b0f0f36ca8e907d1/68747470733a2f2f706f7365722e707567782e6f72672f7765686e6865772f7061796d656e74732f762f737461626c652e706e67)](https://packagist.org/packages/wehnhew/payments) [![Total Downloads](https://camo.githubusercontent.com/284c07ff45711e967c718a2aa7510a2a12a44a9ceb3add7b42f7eb018a34b75a/68747470733a2f2f706f7365722e707567782e6f72672f7765686e6865772f7061796d656e74732f646f776e6c6f6164732e706e67)](https://packagist.org/packages/wehnhew/payments)

### 安装

[](#安装)

- [payments on Packagist](https://packagist.org/packages/payments)
- [payments on GitHub](https://github.com/wehnhew/laravel4-payments)

只要在你的 `composer.json` 文件require中加入下面内容，就能获得最新版.

```
"wehnhew/payments": "dev-master"

```

然后需要运行 "composer update" 来更新你的项目

安装完后，在 `app/config/app.php` 文件中找到 `providers` 键，

```
'providers' => array(

    'Wehnhew\Payments\PaymentServiceProvider'

)

```

找到 `aliases` 键，

```
'aliases' => array(

    'Payment' => 'Wehnhew\Payments\Facades\Payment'

)

```

以网银接口为例
-------

[](#以网银接口为例)

网银配置

```
$config = array(
	'account'=>'1001',//商户账号
	'key'=>'test', //商户密钥
	'reurl'=>'http://www.domain/payments/respond' //支付返回地址
);
```

生成支付表单

```
$adapter = Payment::create('chinabank',$config);
$payFrom = $pay->setOrderid('0001') //订单ID
			->setProduct(['price'=>100.01]) //商品价钱
			->setCustomer(['name'=>'文文','mobile'=>1380000000]) //购买人名称，手机
			->render(); //生成表单
var_dump($payFrom);
```

支付返回处理

```
$data = Input::all();
$result = Payment::create('chinabank',$config)
			->receive($data);
var_dump($result);
if($return['status'] > 0)
{
	//success
}
else
{
	//fail
}
```

联系我
---

[](#联系我)

有问题，请发送到

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

4599d ago

### Community

Maintainers

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

---

Top Contributors

[![wehnhew](https://avatars.githubusercontent.com/u/1829197?v=4)](https://github.com/wehnhew "wehnhew (7 commits)")

---

Tags

gatewayalipaylaravel4chinabank

### Embed Badge

![Health badge](/badges/wehnhew-payments/health.svg)

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

###  Alternatives

[yansongda/laravel-pay

专注 Alipay/WeChat/Unipay 的 laravel 支付扩展包

1.1k363.8k11](/packages/yansongda-laravel-pay)[shetabit/payment

Laravel Payment Gateway Integration Package

944336.8k5](/packages/shetabit-payment)[lokielse/omnipay-alipay

Alipay gateway for Omnipay payment processing library

557422.2k11](/packages/lokielse-omnipay-alipay)[sebdesign/laravel-viva-payments

A Laravel package for integrating the Viva Payments gateway

4849.3k](/packages/sebdesign-laravel-viva-payments)[lokielse/omnipay-global-alipay

Alipay global gateway for Omnipay payment processing library

3050.3k](/packages/lokielse-omnipay-global-alipay)

PHPackages © 2026

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