If this is your first visit, check our documentation. To post, register or login.
Forums / Community Contributed Add-Ons / Addon Payment Modules / Square WebPay support thread.

Square WebPay support thread.

Started by carlwhat on 6 Apr 2022, 6:02 PM · Views: 129,956

Results 681 to 700 of 808
15 Jun 2024, 8:16 AM
#681
brittainmark avatar

brittainmark

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\

15 Jun 2024, 1:44 PM
#682
jeking avatar

jeking

Totally Zenned

Join Date:
Oct 2005
Location:
Chicago, IL USA
Posts:
1,592
Plugin Contributions:
0

Re: Square WebPay support thread.

BigB:

This is interesting and thought I would share... I have this error message in the back end of my ZenCart v2.0.1 install that reads:
ERROR: module not loaded due to missing language file: /home/mydirectory/siteurl.com/includes/languages/english/modules/payment/autoload.php

Is this a Zen Cart file that should have been installed with the Zen Cart v2.0.1 setup? I have checked the path with files for upload for the webPay module and the only file there for FTP/Upload to this location is the file "Square_webPay.php...
Is this a problem with why I am not able to authorize the module or perhaps something altogether different? Thanks for any help with this. I looked through the thread and didn't see anything about this...

Not a lot of help, but that missing file is not a Zen Cart 2.0.1 file. It's also not the right type of file name for a language file which makes me think something else is wrong.

Did this error first occur after installing this module? Maybe you uploaded some files to the wrong folders?? Try uninstalling and re-installing the plugin.

Jim
Wheaton Website Services

15 Jun 2024, 2:04 PM
#683
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,760
Plugin Contributions:
56

Re: Square WebPay support thread.

It sounds like you have a file called

includes/modules/payment/autoload.php

which, as @Jeking says, shouldn't be there.

There is a file called

includes/modules/payment/square_webPay/autoload.php

If you tried to upload your files one by one (never a good idea), perhaps you did this one incorrectly.

Clean up includes/modules/payment and then reinstall Square Webpay.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

15 Jun 2024, 4:09 PM
#684
bigb avatar

bigb

New Zenner

Join Date:
Jun 2024
Posts:
91
Plugin Contributions:
0

Re: Square WebPay support thread.

brittainmark:

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)

I'll look into these codes and files... thanks for the tips and heads up on the new pluging... If I can't wrangle this prob I'm considering pulling the trigger that...
15 Jun 2024, 4:12 PM
#685
bigb avatar

bigb

New Zenner

Join Date:
Jun 2024
Posts:
91
Plugin Contributions:
0

Re: Square WebPay support thread.

jeking:

Not a lot of help, but that missing file is not a Zen Cart 2.0.1 file. It's also not the right type of file name for a language file which makes me think something else is wrong.

Did this error first occur after installing this module? Maybe you uploaded some files to the wrong folders?? Try uninstalling and re-installing the plugin.
Honestly, I'm not sure when that error messsgae showed up... I haden't noticed before... but all the sudden it was there... I have un-installed and re-installed the plugin... the error code remains... it shows in the modules section of the site's back-end/admin area where one activates/de-activates payment plugins...

15 Jun 2024, 4:23 PM
#686
bigb avatar

bigb

New Zenner

Join Date:
Jun 2024
Posts:
91
Plugin Contributions:
0

Re: Square WebPay support thread.

swguy:

It sounds like you have a file called

includes/modules/payment/autoload.php

which, as @Jeking says, shouldn't be there.

There is a file called

includes/modules/payment/square_webPay/autoload.php

If you tried to upload your files one by one (never a good idea), perhaps you did this one incorrectly.

Clean up includes/modules/payment and then reinstall Square Webpay.
I did FTP the module's contents and followed the correct paths for files and folder upload/creation etc... I'll go back in to cPanel and take another look in there via File Manager... I don't recall seeing a file named* square_webPay/autoload.php*... the only file I have for upload to that location is the Square_webPay.php file...

15 Jun 2024, 5:01 PM
#687
bigb avatar

