Totally Zenned
- Join Date:
- Apr 2009
- Posts:
- 509
- Plugin Contributions:
- 1
Square WebPay support thread.
The errors ```
PHP Deprecated: Creation of dynamic property square_webPay::$token
If you add a lines
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
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
#[\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
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-square-plugin-for-php-8-x](https://mxworks.cc/?product=zen-cart-square-plugin-for-php-8-x)
Mark Brittain
http:\innerlightcrystals.co.uk\sales\