PHPackages                             wimmike/ec-pay - 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. wimmike/ec-pay

ActiveEctool[Payment Processing](/categories/payments)

wimmike/ec-pay
==============

ECPay for Laravel 5

04PHP

Since Oct 14Pushed 6y ago1 watchersCompare

[ Source](https://github.com/wimmike/ec-pay)[ Packagist](https://packagist.org/packages/wimmike/ec-pay)[ RSS](/packages/wimmike-ec-pay/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

ec-pay
------

[](#ec-pay)

### ec-pay - Laravel 5 version - forked from

[](#ec-pay---laravel-5-version---forked-from-httpsgithubcomflamelinecpay)

\*\*Installation \*\*
composer require wimmike/ec-pay master

```

Add the service provider to your $providers array in config/app.php file like:

```

wimmike\\ECPay\\EcpayServiceProvider::class,

Add the alias to your $aliases array in config/app.php file like: 'Ecpay' =&gt; wimmike\\ECPay\\Facade\\Ecpay::class, ```

**step 3 : Publish config to your project**

```

php artisan vendor:publish --provider "wimmike\\ECPay\\EcpayServiceProvider"

```

## Configuration

* After installation, you will need to add your ecpay settings. Following is the code you will find in **config/ecpay.php**, which you should update accordingly.
```php
return [
    'ServiceURL' => env('PAY_SERVICE_URL', 'https://payment-stage.ecpay.com.tw/Cashier/AioCheckOut/V2'),
    'HashKey' => env('PAY_HASH_KEY', '5294y06JbISpM5x9'),
    'HashIV' => env('PAY_HASH_IV', 'v77hoKGq4kWxNNIS'),
    'MerchantID' => env('PAY_MERCHANT_ID', '2000132'),
];

```

\* Add this to `.env`
```ini #Payment testing : Use default value in config/ecpay.php. APP\_PAY\_TEST=true PAY\_SERVICE\_URL=PAY\_HASH\_KEY=5294y06JbISpM5x9 PAY\_HASH\_IV=v77hoKGq4kWxNNIS PAY\_MERCHANT\_ID=2000132

```

---

### How To Use
```php
use Ecpay;

```

```
public function Demo()
{
    //Official Example :
    //https://github.com/ECPay/ECPayAIO_PHP/blob/master/AioSDK/example/sample_Credit_CreateOrder.php

    //基本參數(請依系統規劃自行調整)
    Ecpay::i()->Send['ReturnURL']         = "http://www.ecpay.com.tw/receive.php" ;
    Ecpay::i()->Send['MerchantTradeNo']   = "Test".time() ;           //訂單編號
    Ecpay::i()->Send['MerchantTradeDate'] = date('Y/m/d H:i:s');      //交易時間
    Ecpay::i()->Send['TotalAmount']       = 2000;                     //交易金額
    Ecpay::i()->Send['TradeDesc']         = "good to drink" ;         //交易描述
    Ecpay::i()->Send['ChoosePayment']     = \ECPay_PaymentMethod::ALL ;     //付款方式

    //訂單的商品資料
    array_push(Ecpay::i()->Send['Items'], array('Name' => "緑界黑芝麻豆漿", 'Price' => (int)"2000",
               'Currency' => "元", 'Quantity' => (int) "1", 'URL' => "dedwed"));

    //Go to ECPay
    echo "緑界頁面導向中...";
    echo Ecpay::i()->CheckOutString();
}
```

Use `CheckOutString()` instead of `CheckOut()`

```
//Payment Success callback
public function doneDemo(Request $request)
{
    $arFeedback = Ecpay::i()->CheckOutFeedback($request->all());
    print Ecpay::i()->getResponse($arFeedback);
}
```

-

[](#)

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity35

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://www.gravatar.com/avatar/682df1cf8fb5712d9b2c7db589647295c95e6f2672627f52a550cc0620ec2285?d=identicon)[wimmike](/maintainers/wimmike)

---

Top Contributors

[![wimmike](https://avatars.githubusercontent.com/u/56557974?v=4)](https://github.com/wimmike "wimmike (6 commits)")

### Embed Badge

![Health badge](/badges/wimmike-ec-pay/health.svg)

```
[![Health](https://phpackages.com/badges/wimmike-ec-pay/health.svg)](https://phpackages.com/packages/wimmike-ec-pay)
```

###  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)