bigb

New Zenner

Join Date:
Jun 2024
Posts:
91
Plugin Contributions:
0

Re: Square WebPay support thread.

OK... from what I can see there seems to be the possibilty of a discrepency in File & Folder path structure with Zen Cart v2.0.1 and previous versions...
In the module package for FTP to the includes section... there are two distinct folder & file paths...

The 1st path: includes/languages/english/modules/payment/xxxx.php file etc...
The 2nd path:
includes/modules/payment/square_webPay/autoload.php
--> according to Zen Cart v2.1.0 error massage... THIS is where the "missing" file is located...

the Zen Cart error code I have right now in the admin of my v2.0.1 installation reads:
ERROR: module not loaded due to missing language file: /home/brian670/guitarcourses.briankguitar.com/includes/languages/english/modules/payment/autoload.php

This is clearly a different path than what the package states... Now... I'm not sure about how to go further to correct the issue... perhaps simply "copy" the autoload.php file over to the other location?... or perhaps this will create even further issues?... :eek:

15 Jun 2024, 6:51 PM
#688
brittainmark avatar

brittainmark

Totally Zenned

Join Date:
Apr 2009
Posts:
509
Plugin Contributions:
1

Re: Square WebPay support thread.

I think you just have a file in includes/modules/payment/ called "autoload.php" I would copy it down to your local machine and delete the file on the server. See if that is the issue. If it is you might get a clue as to where it belongs / has come from by looking in the file.

Mark Brittain
http:\innerlightcrystals.co.uk\sales\

15 Jun 2024, 10:59 PM
#689
bigb avatar

bigb

New Zenner

Join Date:
Jun 2024
Posts:
91
Plugin Contributions:
0

Re: Square WebPay support thread.

brittainmark:

I think you just have a file in includes/modules/payment/ called "autoload.php" I would copy it down to your local machine and delete the file on the server. See if that is the issue. If it is you might get a clue as to where it belongs / has come from by looking in the file.

When I go to the path location where the error massage says the file is missing... it is indeed missing... it was never uploaded to that location... there is no autoload.php file in there... which makes sense..
As per the Square WebPay module's FTP files and folder structure it shouldn't be there however for the path you are referring to... yes that file DOES exist there...I have it there in my install for the module on the server for my site...

What I'm trying to figure out right now is why the error message telling me that there should be an autoload.php file in the location it specifies... it does appear to be a very direct error to this location.. but, the module doesn't say to put that file at the end of the includes/languages/english/modules/payment/xxxx.php path... it wants the file at the end of the * includes/modules/payment/square_webPay/autoload.php * path....

Are you suggesting I should remove the current autoload.php file out of where it is supposed to be.... see if the error code goes away... and then perhaps re-upload the file?...

16 Jun 2024, 12:40 AM
#690
jodean avatar

jodean

Totally Zenned

Join Date:
May 2011
Location:
Tennessee
Posts:
511
Plugin Contributions:
0

Re: Square WebPay support thread.

I just installed Square WebPay but it does not display as an payment option in check out. Snippets of examples attached.

16 Jun 2024, 2:40 PM
#691
bigb avatar

bigb

New Zenner

Join Date:
Jun 2024
Posts:
91
Plugin Contributions:
0

Re: Square WebPay support thread.

jodean:

I just installed Square WebPay but it does not display as an payment option in check out. Snippets of examples attached.
Have you looked into PayPal Express Checkout policies... It is an activated option in your payment modules.. maybe that negates another choice during checkout?

16 Jun 2024, 2:48 PM
#692
bigb avatar

bigb

New Zenner

Join Date:
Jun 2024
Posts:
91
Plugin Contributions:
0

Re: Square WebPay support thread.

BigB:

When I go to the path location where the error massage says the file is missing... it is indeed missing... it was never uploaded to that location... there is no autoload.php file in there... which makes sense..
As per the Square WebPay module's FTP files and folder structure it shouldn't be there however for the path you are referring to... yes that file DOES exist there...I have it there in my install for the module on the server for my site...

