PHPackages                             maras0830/laravel5-pay2go - 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. maras0830/laravel5-pay2go

AbandonedArchivedLibrary[Payment Processing](/categories/payments)

maras0830/laravel5-pay2go
=========================

Laravel5 pay2go.

v2.0.2(7y ago)117.4k5MITPHPPHP &gt;=5.4.0

Since Aug 19Pushed 7y ago2 watchersCompare

[ Source](https://github.com/Maras0830/laravel5-Pay2go-spgateway)[ Packagist](https://packagist.org/packages/maras0830/laravel5-pay2go)[ RSS](/packages/maras0830-laravel5-pay2go/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (7)Used By (0)

Laravel5-Pay2Go-spgateway
=========================

[](#laravel5-pay2go-spgateway)

Cash trading with Pay2Go-Spagateway Package on Laravel 5.\*

EXAMPLE
-------

[](#example)

[laravel5-Pay2Go-spgateway-example](https://github.com/Maras0830/laravel5-Pay2Go-spgateway-example)

FEATURE
-------

[](#feature)

1. Support add order.
2. Support credit payment pay or close.

Official Documentation
----------------------

[](#official-documentation)

Official Documentation for the Payment can be found on the [Spgateway\_gateway MPGapi\_V1\_0\_3](https://www.spgateway.com/dw_files/info_api/spgateway_gateway_MPGapi_V1_0_3.pdf).

Version
-------

[](#version)

Versionspgateway(智付通版本)Period 定期定額1.0.\*1.22.0.\*1.4Support(v)Installation
------------

[](#installation)

```
"maras0830/laravel5-pay2go": "^1.0"
```

or

```
"composer require maras0830/laravel5-pay2go"
```

In `config/app.php` add `providers`

```
Maras0830\Pay2Go\Providers\Pay2GoServiceProvider::class
```

In `config/app.php` add `aliases`

```
'Pay2Go' => Maras0830\Pay2Go\Pay2Go::class
```

In `.env` add, you can register on

[Pay2Go](https://www.spgateway.com/) or [Pay2Go Test](https://cwww.spgateway.com/)

```
CASH_STORE_DEBUG_MODE=false
CASH_STORE_ID=xxxxxxxx
CASH_STORE_HashKey=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
CASH_STORE_HashIV=xxxxxxxxxxxxxxxx
```

#### Remember to change your APP\_URL, spgateway deny localhost.

[](#remember-to-change-your-app_url-spgateway-deny-localhost)

default return url

```
CASH_ReturnUrl=/order/completed
CASH_NotifyURL=/order/notify
CASH_Client_BackUrl=/order/cancel
```

Publish config.

```
php artisan vendor:publish
```

USAGE
-----

[](#usage)

### MPG(Multi Payment Gateway) 單一串接多種支付

[](#mpgmulti-payment-gateway-單一串接多種支付)

routes.php

```
Route::get('cash', 'CashController@index');
Route::post('cash/create', 'CashController@store');
```

CashController.php

```
public function index()
{
    return view('cash.index');
}

```

resources/views/cash/index.blade.php

```

        Test Cash

        智付寶 - 訂單測試

            {!! csrf_field() !!}
            商店訂單編號：
