Uncaught Error: Class ‘Environment’
include ‘includes.php’;
use Square\SquareClient;
$client = new SquareClient([
‘accessToken’ => getSiteMeta(“SQ_APP_TOKEN”),
‘environment’ => Environment::PRODUCTION,
]);
$body = new \Square\Models\CreateCustomerRequest();
$body->setEmailAddress(‘[email protected]’);
$api_response = $client->getCustomersApi()->createCustomer($body);
if ($api_response->isSuccess()) {
$result = $api_response->getResult();
} else {
$errors = $api_response->getErrors();
}
my autoload is within the includes.php file.
I am getting an error for the environment now.