Zen Cart Logo
Forums / Addon Payment Modules / Square WebPay support thread.

Square WebPay support thread.

Views: 128,130

Results 481 to 500 of 800
07 Sep 2023, 07:16
#481
todoonada avatar

todoonada

Zen Follower

Join Date:
Nov 2006
Posts:
127
Plugin Contributions:
0

Square WebPay support thread.

todoonada:

I have version 1.0.1 of Web Pay running successfully on Zen Cart 1.5.7d.

I have set up a test environment with Zen Cart 1.5.8 and Web Pay 1.0.4. A new application for testing has been set up in Square. It is running in sandbox mode. I can not get the Web Pay module to change from yellow to green and show the the cc payment option in the shop.

Two things are different to the running version:
1: When I click Edit on the test version, there is nothing to select in the drop down box of "Location ID". But it shows a value when I am not in Edit mode. The value is different to the value in the shop which is live.
2: The new fields of "Live Merchant Token", "Square Token TTL" and "Square Refresh Token" are all empty.

I have no idea what is wrong or missing

OK, I found what the problem was. I made the Square connection for the test shop directly in sandbox mode.

To make sandbox mode work in my test environment, I changed from sandbox mode to production mode, put the new Application ID and Application Secret into Zen Cart. Activated Square. Green button near the module. Then I changed to sandbox mode again on the Square page, copied Application ID and Application Secret for the sandbox mode to Zen Cart and now I have a green button near the module and it says "sandbox mode".

07 Sep 2023, 14:54
#482
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,953
Plugin Contributions:
8

Re: Square WebPay support thread.

todoonada:

OK, I found what the problem was. I made the Square connection for the test shop directly in sandbox mode.

To make sandbox mode work in my test environment, I changed from sandbox mode to production mode, put the new Application ID and Application Secret into Zen Cart. Activated Square. Green button near the module. Then I changed to sandbox mode again on the Square page, copied Application ID and Application Secret for the sandbox mode to Zen Cart and now I have a green button near the module and it says "sandbox mode".

glad you got it figured out.

08 Sep 2023, 13:30
#483
swguy avatar

swguy

Administrator

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

Re: Square WebPay support thread.

Square is reporting some issues right now. You can monitor the service status here: https://www.issquareup.com/

08 Sep 2023, 17:28
#484
jeking avatar

jeking

Totally Zenned

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

Re: Square WebPay support thread.

I'm seeing this on a client site.

--> PHP Deprecated: Creation of dynamic property square_webPay::$oauthClient is deprecated in /home/calendars/public_html/store/includes/modules/payment/square_webPay.php on line 128.

Plugin version: 1.0.4
PHP 8.2.9
Zen Cart 1.5.8a

Is there a fix I missed?
Should we roll back to an earlier PHP version?

08 Sep 2023, 17:47
#485
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Location:
Cleethorpes
Posts:
1,230
Plugin Contributions:
3

Re: Square WebPay support thread.

Anybody know what this means?

Error Dump: [FORBIDDEN]: Cannot fetch orders for a different merchant.

Sent to Square: SquareModelsBatchRetrieveOrdersRequest Object
(
[locationId:SquareModelsBatchRetrieveOrdersRequest:private] =>
[orderIds:SquareModelsBatchRetrieveOrdersRequest:private] => Array
(
[0] => olNTbRVBlZFnRVHCOpPq3R787kLZY
)

)

08 Sep 2023, 22:25
#486
masterrusty avatar

masterrusty

Zen Follower

Join Date:
Mar 2007
Location:
Oregon
Posts:
152
Plugin Contributions:
0

Re: Square WebPay support thread.

Fields Missing

	 				 				 		 			 				
When you get to the point of entering the credit card number, expiration etc, the fields are not there.

We verified the URL, Application Code and Application Secret from the production tab on the Square Developer site and re-uploaded the module, but no go.
Also when in the Gui Admin Modules squarewebpay edit, the drop down to choose Location is not being a drop down. Can not choose location.

test.fantasycostume.com
Zen 1.5.7d
Php 7.4
SQL - 8.0.34-cll-lve
No error logs

08 Sep 2023, 23:14
#487
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,953
Plugin Contributions:
8

Re: Square WebPay support thread.

jeking:

I'm seeing this on a client site.

--> PHP Deprecated: Creation of dynamic property square_webPay::$oauthClient is deprecated in /home/calendars/public_html/store/includes/modules/payment/square_webPay.php on line 128.

Plugin version: 1.0.4
PHP 8.2.9
Zen Cart 1.5.8a

Is there a fix I missed?
Should we roll back to an earlier PHP version?

hi jim,
v 1.0.4 makes use of square SDK version: 17.2.0.20220216. This SDK requires php 7.4 - php 8.0.

the error you are seeing is from php 8.2.

you may be able to run with php 8.1; but i have not tested it.

best.

08 Sep 2023, 23:24
#488
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,953
Plugin Contributions:
8

Re: Square WebPay support thread.

Nick1973:

Anybody know what this means?

Error Dump: [FORBIDDEN]: Cannot fetch orders for a different merchant.

Sent to Square: SquareModelsBatchRetrieveOrdersRequest Object
(
[locationId:SquareModelsBatchRetrieveOrdersRequest:private] =>
[orderIds:SquareModelsBatchRetrieveOrdersRequest:private] => Array
(
[0] => olNTbRVBlZFnRVHCOpPq3R787kLZY
)

)

without seeing additional info from the logs it is hard to tell.

my guess is that some of the constants between the old square and the new square_webPay are mixed up.

the error seems pretty clear. you are trying to retrieve order information from a different merchant id. hence my guess.

