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

Square WebPay support thread.

Views: 128,131

Results 441 to 460 of 800
01 Jun 2023, 18:04
#441
simon1066 avatar

simon1066

Totally Zenned

Join Date:
Feb 2009
Location:
UK
Posts:
1,326
Plugin Contributions:
0

Square WebPay support thread.

Dave224:

I'd like to reduce the empty vertical space below the credit card info entry box and above the next payment method on the checkout_payment page. Using browser web developer tools, I see there is a hidden button with id="card-button" with text "Use Credit Card" that takes up 21.5 px vertically. When I use the Square payment method, I never see this button. Under what conditions does this button become visible and can the vertical space taken up by the button be eliminated when hidden? Can anyone suggest an approach to reduce this empty space?
Thank you!
zc157c, php8.0.2, Square WebPay 1.0.2

I think that this button is redundant in Zen Cart, it's the equivalent of ZC's Confirm/Pay Now/Confirm Order button at the end of step 3. Due to the way the surrounding divs overlap you would only save 17px if you 'removed' it.

In browser dev tools try adding display:none; to the element and you'll see that that hides it fully. I guess you would need to change the 'visibility: hidden;' to 'display:none;' in includes\modules\pages\checkout_payment\jscript_square_webPay.php (try searching it for 'card-button').

For me, it would be more trouble than it's worth given I would be editing a plugins core file.

01 Jun 2023, 18:23
#442
simon1066 avatar

simon1066

Totally Zenned

Join Date:
Feb 2009
Location:
UK
Posts:
1,326
Plugin Contributions:
0

Re: Square WebPay support thread.

simon1066:

...In browser dev tools try adding display:none; to the element and you'll see that that hides it fully. I guess you would need to change the 'visibility: hidden;' to 'display:none;' in includes\modules\pages\checkout_payment\jscript_square_webPay.php (try searching it for 'card-button').

For me, it would be more trouble than it's worth given I would be editing a plugins core file.

Of course an easier way might be to just add that display:none to your stylesheet! Try it out.

(Why is it I always go for the complicated way first?)

01 Jun 2023, 20:00
#443
dave224 avatar

dave224

Zen Follower

Join Date:
Jun 2012
Posts:
481
Plugin Contributions:
0

Re: Square WebPay support thread.

Yeah, I thought of both those approaches but was hesitant because I don't know if that button ever gets displayed to the customer and under what conditions it would be displayed. Think I'll wait until dbltoe responds. But thank you!

01 Jun 2023, 21:56
#444
carlwhat avatar

carlwhat

zennedOut

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

Re: Square WebPay support thread.

Dave224:

Yeah, I thought of both those approaches but was hesitant because I don't know if that button ever gets displayed to the customer and under what conditions it would be displayed. Think I'll wait until dbltoe responds. But thank you!

ha ha ha.... oh my that's a good one...

simon's approach is a good one. it was recommended by me to swguy previously, although i could not find it on this thread.

the card-button code is just a place holder for the square javascript to replace. if the customer does see it, then you have a problem, as it is not meant for the customer to see.

best.

04 Jun 2023, 19:09
#445
jwlamb avatar

jwlamb

Zen Follower

Join Date:
Jan 2014
Location:
Arizona
Posts:
110
Plugin Contributions:
0

Re: Square WebPay support thread.

carlwhat:

php 5.6 is not supported nor will it work.

If I switch to 7.3/7.4 or even 8.0/8.1 then the list doesn't fully populate. I'm not sure what setting I'm messing up, but this just isn't working for me.

5.6 without the php file square_webPay.php
Attachment 20306

5.6 with the php file square_webPay.php, note the install box on right disappears. Also note that square webPay is not listed in the list.
Attachment 20307

7.3 and 7.4, list is shortened and Square webPay still not shown
Attachment 20308

8.0 and 8.1, list is almost gone
Attachment 20309

04 Jun 2023, 19:37
#446
jwlamb avatar

jwlamb

Zen Follower

Join Date:
Jan 2014
Location:
Arizona
Posts:
110
Plugin Contributions:
0

Re: Square WebPay support thread.

jwlamb:

7.3 and 7.4, list is shortened and Square webPay still not shown
Also to note, if on php 7.3 or higher, then PayPal disappears from the list, currently that is the only payment module that is working.

04 Jun 2023, 19:40
#447
dbltoe avatar

dbltoe

Totally Zenned

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

Re: Square WebPay support thread.

Dave224:

