Is the payment example up to date

Not quite working, but making progress. I was sidelined for some days working on another project now back on this case. I had an interesting time getting ssl security working on my windows localhost testing environment. I now do not get the message that square requires to be accessed from a htpps url, good security, but it would be good for easy testing if that requirement were relaxed when accessing sandbox. I am now getting the following error.

Fatal error: Uncaught Error: Call to a member function getLocation() on array in D:\Program Files\Apache Software Foundation\Apache2.4\htdocs\square\utils\location-info.php:31 Stack trace: #0 D:\Program Files\Apache Software Foundation\Apache2.4\htdocs\square\utils\location-info.php(50): LocationInfo->__construct() #1 D:\Program Files\Apache Software Foundation\Apache2.4\htdocs\square\index.php(4): include(‘D:\Program File…’) #2 {main} thrown in D:\Program Files\Apache Software Foundation\Apache2.4\htdocs\square\utils\location-info.php on line 31

When I look at the line of code referenced, I cannot see any syntax errors. The line is

$location = $this->square_client->getLocationsApi()->retrieveLocation(getenv(‘SQUARE_LOCATION_ID’))->getResult()->getLocation();

It is obviously access the contents of my .env file where the content for the location entry is

SQUARE_LOCATION_ID=Australia

Is this incorrect. When I accessed the sandbox credentials I did not see the term location used, just country.

My feeling is that this may be a PHP release level issue.