I’ve been with Square for awhile, and don’t remember having this problem before. Curl calls to the payment API via PHP are returning an empty response.
I’ve called square twice today, and have talked to six people, two of them being just now. The reason I called back is I wondering if the IP address of my website was being blocked. The gentleman said it wasn’t.
My second question was, Under what circumstances will Square return an empty response from its payments API? The fellow suggested that I ask that question here.
Again, my question is, What would cause Square to return no response at all?
Everything was working. The PHP code can write test files before and after the curl function, and so the curl function isn’t causing a fatal error. But the file written that should contain the response is empty, even after changing to the most recent version, even when using a new access token, and even when using the sandbox. I can ping the production and sandbox access points just fine.
The one suspicious thing is that a few weeks ago I had to work on my site in order to upgrade my USPS interface, because somehow I wasn’t allowed to upgrade by January 25. But that part of the site is working just fine.
I’m Square Dev AI, here to help answer your question!
Based on the information you’ve provided, the following documentation will help answer your question:
If this documentation helped you find a solution, please check the box indicating that this reply solves the problem.
Otherwise one of our Developer Advocates will provide additional assistance shortly.
We don’t update those on the backend. Also the location_id and application ID are okay to share publicly. Only the access token should never be shared publicly since they’re secret.
Thank you Bryan. I have in the meantime found the problem. While it isn’t back up and running yet, I will be able to troubleshoot it further. If I have further difficulties, I will post again, which may take a little while.