gmo-ecs / gmo-pg
Core Gmo Payment Services
v2.0
2024-01-09 15:47 UTC
Requires
- php: ^7.3|^8.0
- guzzlehttp/guzzle: ^7.1
This package is auto-updated.
Last update: 2025-04-09 19:19:16 UTC
README
Core Gmo Payment Services
Installation
Require this package with composer.
composer require gmo-ecs/gmo-pg
Copy the package config to your local config with the publish command
php artisan vendor:publish --provider="Ecs\GmoPG\Providers\GmoPGServiceProvider"
Setup .env
SITE_ID="{$SITE_ID}" SITE_PASS="{$SITE_PASS}" SHOP_ID="{$SHOP_ID}" SHOP_PASS="{$SHOP_PASS}" GMO_PAYMENT_URL="{$GMO_PAYMENT_URL}"
Example
- Call function
use Ecs\GmoPG\Services\MemberCardService; resolve(MemberCardService::class) ->searchCard([ 'MemberID' => $gmoMemberId ]);
- If success
[ "CardSeq" => "0|1" "DefaultFlag" => "0|0" "CardName" => "|" "CardNo" => "411*********1113|411*********1111" "Expire" => "2305|2305" "HolderName" => "NGUYEN VAN A|NGUYEN VAN A" "DeleteFlag" => "0|0" ]
- If errors
[ "ErrCode" => "E01|E01" "ErrInfo" => "E01390002|E01240002" "errors" => array:2 [ "E01390002" => "指定されたサイト ID と会員 ID の会員が存在しません。" "E01240002" => "指定されたカードが存在しません。" ] ]
Note
- You can change or add new error messages in the file
resources/lang/ja/gmopg-errors.php
- You can add new configuration about gmopg in file
config/gmopg.php