Square-php-sdk error

Testing in sandbox getting following error:
Unexpected token ‘T’, “Table 'you”… is not valid JSON in v1/square.js

everything worked fine yesterday but today i get this error.

What am I missing?

Is the access token correctly configured? Also what are the steps to reproduce this? :slight_smile:

Yes, I’ve checked the access token several times.
I have 1 item in the cart, then I call my checkout file to enter the card info. Up to that point everything looks fine. I key in card number 4111… and the rest of the info then click “Pay with Card” and then get the console error. Here is the file I use:

<?php require 'vendor/autoload.php'; include 'utils/location-info.php'; use Square\Environment; use Ramsey\Uuid\Uuid; // dotenv is used to read from the '.env' file created for credentials $dotenv = Dotenv\Dotenv::create(__DIR__); $dotenv->load(); // Pulled from the .env file and upper cased e.g. SANDBOX, PRODUCTION. $upper_case_environment = strtoupper('SANDBOX'); $web_payment_sdk_url = $_ENV["ENVIRONMENT"] === Environment::SANDBOX ? "https://sandbox.web.squarecdn.com/v1/square.js" : "https://web.squarecdn.com/v1/square.js"; ?> My Payment Flow figure { float: left; clear: left; width: 40%; margin-left: 100px; margin-bottom: : 20px auto; display: flex; justify-content: center;

}
.wrapper {
width: 100%;
margin-top: -50px;
border: inset medium rgba(215,180,94,1.00);
background-color: rgba(249,249,181,1.00);
padding: 10px;
border-radius: 20px;
}
#card-button {
width: 80%;
background-color: aquamarine;
border: inset thick rgba(151,151,151,1.00);
border-radius: 20px;
font-size: 16px;
font-weight: 900;
}

</style>
<div class="wrapper">
	<h2 align="center">Enter your card information Below</h2>
		<figure><img src="images/square-credit-card-logos.png" width="350" height="90" alt=""/></figure>
  <div id="card-container"></div><button id="card-button" type="button">Pay with Card</button>
  <span id="payment-flow-message"></span>
</div>
If you need the process-payment file let me know

Bryan,
Some of the code is missing in my las post. Here is the complete code:

<?php require 'vendor/autoload.php'; include 'utils/location-info.php'; use Square\Environment; use Ramsey\Uuid\Uuid; // dotenv is used to read from the '.env' file created for credentials $dotenv = Dotenv\Dotenv::create(__DIR__); $dotenv->load(); // Pulled from the .env file and upper cased e.g. SANDBOX, PRODUCTION. $upper_case_environment = strtoupper('SANDBOX'); $web_payment_sdk_url = $_ENV["ENVIRONMENT"] === Environment::SANDBOX ? "https://sandbox.web.squarecdn.com/v1/square.js" : "https://web.squarecdn.com/v1/square.js"; ?> My Payment Flow
<div class="wrapper">
	<h2 align="center">Enter your card information Below</h2>
		<figure><img src="images/square-credit-card-logos.png" width="350" height="90" alt=""/></figure>
  <div id="card-container"></div><button id="card-button" type="button">Pay with Card</button>
  <span id="payment-flow-message"></span>
</div>