but rather tough to say, and i'm pretty sure that method, lookupOrderDetails, works. else i would think i would see a lot more people with this error.

best.

08 Sep 2023, 23:31
#489
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,953
Plugin Contributions:
8

Re: Square WebPay support thread.

masterrusty:

Fields Missing

	 				 				 		 			 				
When you get to the point of entering the credit card number, expiration etc, the fields are not there.

We verified the URL, Application Code and Application Secret from the production tab on the Square Developer site and re-uploaded the module, but no go.
Also when in the Gui Admin Modules squarewebpay edit, the drop down to choose Location is not being a drop down. Can not choose location.

test.fantasycostume.com
Zen 1.5.7d
Php 7.4
SQL - 8.0.34-cll-lve
No error logs

you need to have a location set up in the square developer dashboard. without a location in that pulldown nothing will work.

you can enable logging, by changing the debug value to log always and post the contents from there when you go in from the admin. i think it should log something there.

but my guess is that you have not properly set up a location in your square dashboard. which is why it is not showing up as a pulldown.

09 Sep 2023, 12:46
#490
jeking avatar

jeking

Totally Zenned

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

Re: Square WebPay support thread.

carlwhat:

hi jim,
v 1.0.4 makes use of square SDK version: 17.2.0.20220216. This SDK requires php 7.4 - php 8.0.

the error you are seeing is from php 8.2.

you may be able to run with php 8.1; but i have not tested it.

best.

Carl,

Thanks for the explanation. 8.1 also resulted in errors, in the log not on the website, so I reverted to PHP 8.0.

Any plans to update to a newer SDK?

Thanks,
Jim

09 Sep 2023, 17:09
#491
masterrusty avatar

masterrusty

Zen Follower

Join Date:
Mar 2007
Location:
Oregon
Posts:
152
Plugin Contributions:
0

Re: Square WebPay support thread.

carlwhat:

you need to have a location set up in the square developer dashboard. without a location in that pulldown nothing will work.

you can enable logging, by changing the debug value to log always and post the contents from there when you go in from the admin. i think it should log something there.

but my guess is that you have not properly set up a location in your square dashboard. which is why it is not showing up as a pulldown.

I have locations in Square Developer. But no drop down in gui.

09 Sep 2023, 23:48
#492
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,953
Plugin Contributions:
8

Re: Square WebPay support thread.

jeking:

Carl,

Thanks for the explanation. 8.1 also resulted in errors, in the log not on the website, so I reverted to PHP 8.0.

Any plans to update to a newer SDK?

Thanks,
Jim

not at this time...

09 Sep 2023, 23:49
#493
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,953
Plugin Contributions:
8

Re: Square WebPay support thread.

masterrusty:

I have locations in Square Developer. But no drop down in gui.

are you in sandbox mode or live mode?

10 Sep 2023, 02:34
#494
masterrusty avatar

masterrusty

Zen Follower

Join Date:
Mar 2007
Location:
Oregon
Posts:
152
Plugin Contributions:
0

Re: Square WebPay support thread.

carlwhat:

are you in sandbox mode or live mode?

Yes in live mode.

10 Sep 2023, 16:42
#495
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,953
Plugin Contributions:
8

Re: Square WebPay support thread.

masterrusty:

Yes in live mode.

i don't know what to tell you. you seem to have a very rudimentary error that indicates a problem with either your credentials or your oauth token.

i would double check all of that information as well as the instructions on the docs for doing the install. mind you the problem is not with the code (no need to re-upload files), but something is wrong with your settings. or your square admin daashboard.

in your store root you can create a file called test.php with the following information:

<?php
require('includes/application_top.php');
include_once DIR_FS_CATALOG . DIR_WS_MODULES . 'payment/square_webPay.php';
include_once DIR_FS_CATALOG . DIR_WS_LANGUAGES . 'english/modules/payment/square_webPay.php';

$test = new square_webPay();

$pulldown = $test->getLocationsPulldownArray();

print_r($pulldown);
die(__FILE__ . ':' . __LINE__);

when you go to:

https://www.mystore.com/test.php

you should see something like:

Array ( [0] => Array ( [id] => Default Test Account:[LKCCSZDNNZ0S6]:USD [text] => Default Test Account: USD ) ) /var/www/zcdev/test.php:21

if the Array is empty, you have done something wrong.

best.

11 Sep 2023, 00:18
#496
jasonshanks avatar

jasonshanks

Zen Follower

Join Date:
Feb 2009
Location:
atlanta GA
Posts:
296
Plugin Contributions:
0

Re: Square WebPay support thread.

Hallos,

Should I make a new square app for each zencart site i use the square web pay module on ? Or is one enough and I just share the Api key ? thanks so much again for all that you guys do.

11 Sep 2023, 00:40
#497
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,760
Plugin Contributions:
9

Re: Square WebPay support thread.

jasonshanks:

Should I make a new square app for each zencart site i use the square web pay module on ?
Yes.
one app integration for each URL as you will need specific URLs for Square to know where to answer/porcess each sale.

11 Sep 2023, 01:08
#498
jasonshanks avatar

jasonshanks

Zen Follower

Join Date:
Feb 2009
Location:
atlanta GA
Posts:
296
Plugin Contributions:
0

Re: Square WebPay support thread.

Thank you so much.

11 Sep 2023, 15:20
#499
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Location:
Cleethorpes
Posts:
1,230
Plugin Contributions:
3

Re: Square WebPay support thread.

Do you suggest deleting the old square module then?

11 Sep 2023, 15:30
#500
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,760
Plugin Contributions:
9

Re: Square WebPay support thread.

If you had used the oold method to accept payment, you can use the Moduless >> Payment to remove the installation but leave the files. That way, your older transactions can still be viewed.