PHPackages                             ifeiwu/mbdpay-php - 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. ifeiwu/mbdpay-php

ActiveLibrary[Payment Processing](/categories/payments)

ifeiwu/mbdpay-php
=================

MbdPay PHP SDK

v2.0.1(4y ago)019MITPHPPHP &gt;=7.2.5

Since Jan 9Pushed 3y ago1 watchersCompare

[ Source](https://github.com/ifeiwu/mbdpay-php)[ Packagist](https://packagist.org/packages/ifeiwu/mbdpay-php)[ Docs](https://github.com/ifeiwu/mbdpay-php)[ RSS](/packages/ifeiwu-mbdpay-php/feed)WikiDiscussions main Synced 1mo ago

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

> **由于平台原因暂时无法使用。**

面包多支付
=====

[](#面包多支付)

[面包多支付](https://mbd.pub/)（PHP SDK）是为个人而打造，安全，正规，低门槛的支付能力服务。

申请流程
----

[](#申请流程)

##### [注册面包多](https://mianbaoduo.com/) -&gt; [开通闪电结算](https://mianbaoduo.com/o/config/transaction/profile) -&gt; [获取开发参数](https://mbd.pub/dev)

[](#注册面包多---开通闪电结算---获取开发参数)

快速安装
----

[](#快速安装)

```
composer require ifeiwu/mbdpay-php

```

开始使用
----

[](#开始使用)

```
require_once 'vendor/autoload.php';

$client = new Pagepan\MbdPayClient(MBDPAY_APP_ID, MBDPAY_APP_KEY);
```

### 获取用户 openid

[](#获取用户-openid)

###### 微信 JSAPI 支付必须

[](#微信-jsapi-支付必须)

```
// 完整的例子：example/wxjs.php

$openid = $_GET['openid'];

if ( ! $openid )
{
    $openid_url = $client->openid('http://192.168.31.2/mbdpay-php/example/wxjs.php');

    echo 'location.href="' . $openid_url. '";';
}
else
{
    // ......
}
```

### 微信 JSAPI

[](#微信-jsapi)

###### 适用于微信内网页或扫码支付

[](#适用于微信内网页或扫码支付)

```
// 完整的例子：example/wxjs.php

$res = $client->wxjs($openid, 1, '产品说明', 'http://192.168.31.2/mbdpay-php/callback_url.php');
```

### 微信 H5

[](#微信-h5)

###### 适用于外部移动端浏览器或扫码支付

[](#适用于外部移动端浏览器或扫码支付)

*支付使用前，请在控制台添加H5域名并确保审核通过*

```
// 完整的例子：example/wxh5.php

$res = $client->wxh5(1, '产品说明');
```

### 支付宝

[](#支付宝)

###### 适用于移动端网页或扫码支付

[](#适用于移动端网页或扫码支付)

```
// 完整的例子：example/alipay.php

echo $client->alipay('http://192.168.31.2/mbdpay-php/callback_url.php', 1, '产品说明', );
```

### 退款

[](#退款)

```
// 完整的例子：example/refund.php

$res = $client->refund('xxxxxxxxxxxxxxxxxxx');
```

### 订单查询

[](#订单查询)

```
// 完整的例子：example/order.php

$res = $client->order('xxxxxxxxxxxxxxxxxxx');
```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity46

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

Every ~1 days

Total

3

Last Release

1586d ago

Major Versions

v1.0.0 → v2.0.02022-01-10

### Community

Maintainers

![](https://www.gravatar.com/avatar/ea7e232958200382c37bcc5332767128153268ff5af0fae1e69a908a45b3f19d?d=identicon)[pagepan](/maintainers/pagepan)

---

Top Contributors

[![ifeiwu](https://avatars.githubusercontent.com/u/1853876?v=4)](https://github.com/ifeiwu "ifeiwu (11 commits)")

### Embed Badge

![Health badge](/badges/ifeiwu-mbdpay-php/health.svg)

```
[![Health](https://phpackages.com/badges/ifeiwu-mbdpay-php/health.svg)](https://phpackages.com/packages/ifeiwu-mbdpay-php)
```

###  Alternatives

[chargebee/chargebee-php

ChargeBee API client implementation for PHP

768.0M9](/packages/chargebee-chargebee-php)[imdhemy/google-play-billing

Google Play Billing

491.3M5](/packages/imdhemy-google-play-billing)[bitpay/sdk

Complete version of the PHP library for the new cryptographically secure BitPay API

42337.5k4](/packages/bitpay-sdk)[buckaroo/sdk

Buckaroo payment SDK

12189.1k9](/packages/buckaroo-sdk)[contica/facturador-electronico-cr

Un facturador de código libre para integrar facturación electrónica en Costa Rica a un proyecto PHP

2128.8k](/packages/contica-facturador-electronico-cr)[karson/mpesa-php-sdk

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

PHPackages © 2026

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