PHPackages                             thoth-pharaoh-ken/laravel-goldflow - 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. thoth-pharaoh-ken/laravel-goldflow

ActiveLibrary[Payment Processing](/categories/payments)

thoth-pharaoh-ken/laravel-goldflow
==================================

金流訂單產生器

v1.1.8(5y ago)02MITPHPPHP &gt;=7.2

Since Sep 29Pushed 5y ago1 watchersCompare

[ Source](https://github.com/ken0911208818/thoth-pharaoh-Ecpay)[ Packagist](https://packagist.org/packages/thoth-pharaoh-ken/laravel-goldflow)[ RSS](/packages/thoth-pharaoh-ken-laravel-goldflow/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (3)Versions (12)Used By (0)

thoth-pharaoh-Ecpay
===================

[](#thoth-pharaoh-ecpay)

###### tags: `laravel` `綠界`

[](#tags-laravel-綠界)

系統需求
----

[](#系統需求)

- php &gt;=7.2

安裝
--

[](#安裝)

```
composer require thoth-pharaoh-ken/laravel-goldflow
```

環境設定
----

[](#環境設定)

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

env設定檔
------

[](#env設定檔)

```
ECPAY_MERCHANT_ID=2000132
ECPAY_HASH_KEY=5294y06JbISpM5x9
ECPAY_HASH_IV=v77hoKGq4kWxNNIS
ECPAY_INVOICE_HASH_KEY="串接發票用"
ECPAY_INVOICE_HASH_IV="串接發票用"
ECPAY_TradeDesc="我叫商家名稱"
```

用法
--

[](#用法)

- 建立超商條碼訂單

```
->CVS('金額','超商繳費截止時間')

```

```
超商繳費截止時間(單位分鐘) 預設1440分鐘 = 一天

```

```
use ThothPharaohKen\laravelGoldFlow\EcPay;

class XXX
{
    public function __construct(EcPay $ecpay)
    {
        $this->ecpay = $ecpay;
    }

    public function send()
    {
        //有三種方法可選用 CVS, ATM, Credit
        return $this->ecpay->CVS(500, 1440)->CreateTrade();
    }

}
```

- 建立ATM訂單

```
->ATM('金額','允許繳費有效天數')

```

```
超商繳費截止時間(單位天數) 預設1天

```

```
use ThothPharaohKen\laravelGoldFlow\EcPay;

class XXX
{
    public function __construct(EcPay $ecpay)
    {
        $this->ecpay = $ecpay;
    }

    public function send()
    {
        //有三種方法可選用 CVS, ATM, Credit
        return $this->ecpay->ATM(500, 1)->CreateTrade();
    }

}
```

- 建立信用卡訂單

```
->Credit('金額','刷卡分期期數。')
EX:3,6,12,18,24
預設是不分期

```

```
刷卡分期期數(單位期數) 預設不帶

```

```
use ThothPharaohKen\laravelGoldFlow\EcPay;

class XXX
{
    public function __construct(EcPay $ecpay)
    {
        $this->ecpay = $ecpay;
    }

    public function send()
    {
        //有三種方法可選用 CVS, ATM, Credit
        return $this->ecpay->Creidt(500)->CreateTrade();
    }

}
```

訂單編號
----

[](#訂單編號)

- 用法

```
->CreateTrade('訂單編號','inWeb')
訂單編號規則與綠界相同

```

```
訂單編號預設系統自產

```

```
use ThothPharaohKen\laravelGoldFlow\EcPay;

class XXX
{
    public function __construct(EcPay $ecpay)
    {
        $this->ecpay = $ecpay;
    }

    public function send()
    {
        //有三種方法可選用 CVS, ATM, Credit
        return $this->ecpay->Creidt(500)->CreateTrade('thothken123456789');
    }

}
```

付款樣式
----

[](#付款樣式)

- 另開視窗

    function 最後會回傳付款網址

    ```
    https://payment-stage.ecpay.com.tw/SP/SPCheckOut?MerchantID=2000132&SPToken=15DECC9A6BBD475DBD6DB0BD2398F212&PaymentType=CVS

    ```
- js樣板

    - 用法

    ```
    ->CreateTrade('訂單編號','inWeb')
    inWeb :bool
    預設false

    ```

    ```
    use ThothPharaohKen\laravelGoldFlow\EcPay;

    class XXX
    {
        public function __construct(EcPay $ecpay)
        {
            $this->ecpay = $ecpay;
        }

        public function send()
        {
            //有三種方法可選用 CVS, ATM, Credit
            return $this->ecpay->Creidt(500)->CreateTrade(null, true);
        }

    }
    ```
- 回傳

```
[
 "MerchantID" => "2000132"
 "SPToken" => "97885BE649034B4DA8377C5FB29BA81B"
 "PaymentType" => "ATM"
]
```

- 套入js樣板

```

```

[![](https://github.com/ken0911208818/thoth-pharaoh-Ecpay/raw/master/js%E5%A5%97%E7%89%88.png?raw=true)](https://github.com/ken0911208818/thoth-pharaoh-Ecpay/blob/master/js%E5%A5%97%E7%89%88.png?raw=true)

安全碼檢查
-----

[](#安全碼檢查)

- 用法

```
    use ThothPharaohKen\laravelGoldFlow\CheckMacValue;

    class XXX
    {
        public function check()
        {
            $testvalue = [
                      "RtnCode" => "1",
                      "RtnMsg" => "成功",
                      "SPToken" => "A8F2AAC8AD9343ADA67E8BB6539CAE72",
                      "MerchantID" => "2000132",
                      "MerchantTradeNo" => "thoth160195586727",
                      "CheckMacValue" => "2FFA4DA0C9198AB64CA0F3886FCAE15FFE4B9A4A57E29901DB57FE66CD8973F7"
                    ];
            return CheckMacValue::comparison($testvalue);// true or false
        }

    }
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity56

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

11

Last Release

2045d ago

### Community

Maintainers

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

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/thoth-pharaoh-ken-laravel-goldflow/health.svg)

```
[![Health](https://phpackages.com/badges/thoth-pharaoh-ken-laravel-goldflow/health.svg)](https://phpackages.com/packages/thoth-pharaoh-ken-laravel-goldflow)
```

###  Alternatives

[lemonsqueezy/laravel

A package to easily integrate your Laravel application with Lemon Squeezy.

58596.1k](/packages/lemonsqueezy-laravel)[ssheduardo/redsys-laravel

Package redsys for laravel

100129.5k1](/packages/ssheduardo-redsys-laravel)[duncanmcclean/simple-commerce

A simple, yet powerful e-commerce addon for Statamic.

16313.2k2](/packages/duncanmcclean-simple-commerce)[tsaiyihua/laravel-ecpay

ecpay library for laravel

6416.3k](/packages/tsaiyihua-laravel-ecpay)[alifaraun/laravel-moamalat-pay

Easy - Moamalat Lightbox integration for Laravel.

1914.0k](/packages/alifaraun-laravel-moamalat-pay)[duncanmcclean/statamic-cargo

Comprehensive e-commerce addon for Statamic. Build bespoke e-commerce sites without the complexity.

322.8k](/packages/duncanmcclean-statamic-cargo)

PHPackages © 2026

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