30/05
2018
Wallogit.com
2017 © Pedro Peláez
laravel5 taiwan GoMyPay payment package
Laravel5-GoMyPay is a laravel package for you to simple use GoMyPay payment system., (*1)
composer require Panigale/laravel5-GoMyPay
In .env add, you can register on, (*2)
GOMYPAY_STORECODE=your store code GOMYPAY_TRADECODE=your trade code GOMYPAY_CALLBACK=custom callback url GOMYPAY_BACKEND=custom backend recevice url
Publish config., (*3)
php artisan vendor:publish --provider="Panigale\GoMyPay\GoMyPayServiceProvider"
GoMyPay::payBy($paymentType)
->withAmount($amount)
->withUser($name ,$email ,$phone)
->create()
Then it well return an array include every fields for GoMyPay required. And you need to do is post this fields to GoMyPay., (*4)
if payment type is entity. it should have options, (*5)
$paymentType 1: Web-ATM 2: 虛擬帳號繳費 3: 超商條碼代收, (*6)
$response = GoMyPay::done($paymentType = null)
GoMyPayTradeId, (*7)
$response->serverTradeId
tradeNo, (*8)
$response->tradeNo
payAccount, (*9)
$response->payAccount
amount, (*10)
$response->amount
expiredDate, (*11)
$response->expiredDate
if payment type is Web-ATM, you can get pay date., (*12)
$response->payDate
The Laravel5-GoMyPay is open-sourced software licensed under the MIT license., (*13)