Skip to content

Instantly share code, notes, and snippets.

@tristansokol
Created January 29, 2018 19:13
Show Gist options
  • Save tristansokol/8f1978e87e3607ef759ce6bca175ae32 to your computer and use it in GitHub Desktop.
Save tristansokol/8f1978e87e3607ef759ce6bca175ae32 to your computer and use it in GitHub Desktop.
<?php
require_once('./connect-php-sdk-master/autoload.php');
// Configure OAuth2 access token for authorization: oauth2
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$api_instance = new SquareConnect\Api\LocationsApi();
try {
$result = $api_instance->listLocations();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling LocationsApi->listLocations: ', $e->getMessage(), PHP_EOL;
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment