in reviewing this thread, i can say that you doing something unsupported. from the download page:

- Version 1.0.0 use SDK version: 17.2.0.20220216. According to square, this SDK requires php 7.4 - php 8.0.
- I have successfully used it using php 7.3 and zen-cart v1.5.6.
- You are welcome to use it as you see fit; I have only tested it for zc156 and zc157.
so this module is not ready for v2.x.

some of the notices you are getting seem to indicate your php version is greater than 8.0.

your problems arise from running code that is not meant to run together.

as the quote states above, you are welcome to use it as you see fit; but clearly the problems arise from incompatible versions.

that said, there seems to be plenty of helpful suggestions on this thread from numerous individuals.

best.