Install without composer

Hello I’m trying to install the Square SDK PHP, without composer, I’m just downloading the SDK unzip the files and using the autoload.php, however I got two errors

Notice: Undefined variable: matchingPrefix in C:\wamp\www\squareapi\vendor\autoload.php on line 42

Fatal error: Interface ‘CoreInterfaces\Http\HttpConfigurations’ not found in C:\wamp\www\squareapi\square\ConfigurationInterface.php on line 12

This is in my test enviroment, however I tried on a ubuntu server, without composer and the same errors.

Sorry if this is a Newbie question. I Just need to get the customer list from square in real time. Dont know if there is any other alternative.

Thank you for any help

When you setup the SDK did you bring in all the dependencies as outlined in the manual setup. To do this, you must first clone these PHP source code packages from GitHub:

Next, you need to provide an autoload script (autoload.php) so that your application can easily access the PHP source code packages at runtime. The Square PHP SDK provides the following example autoload script:

You can download this file, rename it to autoload.php, and use it as is. You can also customize the script to suit your needs.

In your application code, add a require statement to run the autoload script. After that, you are able to use any of the Square PHP SDK classes. For example:

  • 1
  • 2
  • 3
require 'autoload.php';

use Square\SquareClient;


I’m pretty sure that is a silly error, but I cand find the problem.
This my dir structure and the autoload file

And this is the error:
Fatal error: Uncaught Error: Interface ‘CoreInterfaces\Http\HttpConfigurations’ not found in /var/www/vhosts/ Stack trace: #0 /var/www/vhosts/ require() #1 [internal function]: {closure}() #2 /var/www/vhosts/ spl_autoload_call() #3 /var/www/vhosts/ require(‘/var/www/vhosts…’) #4 [internal function]: {closure}() #5 /var/www/vhosts/ spl_autoload_call() #6 {main} thrown in /var/www/vhosts/ on line 12

I tried to reupload all the files from the repository but nothing.

Thanks again for your help.

Same exact issue here…

@Bryan-Square This class/file doesn’t exist in the files we are instructed to manually bring over, despite your copying the instructions for us again. I’m also having this issue - please find out where we can pull the file from and report back.

@antonybasta @lagarto
I believe I got it. You’ll also need to clone the files in these repos: GitHub - apimatic/core-interfaces-php: Definition of the behavior of core-lib-php, unirest-php and APIMatic's PHP SDK and GitHub - apimatic/core-lib-php: Core logic and the utilities for the APIMatic's PHP SDKs and update your autoload file accordingly.

One more set of “instructions” Square has that covers about 90% of the necessary information. Really getting annoyed with that. :roll_eyes:

Thankyou @amanda.knickelbein after install that two repos, I got some improvement, so definitily that will help, but now I got this error
" Fatal error: Uncaught TypeError: Square\BearerAuthManager::__construct(): Argument #1 ($accessToken) must be of type string, bool given, called in C:\wamp64\www\square1\square-php-sdk\src\SquareClient.php on line 154 and defined in C:\wamp64\www\square1\square-php-sdk\src\BearerAuthManager.php on line 22"

getting error because file does not exist’s is there any file named as HttpConfigurations.
i need this file please help. getting error :

Fatal error: Uncaught Error: Interface "src\Http\HttpConfigurations" not found in C:\xampp\htdocs\squarepg\sqare\square-php-sdk\src\ConfigurationInterface.php:15
Stack trace:
#0 C:\xampp\htdocs\squarepg\sqare\square-php-sdk\example-autoload.php(58): require()
#1 C:\xampp\htdocs\squarepg\sqare\square-php-sdk\src\SquareClient.php(57): {closure}(‘Square\Configur…’)
#2 C:\xampp\htdocs\squarepg\sqare\square-php-sdk\example-autoload.php(58): require(‘C:\xampp\htdocs…’)
#3 C:\xampp\htdocs\squarepg\process-payment3.php(19): {closure}(‘Square\SquareCl…’)
#4 {main}
thrown in C:\xampp\htdocs\squarepg\sqare\square-php-sdk\src\ConfigurationInterface.php on line 15

I see you posted in a few threads. Is this with our PHP example or just the Web Payments SDK with a PHP backend? Are you using Composer? :slightly_smiling_face: