SQUARE web payments api shows error "square.js:1 Unexpected token '<', "<br /> <b>"... is not valid JSON"

Hi,
I am using SQUARE web payments API and getting this error.
“square.js:1 Unexpected token ‘<’, “

”… is not valid JSON”.
on line having following code ,

$data = json_decode(file_get_contents(‘php://input’), true);

Please help.
Thanks.

Is this with one of our examples? Looks like the request to CreatePayment isn’t valid JSON. :slightly_smiling_face:

I am also getting same issue using php javascript.
error : square.js:1 Unexpected token ‘<’, “

”… is not valid JSON

Is this with our PHP example or just the Web Payments SDK with a PHP backend? :slightly_smiling_face: