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

ActiveLibrary[Payment Processing](/categories/payments)

iepay/iepay-sdk
===============

Iepay PHP SDK version 3.x

v1.0.3(4y ago)037MITPHPPHP &gt;=7.1.0

Since Feb 17Pushed 4y ago1 watchersCompare

[ Source](https://github.com/MIEPayOpenSource/iepay-sdk)[ Packagist](https://packagist.org/packages/iepay/iepay-sdk)[ RSS](/packages/iepay-iepay-sdk/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (4)DependenciesVersions (5)Used By (0)

iepay-sdk
=========

[](#iepay-sdk)

Iepay PHP SDK version 3.x APIs.

Installation / 安装
-----------------

[](#installation--安装)

```
composer require iepay/iepay-sdk
```

Usage / 使用方法
------------

[](#usage--使用方法)

### Add environment config / 添加环境变量

[](#add-environment-config--添加环境变量)

```
MYPAY_ID={YOUR_IEPAY_ID}		#IEPAY账号下的MID
MYPAY_KEY={YOUR_IEPAY_API_KEY}	#IEPAY账号下的API-KEY

MYPAY_RETURN_URL={PAYMENT_SUCCESS_PAGE}			#交易成功页面地址
MYPAY_NOTIFY_URL={PAYMENT_SUCCESS_NOTIFY_URL}	#交易成功异步通知地址

```

### Add namespace / 添加文件命名空间

[](#add-namespace--添加文件命名空间)

```
use IEPaySDK\Payment;

```

### Payment / 支付

[](#payment--支付)

```
$paymentType = 'IE0012';			// Payment Type see types table (支付类别，参考支付类别表)
$orderId = '20220210001';			// Your order id (随机生成的订单号)
$amount = 100;						// Cent (分)
$subject = 'test subject';			// Item subject (商品标题)
$details = 'test details';			// Item details (商品详情)
$response = Payment::make($paymentType)->payment($orderId, $amount, $subject, $details);

```

#### Customise return URL or notify URL / 自定义返回链接

[](#customise-return-url-or-notify-url--自定义返回链接)

```
$returnUrl = 'https://xxx.xxx.xxx/return';
$notifyUrl = 'https://xxx.xxx.xxx/notify';
$response = Payment::make($paymentType, $returnUrl, $notifyUrl)->payment($orderId, $amount, $subject, $details);

```

#### Response / 返回值

[](#response--返回值)

```
{
    "success": true,
    "status": true,
    "error_code": 0,
    "message": "OK",
    "data": {
        "pay_type": "IE0012",
        "pay_type_str": "Alipay Web",
        "out_trade_no": "20220210001",
        "trade_no": null,
        "amount": 102,
        "status": 0,
        "status_str": "Unpay",
        "pay_url": "https://intlmapi.alipay.com/gateway.do?xxxxxxxx=xxxxxxxx&xxxxxxxx=xxxxxxxx"
    }
}
```

```
{
    "success": true,
    "status": true,
    "error_code": 0,
    "message": "OK",
    "data": {
        "pay_type": "IE0026",
        "pay_type_str": "Wechat Mini",
        "out_trade_no": "20220210001",
        "trade_no": null,
        "amount": 102,
        "status": 0,
        "status_str": "Unpay",
        "pay_param": {
            "appId": "wx123123",
            "timeStamp": 1644978320,
            "nonceStr": "cpxg8dl123123mi4oysnfx",
            "package": "prepay_id=wx123456",
            "signType": "MD5",
            "paySign": "96DB44xxxxxxxxxxx"
        },
        "pay_url": null
    }
}
```

### Query / 查询

[](#query--查询)

```
$paymentType = 'IE0012';			// Payment Type see types table (支付类别，参考支付类别表)
$orderId = '20220210001';			// Your order id (需要查询的订单号)
$response = Payment::make($paymentType)->query($orderId);

```

#### Response / 返回值

[](#response--返回值-1)

```
{
    "success": true,
    "status": true,
    "error_code": 0,
    "message": "OK",
    "data": {
        "pay_type": "IE0061",
        "pay_type_str": "Windcave Host Page Payment",
        "out_trade_no": "20220210005",
        "trade_no": "000001011336275001f9e4140da76641",
        "amount": 101,
        "status": 1,
        "status_str": "Paid",
        "refunded_amount": 0,
        "pay_url": "https://sec.windcave.com/pxmi3/F7F7CF323F53968E56CA0650BE713B347D965FA2CC2827399D145DE371986332500051BD83B6BCC7B8D21D53BAB554800"
    }
}
```

```
{
    "success": true,
    "status": true,
    "error_code": 0,
    "message": "OK",
    "data": {
        "pay_type": "IE0026",
        "pay_type_str": "Wechat Mini",
        "out_trade_no": "20220210001",
        "trade_no": null,
        "amount": 102,
        "status": 0,
        "status_str": "Unpay",
        "pay_param": {
            "appId": "wx123123",
            "timeStamp": 1644978320,
            "nonceStr": "cpxg8dl123123mi4oysnfx",
            "package": "prepay_id=wx123456",
            "signType": "MD5",
            "paySign": "96DB44xxxxxxxxxxx"
        },
        "pay_url": null
    }
}
```

### Refund / 退款

[](#refund--退款)

```
$paymentType = 'IE0012';			// Payment Type see types table (支付类别，参考支付类别表)
$orderId = '20220210001';			// Your order id (需要退款的订单号)
$amount = 100;						// Cent (分)
$response = Payment::make($paymentType)->refund($orderId, $amount);

```

#### Response / 返回值

[](#response--返回值-2)

```
{
    "success": true,
    "status": true,
    "error_code": 0,
    "message": "OK",
    "data": {
        "pay_type": "IE0061",
        "pay_type_str": "Windcave Host Page Payment",
        "out_trade_no": "20220210005",
        "trade_no": "000001011336275001f9e4140da76641",
        "amount": 101,
        "status": 2,
        "status_str": "Refund",
        "refunded": 10
    }
}
```

Pay Type Table / 支付类别表
----------------------

[](#pay-type-table--支付类别表)

**Code****Pay Types****Desc****Status**IE0012Alipay Online PC Qrcode支付宝PC二维码(PC收银页面)已开通IE0013Alipay Online Wap Qrcode支付宝H5手机端二维码(Wap 收银页面)已开通IE0015Alipay App Direct支付宝In-APP支付(native开发，需接入支付宝APP-SDK)已开通IE0021Wechat PC Qrcode微信PC二维码已开通IE0022Wechat Wap Qrcode微信WAP支付已开通IE0025Wechat App Direct微信In-APP支付已开通IE0026Wechat Mini Direct微信小程序支付已开通IE0036Union Secure Online Payment银联Secure线上支付新开通IE0041POLI PayPOLI PC 支付已开通IE0061Windcave Host Page PaymentWindcave PC 支付即将开通

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

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 ~34 days

Total

4

Last Release

1492d ago

### Community

Maintainers

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

---

Top Contributors

[![raycao871218](https://avatars.githubusercontent.com/u/20402058?v=4)](https://github.com/raycao871218 "raycao871218 (1 commits)")

### Embed Badge

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

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

###  Alternatives

[msilabs/bkash

bKash Payment Gateway API for Laravel Framework.

181.1k](/packages/msilabs-bkash)

PHPackages © 2026

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