What I'm trying to figure out right now is why the error message telling me that there should be an autoload.php file in the location it specifies... it does appear to be a very direct error to this location.. but, the module doesn't say to put that file at the end of the includes/languages/english/modules/payment/xxxx.php path... it wants the file at the end of the * includes/modules/payment/square_webPay/autoload.php * path....

Are you suggesting I should remove the current autoload.php file out of where it is supposed to be.... see if the error code goes away... and then perhaps re-upload the file?...

I think the big booger in the room boils down to this... why am I getting an error code for a missing file in a location that that file is not supposed to be in the first place? It deosn't make sense :no:

Are there version changes with ZC v2.0.1 that arre so drastically different it requires a different "structure" to file placements for the module?... This is a real conundrum... has anyone else experienced this trying to use this module in ZC 2.0.1?....

16 Jun 2024, 4:21 PM
#693
bigb avatar

bigb

New Zenner

Join Date:
Jun 2024
Posts:
91
Plugin Contributions:
0

Re: Square WebPay support thread.

Aside from the error about the missing languages auotoload.php file that's not supposed to be in there to begin with.... my Admin logs display this error:
*PHP Fatal error: Uncaught Error: Class "Unirest\Request" not found in /includes/modules/payment/square_webPay/square/square/src/Apis/BaseApi.php:64
Stack trace:
#0 /includes/modules/payment/square_webPay/square/square/src/Apis/OAuthApi.php(22): Square\Apis\BaseApi->__construct()
#1 /includes/modules/payment/square_webPay/square/square/src/SquareClient.php(327): Square\Apis\OAuthApi->__construct()
#2 /includes/modules/payment/square_webPay.php(733): Square\SquareClient->getOAuthApi()
#3 /squareWebPay_handler.php(33): square_webPay->exchangeForToken()
#4 {main}
thrown in /includes/modules/payment/square_webPay/square/square/src/Apis/BaseApi.php on line 64
*

I see it repeatedly... I have no idea what to be looking for on line 64 of this file... any ideas?

16 Jun 2024, 4:33 PM
#694
billj avatar

billj

New Zenner

Join Date:
Sep 2013
Location:
Devon, UK
Posts:
88
Plugin Contributions:
1

Re: Square WebPay support thread.

BigB:

OK... from what I can see there seems to be the possibilty of a discrepency in File & Folder path structure with Zen Cart v2.0.1 and previous versions...
In the module package for FTP to the includes section... there are two distinct folder & file paths...

The 1st path: includes/languages/english/modules/payment/xxxx.php file etc...
The 2nd path:
includes/modules/payment/square_webPay/autoload.php
--> according to Zen Cart v2.1.0 error massage... THIS is where the "missing" file is located...

the Zen Cart error code I have right now in the admin of my v2.0.1 installation reads:
ERROR: module not loaded due to missing language file: /home/brian670/guitarcourses.briankguitar.com/includes/languages/english/modules/payment/autoload.php

This is clearly a different path than what the package states... Now... I'm not sure about how to go further to correct the issue... perhaps simply "copy" the autoload.php file over to the other location?... or perhaps this will create even further issues?... :eek:

Each file in includes/modules/payment (but not subdirectories of that directory) is assumed to be a payment module. If the file autoload.php is in that directory, Zen Cart will try to load it as a payment module and in doing so, will also look for a language file with the same name as the "payment module" file, i.e. autoload.php. The "missing" file (which is not actually missing) is a consequence of having that spurious file in the includes/modules/payment directory. Move it to where it should be and Zen Cart will no longer go looking for a matching language file and things should become a lot less confusing.

16 Jun 2024, 5:00 PM
#695
jodean avatar

jodean

Totally Zenned

Join Date:
May 2011
Location:
Tennessee
Posts:
511
Plugin Contributions:
0

Re: Square WebPay support thread.

I currently use PayPal since PayPal no longer allows Quest check out with a credit card and replacing PayPal with Square Web Pay. I tried turning off PayPal and Square still does not display as a payment option.

