<?php

include '../vendor/autoload.php';
$server = ['id' => 'xxxxxx', 'token' => 'abcdef'];
$ms = new SquareMS\Api($server['id'], $server['token']);
$profile = $ms->getUser();
if (is_array($profile)) {
    echo "!> SquareMS Profile info: \n";
    echo "Name:          {$profile['name']} \n";
    echo "Username:      {$profile['username']} \n";
    echo "Email:         {$profile['email']} \n";
    echo "Age:           {$profile['age']} \n";
    echo "Register time: {$profile['registerTime']} \n";
} else {
    echo "!> Error getting SquareMS Profile Info \n";
}