Yeah, I thought of both those approaches but was hesitant because I don't know if that button ever gets displayed to the customer and under what conditions it would be displayed. Think I'll wait until dbltoe responds. But thank you!That's like waiting on the apprentice to outdo the master:P

I was simply trying to get one of the items the posting tips asks for in these instances, a URL for the site in question.

I will add from the accessibility standpoint that display:none and visibility:hidden often have to have a little different manipulation to meet accessibility AND HTML standards. While hidden removes both the image and any reference in a screen reader, hidden does not "eat up" the space used by the item.

Also, looking at the site, you need a lot of work to get the site into current things like a responsive template. But that should be in a different thread.

04 Jun 2023, 21:21
#448
carlwhat avatar

carlwhat

zennedOut

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

Re: Square WebPay support thread.

jwlamb:

If I switch to 7.3/7.4 or even 8.0/8.1 then the list doesn't fully populate. I'm not sure what setting I'm messing up, but this just isn't working for me.

5.6 without the php file square_webPay.php
Attachment 20306

5.6 with the php file square_webPay.php, note the install box on right disappears. Also note that square webPay is not listed in the list.
Attachment 20307

7.3 and 7.4, list is shortened and Square webPay still not shown
Attachment 20308

8.0 and 8.1, list is almost gone
Attachment 20309

square webpay requires…. whatever i said above. php 7.4.

i would remove square webpay and try to run your site as it currently exists to run under 7.4. i do not see that in your post. i think 1 of your other payment modules is choking. and you can see that by removing square webpay and trying to run php 7.4.

in addition you said you are not getting any log files. that’s a problem. your screenshots clearly indicate fatal errors and properly configured systems should have log files.

i would talk to your hosting company to find out why you are not seeing those log files and to track them down. withou log files troubleshooting is very difficult and again what you are posting clearly indicates problems for which log files should be generated.

best.

04 Jun 2023, 22:52
#449
jwlamb avatar

jwlamb

Zen Follower

Join Date:
Jan 2014
Location:
Arizona
Posts:
110
Plugin Contributions:
0

Re: Square WebPay support thread.

carlwhat:

I think 1 of your other payment modules is choking

Not sure which one, but I deleted all of them except PayPal, Square (old version), and Square webPay. It works now on 7.4. :frusty:

11 Jun 2023, 15:25
#450
georgemurcott avatar

georgemurcott

New Zenner

Join Date:
Jul 2013
Location:
Birmingham, UK
Posts:
9
Plugin Contributions:
0

Re: Square WebPay support thread.

Hi, firstly thank you Carl for creating this (and to all the others on here who give their time generously, it is appreciated by amateurs like me!). I assist a friend with his site, I set it up around ten years ago and we have done a couple of upgrades so are now on the lovely ZC1.5.8a on PHP8.1 and mySQL5.7

So, i have installed the latest download of Square WebPay (1.04), now incase it helps anyone else Square seem to have updated how you get the API side setup, incase it helps anyone else, it is now slightly hidden, you have to go in to Developer ("Sqaure Developer"), if you don't have any existing app integrations this is tricky to find (unless i am just a bit thick :)
On the **Dashboard **menu onthe left, look for **Settings **at the bottom, then App Integrations. This will be empty apart from some featured apps and a big blue button to Visit app Marketplace, choose this, but then on the new page in the menu at the top choose the "More" drop down menu then choose "Square Developer".

Now, those notes make reference to Version 1.0.1 of Square Web Payments requires API Version 2022-02-16, so my first question is, "Is this still true for version 1.0.4 of the SquareWebPay module? Or should I just leave it on the latest which it defaults to? (which is 16 versions ahead so this seems unlikely).

Second question (sorry!) in the help files it makes reference to a change made in version 1.02 to cope with ZC website that are in a subfolder (ours is). It mentions properly defining in the config file the "DIR_WS_HTTPS_CATALOGUE constant", now we haven't, we haven't needed to so far, the notes in those files seem to suggest it will be autodetected so ours say:
define('DIR_WS_CATALOG', '/');
define('DIR_WS_HTTPS_CATALOG', '/');
Now there is a problem with the install as SquareWebPay is not showing up in the Admin - Modules sections and none of the others have the usual options to install/edit (and were all fine dyas ago!) so there is an issue with what i have done. I have checked and all the files are uploaded to the correct folders.
Is is down to this missing folder definition? To test this I made the change in both files (configure.php in both admin and store) - but only those two lines and it broke the site! the edits were:
define('DIR_WS_CATALOG', '/JPV3/');
define('DIR_WS_HTTPS_CATALOG', '/JPV3');
(the store is in a folder called JPV3) - i have now changed it back and its working fine. Now i believe these are added to the https info and so maybe i just needed to reissue/renew the SSL cert? Not sure...