16 Jun 2024, 6:06 PM
#696
bigb avatar

bigb

New Zenner

Join Date:
Jun 2024
Posts:
91
Plugin Contributions:
0

Re: Square WebPay support thread.

BillJ:

Each file in includes/modules/payment (but not subdirectories of that directory) is assumed to be a payment module. If the file autoload.php is in that directory, Zen Cart will try to load it as a payment module and in doing so, will also look for a language file with the same name as the "payment module" file, i.e. autoload.php. The "missing" file (which is not actually missing) is a consequence of having that spurious file in the includes/modules/payment directory. Move it to where it should be and Zen Cart will no longer go looking for a matching language file and things should become a lot less confusing.

OK... I'll move that file into includes/languages/english/modules/payment/autoload.php
From what you're saying I'm wondering if I should simply "copy" it over there but, I'll give the file move a go and see what shakes... :cheers:

16 Jun 2024, 6:34 PM
#697
billj avatar

billj

New Zenner

Join Date:
Sep 2013
Location:
Devon, UK
Posts:
88
Plugin Contributions:
1

Re: Square WebPay support thread.

BigB:

OK... I'll move that file into includes/languages/english/modules/payment/autoload.php
From what you're saying I'm wondering if I should simply "copy" it over there but, I'll give the file move a go and see what shakes... :cheers:
Move it. If you copy it you'll still have the file in the modules/payment directory that is causing the problem.

16 Jun 2024, 7:08 PM
#698
bigb avatar

bigb

New Zenner

Join Date:
Jun 2024
Posts:
91
Plugin Contributions:
0

Re: Square WebPay support thread.

BigB:

OK... I'll move that file into includes/languages/english/modules/payment/autoload.php
From what you're saying I'm wondering if I should simply "copy" it over there but, I'll give the file move a go and see what shakes... :cheers:

This was an adventure... so.. I move the autoload.php file over to includes/languages/english/modules/payment/autoload.php and I lost every payment module except for the two Authorize.net modules... being as this has happened... I figured I would try "copying" the file back over to whence it came (I figure why not, right?...)... all the payment modules re-appear EXCEPT for the Sqaure webPay :lol:

So I then decided to just place the autoload.php file back where it was at includes/languages/english/modules/payment/autoload.php and... the Square WebPay module re-appears again with all the other payment modules... go figure... :rotflmao:

16 Jun 2024, 7:18 PM
#699
bigb avatar

bigb

New Zenner

Join Date:
Jun 2024
Posts:
91
Plugin Contributions:
0

Re: Square WebPay support thread.

BigB:

This was an adventure... so.. I move the autoload.php file over to includes/languages/english/modules/payment/autoload.php and I lost every payment module except for the two Authorize.net modules... being as this has happened... I figured I would try "copying" the file back over to whence it came (I figure why not, right?...)... all the payment modules re-appear EXCEPT for the Sqaure webPay :lol:

So I then decided to just place the autoload.php file back where it was at includes/languages/english/modules/payment/autoload.php and... the Square WebPay module re-appears again with all the other payment modules... go figure... :rotflmao:
Back where it was at includes/modules/payment/autoload.php that is... :lamo:

16 Jun 2024, 8:50 PM
#700
billj avatar

billj

New Zenner

Join Date:
Sep 2013
Location:
Devon, UK
Posts:
88
Plugin Contributions:
1

Re: Square WebPay support thread.

BigB:

This was an adventure... so.. I move the autoload.php file over to includes/languages/english/modules/payment/autoload.php
Sorry, I had missed earlier that you said that's where you were planning to move it to. That's the wrong place.
It needs to go in includes/modules/payment/square_webPay/autoload.php.
That's where it is in the module directory structure as it comes in the zip file. i.e. one level down from where you have it at the moment. Unzip the file you downloaded and browse the directories in it to see what I mean.

The mention of the "missing" language file (that doesn't exist and shouldn't exist) is simply a consequence of Zen Cart trying to make sense of the misplaced file.