I have been successful up to this point integrating PHP Payments into my website. I ran a test payment earlier today and got several successful payment messages. Now all of a sudden I get a syntax error when I try a test payment. See the screenshot from my developer tools:
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.
The error message you’re seeing is a syntax error, which means there’s an issue with the code you’re using. This could be due to a variety of reasons such as a missing bracket, incorrect use of a function, or a typo in your code. It’s hard to provide a specific solution without seeing the actual code, but I would recommend going back to the section of your code where you’re handling the payment process and carefully checking for any syntax mistakes.
If you’re using square.js from some other location, it may be corrupted (or not even meant for square) which can cause the errors such as the one you see.