Hello carlwhat,
about thePHP Fatal error: Uncaught Error: Class "Square\Environment" not found in /home/tim/zencartNewSisa/zencart1.5.7/includes/modules/payment/square_webPay.php:105
error:
When I uploaded the files for WebPay, I was already on PHP 8.0. I switched the version of PHP several times (8.0 to 7.4 and back and forth). Then I saw that the error message changed while on PHP 8.0. It was
Use of undefined constant MODULE_PAYMENT_SQ_WEBPAY_TESTING_MODE - assumed 'MODULE_PAYMENT_SQ_WEBPAY_TESTING_MODE'
now. The WebPay module still did not show up in the payment modules.
I then applied the code you gave here
https://www.zen-cart.com/showthread....47#post1388847
and the module showed up under PHP 8.0.
I got exactly the same files/code running on my local server. On my local server I run PHP 8 and I can not change between PHP 8 and 7. The module still is not showing up on my local server. No files missing. Same files like on my live server.
Now it looks like uploading the files under PHP 8 caused the problem. Uploading the files under PHP 7 and the upgrading to PHP 8 worked (after applying your changed code).
Bookmarks