The errors
Code:
PHP Deprecated: Creation of dynamic property square_webPay::$token
etc. are because these variable have not been declared in /includes/modules/payment/square_webPay.php
If you add a lines
Code:
public $order_status, $gateway_currency;
protected $token, $client, $oauthClient, $_logDir, $sdkApiVersion, $_check;
to /includes/modules/payment/square_webPay.php near where you see the other definitions.
The error
Code:
PHP Deprecated: Return type of Square\Models\Location::jsonSerialize(bool $asArrayWhenEmpty = false) should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /includes/modules/payment/square_webPay/square/square/src/Models/Location.php on line 807.
is telling you what you need to do.
in /includes/modules/payment/square_webPay/square/square/src/Models/Location.php
Add
Code:
#[\ReturnTypeWillChange]
before each function decleration in that module.
I think the last error is created because the earlier module failed. If not you would have to change the php in /includes/modules/pages/checkout_payment/jscript_square_webPay.php
Code:
addressLines: ['<?= addslashes($order->billing['street_address'] ?? ''); ?>', '<?= addslashes($order->billing['suburb'] ?? ''); ?>'],
You may have to do this for all the addslashes commands in this file.
As an alternative you could buy the later version from https://mxworks.cc/?product=zen-cart...in-for-php-8-x
Bookmarks