PHPackages                             tsaiyihua/laravel-ezpay - 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. tsaiyihua/laravel-ezpay

ActiveLibrary[Payment Processing](/categories/payments)

tsaiyihua/laravel-ezpay
=======================

ezpay library for laravel

01.6k4[1 issues](https://github.com/tsaiyihua/laravel-ezpay/issues)PHPCI failing

Since May 3Pushed 5y agoCompare

[ Source](https://github.com/tsaiyihua/laravel-ezpay)[ Packagist](https://packagist.org/packages/tsaiyihua/laravel-ezpay)[ RSS](/packages/tsaiyihua-laravel-ezpay/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel EZPay
=============

[](#laravel-ezpay)

Laravel EZPay 為串接EZPay的非官方套件

系統需求
----

[](#系統需求)

- PHP &gt;= 7
- Laravel &gt;= 5.7
- guzzlehttp &gt;= 6.2

安裝
--

[](#安裝)

`composer require tsaiyihua/laravel-ezpay`

環境設定
----

[](#環境設定)

`php artisan vendor:publish --tag=ezpay`

### .env 裡加入

[](#env-裡加入)

```
EZPAY_MERCHANT_ID=
EZPAY_HASH_KEY=
EZPAY_HASH_IV=

```

- 金流測試用的參數值請參考介接文件 API\_E\_wallet\_ezPay\_1.0.2.pdf 第17頁。
- 查詢訂單的參數請請參考介接文件 API\_Trans\_ezPay\_1.0.0.pdf 第10頁。

用法
--

[](#用法)

### 建立訂單

[](#建立訂單)

- 產品資料單筆時可簡單只傳送 itemName 及 amount

```
use TsaiYiHua\EZPay\MPG;

class MpgController extends Controller
{
    public function __construct(MPG $mpg)
    {
        $this->mpg = $mpg;
    }
...

    public function sendOrder()
    {
        $data = [
            'itemName' => 'Donate',
            'amount' => 50
        ];
        return $this->mpg->createOrder($data);
    }
```

### 查詢訂單

[](#查詢訂單)

```
use TsaiYiHua\EZPay\Collections\QueryResponseCollection;
use TsaiYiHua\EZPay\Query;

class QueryController extends Controller
{
    protected $query;
    protected $queryResponse;

    public function __construct(Query $query, QueryResponseCollection $queryResponse)
    {
        $this->query = $query;
        $this->>queryResponse = $queryResponse;
    }
    ...
    public function queryInfo()
    {
        $res = $this->query->queryInfo('18120414321996244');
        return $this->queryResponse->collectResponse($res);
    }
```

### 開立發票

[](#開立發票)

```
use TsaiYiHua\EZPay\Collections\InvoiceResponseCollection;
use TsaiYiHua\EZPay\Invoice;

class InvoiceController extends Controller
{
    ...
    public function __construct(Invoice $invoice, InvoiceResponseCollection $invResponse)
    {
        $this->invoice = $invoice;
        $this->invResponse = $invResponse;
    }
    ...

    public function issueInvoice()
    {
        $itemData[] = [
            'name' => 'Donate',
            'qty' => 1,
            'unit' => '次',
            'price' => 500
        ];
        $invData = [
            'orderId' => StringService::identifyNumberGenerator('O'),
            'items' => $itemData,
            'BuyerName' => 'Buyer Name',
            'BuyerEmail' => 'eamil@address.com',
            'LoveCode' => 919
        ];
        return $this->invResponse->collectResponse($this->invoice->issueInvoice($invData)->query());
    }
```

- 已知問題
    - NotifyURL 及 ReturnURL 的參數無效，必須直接到管理平台設定才有設。
    - 境外轉帳可用支付寶，但也要企業帳號才能測試。

參考資料
----

[](#參考資料)

- ezPay 簡單付電子支付平台技術串接手冊 (2017-9-11)
    - 文件編號 ezPay\_1.0.2
    - 文件位置 documents/API\_E\_wallet\_ezPay\_1.0.2.pdf
- ezPay 簡單付電子支付平台交易狀態查詢 技術串接手冊 (2017-03-23)
    - 文件編號 ezPay\_1.0.0
    - 文件位置 documents/API\_Trans\_ezPay\_1.0.0.pdf
- [線上API文件區](https://www.ezpay.com.tw/info/Service_intro/api_document/member)
-
- 捐贈碼清冊
    - documents/20181205141501\_受捐贈機關或團體捐贈碼清冊.pdf
    - [捐贈碼查詢平台](https://www.einvoice.nat.gov.tw/APMEMBERVAN/XcaOrgPreserveCodeQuery/XcaOrgPreserveCodeQuery)

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity30

Early-stage or recently created project

 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.

### Community

Maintainers

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

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/tsaiyihua-laravel-ezpay/health.svg)

```
[![Health](https://phpackages.com/badges/tsaiyihua-laravel-ezpay/health.svg)](https://phpackages.com/packages/tsaiyihua-laravel-ezpay)
```

###  Alternatives

[omnipay/paypal

PayPal gateway for Omnipay payment processing library

3156.8M53](/packages/omnipay-paypal)[eduardokum/laravel-boleto

Biblioteca com boletos para o laravel

626351.9k2](/packages/eduardokum-laravel-boleto)[tbbc/money-bundle

This is a Symfony bundle that integrates moneyphp/money library (Fowler pattern): https://github.com/moneyphp/money.

1961.9M](/packages/tbbc-money-bundle)[2checkout/2checkout-php

2Checkout PHP Library

83740.3k2](/packages/2checkout-2checkout-php)[smhg/sepa-qr-data

Generate QR code data for SEPA payments

61717.2k5](/packages/smhg-sepa-qr-data)[omnipay/dummy

Dummy driver for the Omnipay payment processing library

271.2M33](/packages/omnipay-dummy)

PHPackages © 2026

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