Closed vintagetwinmike closed 1 year ago
Hey, thanks for the kind words. It motivates me to get back in and work on this package again!
Yep, so the issue there comes down to PHP version. Prior to PHP 7.1, it was not possible to use an associative array with the PHP list() function. It only supported numerical arrays in prior versions.
Certain parts of the package use syntax from > PHP 7.1, so if you intend to use the whole package, I suggest upgrading your version. Otherwise, if you only wanted the Auth and got it all working, that's good to hear!
Thanks man, I figured it would be a php version issue. Was not aware associative array support was added. I suppose it's time for me to upgrade and get caught up. Yeah, everything is working on the authentication side of things, which is all I really needed. Greatly appreciate the response and the code! Definitely keep working on it, I think it will be a great help to a lot of folks now that Etsy is finally approving access again.
First of all, thanks for putting this together. I primarily wanted it for the Oauth2 functions because that code challenge stuff didn't make any sense to me, and seeing as it took me 2 months just for Etsy to grant me API access, I didn't feel like wasting more time trying to figure out how to just get a damn access token from their friggin API!
Everything worked until the access/refresh token name/values were passed back. So I had to change this: return [ 'access_token' => $response->access_token, 'refresh_token' => $response->refresh_token ];
to this: return [ $response->access_token, $response->refresh_token ];
Otherwise this doesn't work: [$access_token, $refresh_token] = $client->requestAccessToken($....
Just returning the values without the names worked as expected.