PHP code example of gmo-ecs / gmo-pg

1. Go to this page and download the library: Download gmo-ecs/gmo-pg library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

gmo-ecs / gmo-pg example snippets


SITE_ID="{$SITE_ID}"
SITE_PASS="{$SITE_PASS}"
SHOP_ID="{$SHOP_ID}"
SHOP_PASS="{$SHOP_PASS}"
GMO_PAYMENT_URL="{$GMO_PAYMENT_URL}"

use Ecs\GmoPG\Services\MemberCardService;

resolve(MemberCardService::class)
    ->searchCard([
        'MemberID' => $gmoMemberId
    ]);

[
    "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"
]

[
    "ErrCode" => "E01|E01"
    "ErrInfo" => "E01390002|E01240002"
    "errors" => array:2 [
        "E01390002" => "指定されたサイト ID と会員 ID の会員が存在しません。"
        "E01240002" => "指定されたカードが存在しません。"
    ]
]
shell
php artisan vendor:publish --provider="Ecs\GmoPG\Providers\GmoPGServiceProvider"