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

ActiveLibrary[Payment Processing](/categories/payments)

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

IEPay PHP SDK

v1.0.0(5y ago)152[1 issues](https://github.com/MIEPayOpenSource/iepay-php-sdk/issues)MITPHP

Since Oct 26Pushed 5y ago1 watchersCompare

[ Source](https://github.com/MIEPayOpenSource/iepay-php-sdk)[ Packagist](https://packagist.org/packages/iepay/iepay-php-sdk)[ Docs](https://iepay-api.netlify.app)[ RSS](/packages/iepay-iepay-php-sdk/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

IEPay PHP SDK
=============

[](#iepay-php-sdk)

This SDK is used to create, refund orders .

Installation
------------

[](#installation)

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

Usage
-----

[](#usage)

### Create IEPayClient

[](#create-iepayclient)

```
use IEPaySDK\BaseClient;

use IEPaySDK\Observer\SignatureObserver;

class IEPayClient extends BaseClient {

 public function __construct(string $apiKey)
 {
     $this->addObserver(new SignatureObserver($apiKey));

     $origin = 'https://a.mypaynz.com';

     parent::__construct($origin);
 }
}

```

### Create General Order

[](#create-general-order)

```
use IEPaySDK\IEPayClient;
use IEPaySDK\Requests\GeneralOrderRequest;

$client = new IEPayClient('iepay_api_key');

$request = new GeneralOrderRequest();

$body = [
    'mid' => '10000',                        // mid
    'total_fee' => 1000,                     // price in cents, here is 1000 cents
    'goods' => 'Iphone',                     // any string
    'goods_detail' => 'An Iphone 12',        // any string
    'out_trade_no' => '2020102204514282',    // out_trade_no
    'pay_type'    => 'IE0011',               // see https://iepay-api.netlify.app/online/order/create/#parameter-info
    'return_url' => $return_url,
    'notify_url' => $notify_url,
    'expired' => 3600,
    'version' => 'v1'
];

$request->buildBody($body);

$response = $client->execute($request);

```

### Create Wechat Mini Program Order

[](#create-wechat-mini-program-order)

```
use IEPaySDK\IEPayClient;
use IEPaySDK\Requests\WechatMiniAppOrderRequest;

$client = new IEPayClient('iepay_api_key');

$request = new WechatMiniAppOrderRequest();

$body = [
    'mid' => '10000',                        // mid
    'appid' => 'wxxxxxxxxxx',                // wechat mini program appid
    'openid' => 'ZhdowQs12Ed',               // user openid in your wechat mini program
    'total_fee' => 1000,                     // price in cents, here is 1000 cents
    'goods' => 'Iphone',                     // any string
    'goods_detail' => 'An Iphone 12',        // any string
    'out_trade_no' => '2020102204514282',    // out_trade_no
    'pay_type' => 'IE0026',                  // just set pay_type to IE0026 here
    'notify_url' => $notify_url,
    'expired' => 3600,
    'version' => 'v1'
];

$request->buildBody($body);

$response = $client->execute($request);

```

### Refund Order

[](#refund-order)

```
use IEPaySDK\IEPayClient;
use IEPaySDK\Requests\RefundOrderRequest;

$client = new IEPayClient('iepay_api_key');

$request = new RefundOrderRequest();

$body = [
    'mid' => '10000',                        // mid
    'out_trade_no' => '2020102204514282',    // out_trade_no
    'pay_type' => 'IE0011',                  // order pay_type
    'refund_amount' => 1000,                 // amount in cents, here is 1000 cents
    'refund_charge_fee' => 'TRUE',           // optional, if you want to refund all the fees to customer, set it to 'TRUE'
    'version' => 'v1'
];

$request->buildBody($body);

$response = $client->execute($request);

```

Contributing
------------

[](#contributing)

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License
-------

[](#license)

[MIT](https://rem.mit-license.org)

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

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

2022d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/57f310ea6eca46d94c06f00f14c4f68c07a91203f5ce5ae83c7daa4c343153f4?d=identicon)[MIEPay](/maintainers/MIEPay)

---

Top Contributors

[![JackLicc](https://avatars.githubusercontent.com/u/44892266?v=4)](https://github.com/JackLicc "JackLicc (2 commits)")

---

Tags

paymentsrefundsordersiepay

### Embed Badge

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

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

###  Alternatives

[amzn/amazon-pay-sdk-php

Amazon Pay SDK (PHP)

20512.1M3](/packages/amzn-amazon-pay-sdk-php)[unicodeveloper/laravel-paystack

A Laravel Package for Paystack

650975.6k11](/packages/unicodeveloper-laravel-paystack)[ignited/laravel-omnipay

Integrates Omnipay with Laravel and provides an easy configuration.

5211.1M12](/packages/ignited-laravel-omnipay)[recurly/recurly-client

The PHP client library for the Recurly API

1736.3M7](/packages/recurly-recurly-client)[chargebee/chargebee-php

ChargeBee API client implementation for PHP

768.0M9](/packages/chargebee-chargebee-php)[amzn/amazon-pay-api-sdk-php

Amazon Pay API SDK (PHP)

505.1M9](/packages/amzn-amazon-pay-api-sdk-php)

PHPackages © 2026

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