Quote Originally Posted by todoonada View Post
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).
  • glad you got it figured out.
  • you seem like a smart guy. i know you can figure out other things associated with the module and any problems you may encounter.
  • my apologies that i have not uploaded a new version of this software. i do have those changes in my latest version. i just have a number of other things on my plate that need to get done prior to doing any updates.
  • please note that the current version will NOT work with php 8.2.
  • it will also NOT work with php 8.1.


best.