I did turn on admin logging and saw this in a log file:
PHP Fatal error: Uncaught Error: Class "Square\Environment" not found in /homepages/7/d456783090/htdocs/JPV3/includes/modules/payment/square_webPay.php:107
Does that help anyone point me in the right direction?

Any and all help greatly appreciated as I was hoping this would be plug and play but it hasnt been smooth so far :(
Thanks, George

11 Jun 2023, 18:33
#451
dbltoe avatar

dbltoe

Totally Zenned

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

Re: Square WebPay support thread.

Now, those notes make reference to Version 1.0.1 of Square Web Payments requires API Version 2022-02-16, so my first question is, "Is this still true for version 1.0.4 of the SquareWebPay module? Or should I just leave it on the latest which it defaults to? (which is 16 versions ahead so this seems unlikely).Square is constantly updating the API and, one of the newer could affect the way WebPay works. Stick with the suggested API until told different. Subscribe to this thread to make sure you receive any updates.

the edits were:
define('DIR_WS_CATALOG', '/JPV3/');
define('DIR_WS_HTTPS_CATALOG', '/JPV3');
```It appears you have a missing / in the HTTPS setting.  It should be```
the edits were:
define('DIR_WS_CATALOG', '/JPV3/');
define('DIR_WS_HTTPS_CATALOG', '/JPV3/');
```Also, this is where it would help to see the entire config file (with sensitive info eliminated) but, do so in a different thread as it's off topic for WebPay.

Open the new thread, answer all the posting tips and let us know how the internet is "told"  to go to your subfoder.
19 Jun 2023, 18:44
#452
georgemurcott avatar

georgemurcott

New Zenner

Join Date:
Jul 2013
Location:
Birmingham, UK
Posts:
9
Plugin Contributions:
0

Re: Square WebPay support thread.

Hi thanks dbltoe for the help. I have left the API version on the one instructed. I retried with the update to the config files but it still goes wrong. In the help files it mentions properly defining in the config file the "DIR_WS_HTTPS_CATALOGUE constant", now we haven't, so
I made the change in both files (configure.php in both admin and store) - but only those two lines and it broke the site! the edits were:
define('DIR_WS_CATALOG', '/JPV3/');
define('DIR_WS_HTTPS_CATALOG', '/JPV3/');
(the store is in a folder called JPV3) - i have now changed it back and its working fine. Now i believe these are added to the https info and so maybe i just needed to reissue/renew the SSL cert? It broke the storefront not the admin side. The storefront wound up looking like this:
Attachment 20317
Any further help would be greatly appreciated. I know you mentioned starting this again in a new new thread but this does still relate to webpay as that won't show up in Admin and everything was/is fine in other respects and its the webpay specific instructions saying to do this. Thanks, George

19 Jun 2023, 21:47
#453
dbltoe avatar

dbltoe

Totally Zenned

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

Re: Square WebPay support thread.

Sorry, it doesn't relate in that WebPay would work if your settings were correct. It may take a few back and forths to get all corect and that shouldn't be done here.

Please open another thread and provide copies of your two config files with admin folder, database user/password/name blanked out using the # abovve.

19 Jun 2023, 21:53
#454
swguy avatar

swguy

Administrator

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

Re: Square WebPay support thread.

Note also that the constant "DIR_WS_HTTPS_CATALOGUE" doesn't exist - it's "DIR_WS_HTTPS_CATALOG"

25 Jun 2023, 11:15
#455
johnjlarge avatar

johnjlarge

New Zenner

Join Date:
Oct 2007
Location:
Cornwall/Amsterdam
Posts:
61
Plugin Contributions:
0

Re: Square WebPay support thread.

Having a weird one.

Have been using the squrewebpay add on since Calrwhat first released it. I recently upgraded to 1.0.4 and have been seeing a few of these in my logs folder debugs

"should not get here. check that you have the latest jscript_square_webpay file and that you are not having javascript errors in the console."

The thing is, many payments with square are going through just fine, yet the odd customer says the payment form won't load to enter their card details. I can have 10 or 20 square payments in a row without issue, and then this will happen to a random customer. Is this something to do with the setup of the customers browsers/ad blockers/cookies, or is it something on my site which I can fix?

Zen Cart 1.5.6c running on php 7.3.33

Any help much appreciated.

25 Jun 2023, 13:47
#456
carlwhat avatar

carlwhat

zennedOut

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

Re: Square WebPay support thread.

johnjlarge:

Having a weird one.

Have been using the squrewebpay add on since Calrwhat first released it. I recently upgraded to 1.0.4 and have been seeing a few of these in my logs folder debugs

"should not get here. check that you have the latest jscript_square_webpay file and that you are not having javascript errors in the console."

The thing is, many payments with square are going through just fine, yet the odd customer says the payment form won't load to enter their card details. I can have 10 or 20 square payments in a row without issue, and then this will happen to a random customer. Is this something to do with the setup of the customers browsers/ad blockers/cookies, or is it something on my site which I can fix?

Zen Cart 1.5.6c running on php 7.3.33

Any help much appreciated.

some other javascript code is hick-jacking your submit your submit form button.

are you using OPC?

25 Jun 2023, 14:26
#457
johnjlarge avatar

johnjlarge

New Zenner

Join Date:
Oct 2007
Location:
Cornwall/Amsterdam
Posts:
61
Plugin Contributions:
0

Re: Square WebPay support thread.

carlwhat:

some other javascript code is hick-jacking your submit your submit form button.

are you using OPC?

No, just using the standard zen cart payflow of checkout_shipping, checkout_payment and checkout_confirmation. It works for most customers, but for some this error throws. I can put through as many test payments & live payments using all sorts of different browsers & I can't replicate it. With some customers, no matter how many times they try, the payment form just won't load.

25 Jun 2023, 14:58
#458
johnjlarge avatar

johnjlarge

New Zenner

Join Date:
Oct 2007
Location:
Cornwall/Amsterdam
Posts:
61
Plugin Contributions:
0

Re: Square WebPay support thread.

Just thinking out loud, is it possible an ad blocker or privacy extension is blocking the javascript from loading via https://web.squarecdn.com/v1/square.js and then the subsequent https://web.squarecdn.com/v1/square.js which is loaded via the square.js file? If that was the case, would the error be the same? The only reason I ask is that I’ve had it from two school teachers of late, both of whom couldn't load the payment form. If an extension or IT network policy blocked the loading of those third party .js files, would the error/outcome be the same?

If that's the case, perhaps serving those JS files locally would be better, or showing an error on screen if those resources are blocked. Asking general users/customers what browser extensions, versions & network policies they are running is pretty futile as they generally don't know. But I am seeing this more & more, which may suggest it's in a blocklist or privacy extension of some sort as a false positive.

25 Jun 2023, 15:05
#459
carlwhat avatar

carlwhat

zennedOut

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

Re: Square WebPay support thread.

johnjlarge:

Just thinking out loud, is it possible an ad blocker or privacy extension is blocking the javascript from loading via https://web.squarecdn.com/v1/square.js and then the subsequent https://web.squarecdn.com/v1/square.js which is loaded via the square.js file? If that was the case, would the error be the same? The only reason I ask is that I’ve had it from two school teachers of late, both of whom couldn't load the payment form. If an extension or IT network policy blocked the loading of those third party .js files, would the error/outcome be the same?

If that's the case, perhaps serving those JS files locally would be better, or showing an error on screen if those resources are blocked. Asking general users/customers what browser extensions, versions & network policies they are running is pretty futile as they generally don't know. But I am seeing this more & more, which may suggest it's in a blocklist or privacy extension of some sort as a false positive.

if that file was blocked, you would never see the entry of the credit card fields. if you are seeing the credit card number entry form, then the square js has loaded correctly.

what is your website address?

25 Jun 2023, 15:26
#460
johnjlarge avatar

johnjlarge

New Zenner

Join Date:
Oct 2007
Location:
Cornwall/Amsterdam
Posts:
61
Plugin Contributions:
0

Re: Square WebPay support thread.

Website is www.koolbadges.co.uk

One of the teachers who emailed me said just that

"Hello, we are trying to place an order online but there seems to be a problem with the website as when we click on the option to pay by debit or credit card, it doesn't do anything. Can you please contact us about this?"

And another just this morning said
"I am trying to purchase these five badges but your website won’t allow me to enter my credit card??"

However, the payment form did load for others who have checked out perfectly fine via square .