It’s here where CreatePayment
is being called. Somehow the request body that’s being sent to Square is malformed and isn’t valid JSON which is causing the error. If you print it you can check the JSON. Or json_encode
it again prior to sending it to Square.