Hi, firstly thank you Carl for creating this (and to all the others on here who give their time generously, it is appreciated by amateurs like me!). I assist a friend with his site, I set it up around ten years ago and we have done a couple of upgrades so are now on the lovely ZC1.5.8a on PHP8.1 and mySQL5.7
So, i have installed the latest download of Square WebPay (1.04), now incase it helps anyone else Square seem to have updated how you get the API side setup, incase it helps anyone else, it is now slightly hidden, you have to go in to Developer ("Sqaure Developer"), if you don't have any existing app integrations this is tricky to find (unless i am just a bit thick :)
On the **Dashboard **menu onthe left, look for **Settings **at the bottom, then App Integrations. This will be empty apart from some featured apps and a big blue button to Visit app Marketplace, choose this, but then on the new page in the menu at the top choose the "More" drop down menu then choose "Square Developer".
Now, those notes make reference to Version 1.0.1 of Square Web Payments requires API Version 2022-02-16, so my first question is, "Is this still true for version 1.0.4 of the SquareWebPay module? Or should I just leave it on the latest which it defaults to? (which is 16 versions ahead so this seems unlikely).
Second question (sorry!) in the help files it makes reference to a change made in version 1.02 to cope with ZC website that are in a subfolder (ours is). It mentions properly defining in the config file the "DIR_WS_HTTPS_CATALOGUE constant", now we haven't, we haven't needed to so far, the notes in those files seem to suggest it will be autodetected so ours say:
define('DIR_WS_CATALOG', '/');
define('DIR_WS_HTTPS_CATALOG', '/');
Now there is a problem with the install as SquareWebPay is not showing up in the Admin - Modules sections and none of the others have the usual options to install/edit (and were all fine dyas ago!) so there is an issue with what i have done. I have checked and all the files are uploaded to the correct folders.
Is is down to this missing folder definition? To test this I made the change in both files (configure.php in both admin and store) - but only those two lines and it broke the site! the edits were:
define('DIR_WS_CATALOG', '/JPV3/');
define('DIR_WS_HTTPS_CATALOG', '/JPV3');
(the store is in a folder called JPV3) - i have now changed it back and its working fine. Now i believe these are added to the https info and so maybe i just needed to reissue/renew the SSL cert? Not sure...
I did turn on admin logging and saw this in a log file:
PHP Fatal error: Uncaught Error: Class "Square\Environment" not found in /homepages/7/d456783090/htdocs/JPV3/includes/modules/payment/square_webPay.php:107
Does that help anyone point me in the right direction?
Any and all help greatly appreciated as I was hoping this would be plug and play but it hasnt been smooth so far :(
Thanks, George