square_client = new SquareClient([ 'accessToken' => $access_token, 'environment' => getenv('ENVIRONMENT') ]); $location = $this->square_client->getLocationsApi()->retrieveLocation(getenv('SQUARE_LOCATION_ID'))->getResult()->getLocation(); $this->location_id = $location->getId(); $this->currency = $location->getCurrency(); $this->country = $location->getCountry(); } public function getCurrency() { return $this->currency; } public function getCountry() { return $this->country; } public function getId() { return $this->location_id; } } $location_info = new LocationInfo(); ?>