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 661 to 680 of 808
23 Apr 2024, 12:13 PM
#661
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,142
Plugin Contributions:
56

Square WebPay support thread.

gernot:

Hello Carl,
https://www.proteawines.jp/shop/
While I don't currently have clients using this payment-module, a quick look at the site's HTML source shows:

<script>window.jQuery || document.write(unescape('%3Cscript src="https://code.jquery.com/jquery-[B]3.4.0[/B].min.js" integrity="sha256-BJeo0qm959uMBGb65z40ejJYGSgR7REI4+CW1fNKwOg=" crossorigin="anonymous"%3E%3C/script%3E'));</script>
 <script>window.jQuery || document.write(unescape('%3Cscript src="includes/templates/template_default/jscript/jquery.min.js"%3E%3C/script%3E'));</script>

 <script src="includes/templates/gernotshop/jscript/jscript_imagehover.js"></script>
 [B]<script src="includes/templates/gernotshop/jscript/jscript_jquery-1.7.1.min.js"></script>[/B]

The loaded version of jQuery is very ancient (1.7.1) and the fall-back version (3.4.0) is different and also old. I'm just pointing this out since it feels like it might be relevant.

23 Apr 2024, 3:37 PM
#662
gernot avatar

gernot

Zen Follower

Join Date:
Feb 2017
Location:
Tokyo, Japan
Posts:
334
Plugin Contributions:
0

Re: Square WebPay support thread.

Thank you lat9, I will have a look at the jquery issue now that I am in the process of upgrading to 1.5.7d (as part of upgrading to 1.5.8 and then to 2.0.0).

I also remembered I had set the Square WEbpage module to "false" so I re-enabled it now in case you wish to have a look further.

Zen Cart 1.5.6c modified for Japanese language support. Upgraded incrementally from initial 1.5.5d. Currently planning direct upgrade to 2.1.0

26 Apr 2024, 5:33 PM
#663
carlwhat avatar

carlwhat

zennedOut

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

Re: Square WebPay support thread.

gernot:

...
since then the "Continue" button to continue to step 3 (confirmation) of the checkout page does nothing, and there is no log file generated. I see the GET in my access log with a 200 HTTP response, but there seems to be no communication to or from Square.

i have spent some time on your site, and i am not seeing the behavior that you are indicating. in fact, the behavior that i am seeing is completely expected.

i am seeing some network blocking errors but i am not seeing it affecting my ability to checkout.

that said, it is entirely possible that someone's browser extensions may be doing something.

i have created a little screencast which can be seen here.

in it, i start with no browser extensions enabled, and we see no errors in the dev tools console. and the square javascript form gets loaded. i then enable a bunch of extensions in my browser and reload the page. at this point, we now see a bunch of errors in the console; however, the square javascript form still loads without problem.

i then proceed to enter a credit card number and the other info requested by square. once complete, i hit the continue button, and i am brought to the checkout confirmation page. all expected behavior.

at this point, i look to see if the token results from square are now embedded on the form on the page. this is again done via the dev tools on my browser. and again those results are there. completely expected behavior.

i then hit confirm, and i get redirected back to the payment page along with an error message that (i think) comes back from square. or i provide it, i can not remember.

so from my standpoint, everything looks to be working correctly.

i am not experiencing the nothing happens that you suggest is happening.

now, whether your users are using other browser extensions that are further blocking the square process, i can not say. if you have an extension that you think is blocking, i can certainly load that into my browser and see if i can reproduce the behavior that you claim your users are experiencing.

not having any orders for over a month is a bit troubling and perhaps indicative of a problem. but i am not seeing it. and it is hard for me to fix something that i can not see.

best.

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

27 Apr 2024, 8:39 AM
#664
gernot avatar

gernot

Zen Follower

Join Date:
Feb 2017
Location:
Tokyo, Japan
Posts:
334
Plugin Contributions:
0

Re: Square WebPay support thread.

Hello Carl,
Many many thanks for your efforts. I had a look at the screencast, it is gratifying to see that you get to step 3 successfully (the page after the entering of the credit card details). Try as I might, I have been unable to do so. I tried a couple of things, wil try more options.
(1) Firefox (current latest 125.0.2) on linux with extensions, and also in a private window where no extensions are active as far as I can tell.
(2) Google Chrome (current latest 124.0.6367.91) on linux, with no extensions except session buddy: same behaviour.

What I get now when I press the Continue button to proceed to Step 3 after entering card details (and checking the confirmation checkbox and entering an age > 20), is a 200 success request for the squareWebPay_handler.php,

equest URL:
https://www.proteawines.jp/shop/squareWebPay_handler.php?token+result%5Bdetails%5D%5Bcard%5D%5Bbrand%5D=MASTER/snipped the rest/
Request Method:
GET
Status Code:
200 OK
Remote Address:
192.168.1.10:443
Referrer Policy:
strict-origin-when-cross-origin

but thereafter a 400 bad request for the verifications script:

Request URL:
https://connect.squareup.com/v2/analytics/verifications
Request Method:
POST
Status Code:
400 Bad Request
Remote Address:
162.159.140.47:443
Referrer Policy:
strict-origin-when-cross-origin
```.
I've tried this with two different users (myself and my wife) with our respective credit cards.
I will try on a Windows platform and my Android phone also for good measure. But at the moment I am not sure where exactly the hiccup is happening.

Zen Cart 1.5.6c modified for Japanese language support. Upgraded incrementally from initial 1.5.5d. Currently planning direct upgrade to 2.1.0

27 Apr 2024, 8:53 AM
#665
gernot avatar

gernot

Zen Follower

Join Date:
Feb 2017
Location:
Tokyo, Japan
Posts:
334
Plugin Contributions:
0

Re: Square WebPay support thread.

Same result (no action on Continue to Step 3) on Android phone using Chrome browser, no extensions. I don't have developer tools to see whether there is also a verification errors as above, but I did try with both a MasterCard and a VISA Card.

Zen Cart 1.5.6c modified for Japanese language support. Upgraded incrementally from initial 1.5.5d. Currently planning direct upgrade to 2.1.0

27 Apr 2024, 5:47 PM
#666
carlwhat avatar

carlwhat

zennedOut

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

Re: Square WebPay support thread.

i tested with Chrome Version 124.0.6367.60 (Official Build) (64-bit) on linux, and firefox Version 125.0.2 (64-bit) also on linux. with no problems on either.

i am not sure about this ip address in your 400 response above:

Remote Address:
162.159.140.47:443

do you have any idea where that address comes from?

it is a cloudflare address but has no geo data associated with it.

i am not seeing the verification's script on my square request; but that is completely controlled by square.

as a potential troubleshooting idea, get a free VPN, connect to a US address and see if you can get to the 3rd screen.

the issue is not with the credit card numbers, you can just use 4111111111111111 for testing as you look to be getting blocked at some point prior to that data getting sent to square.

square is only good for specific countries, and while japan looks to be on the list, that cloudflare address does not have any geo data associated with it. i am not sure if that is the problem; but the idea that you are getting blocked while in japan, and i am not while in the US suggests to be a potential geography issue. but i am merely guessing at this point.

i think the VPN test would be a good one to see to rule out the browser and extensions. as it seems we are using very similar setups.

best.

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

27 Apr 2024, 10:45 PM
#667
gernot avatar

gernot

Zen Follower

Join Date:
Feb 2017
Location:
Tokyo, Japan
Posts:
334
Plugin Contributions:
0

Re: Square WebPay support thread.

Hello Carl,
Thank you for the followup. I've tried with ProtonVPN, connecting to a US server, and now I get a different (I think) error.
Still a verification error as before, but the error is now clearly understandable: the response says integer expected, and on examining the content of the request for verification, I see that the JPY amount being passed to Square is non-integer: 557.7 JPY in my case.
I am not sure why the amounts are shown like this when in the shop itself they are shown in integers (508 JPY for this test order). I will play around some more and see whether this happens often, and if so, if I can use a rounding function somewhere. The thing is, all amounts are in Yen anyway, and with tax at 10% there should be no way a non-integer amount could even be generated.

Zen Cart 1.5.6c modified for Japanese language support. Upgraded incrementally from initial 1.5.5d. Currently planning direct upgrade to 2.1.0

27 Apr 2024, 10:56 PM
#668
gernot avatar

gernot

Zen Follower

Join Date:
Feb 2017
Location:
Tokyo, Japan
Posts:
334
Plugin Contributions:
0

Re: Square WebPay support thread.

And Boom!, success. It turns out that in the product I chose, with the applied discount, for some reason the price has decimals that were not all 0. For other products I checked (still need to do exhaustive checks) that net always shows <something>.0000 (I tried removing the 0000 decimals but they re-occur when I load the inventory page for the product again) in which case integer JPY value results as expected.
So it seems that my test product was faulty, and possibly some production products as well judging by the single customer complaint I had which set off this investigation.
I should have investigated the actual request and response, I did not notive that they were both available in full, not just the 400 HTTP response.
I'll go back to my Japan local IP and see if there are any other errors now or whether the issue is potentially solved.

Zen Cart 1.5.6c modified for Japanese language support. Upgraded incrementally from initial 1.5.5d. Currently planning direct upgrade to 2.1.0

27 Apr 2024, 11:28 PM
#669
gernot avatar

gernot

Zen Follower

Join Date:
Feb 2017
Location:
Tokyo, Japan
Posts:
334
Plugin Contributions:
0

Re: Square WebPay support thread.

To add: I have traced out the issue now. Whenever a discounted product price has a price where the least significant digit is not 0 (e.g., 15 rather than 10 or 20 or 30), then the 10% tax results in a fractional number (e.g. 10% of xx5 is xx.5) which while it does not show as such in the shop browser view, does get passed to Square as such, and fails verification.
I've therefore checked that all discounted product prices end in xx0, and where necessary changed the discount to manual from percentage to give a discounted price ending in a 0.
I could I suppose try to change the amount that gets sent to Square, but don't want to make changes ad hoc when this should be handled more systematically within Zen Cart, e.g., on a per product basis rather than in the end amount, etc.

Zen Cart 1.5.6c modified for Japanese language support. Upgraded incrementally from initial 1.5.5d. Currently planning direct upgrade to 2.1.0

11 May 2024, 10:41 AM
#670
heresy_miniatures avatar

heresy_miniatures

New Zenner

Join Date:
Jul 2011
Posts:
59
Plugin Contributions:
0

Re: Square WebPay support thread.

Does this module still work with zencart 2.0 running php 8.3? I installed it on my newly updated site and it seems to have made it go crazy - all links now point to one product and site unusable. I made a backup test site and installed all the other mods one by one and the only one still to be installed is Square Webpay, which makes me suspicious of it being the culprit.
I need Square rather urgently as it's the most popular payment choice and I have to pay off a loan through Square via payments received, but I'm dreading installing it and messing everything up again due to incompatibility or such if it's just a case of not being able to cope with php8.3 (minimum php is 8 for the new ZC 2.0, but it didn't make a difference when i tried it as a solve)

PS even if I can't get it working on 2.0, thanks for all the hard work you've done on it so far, Carl!

12 May 2024, 7:25 AM
#671
simon1066 avatar

simon1066

Totally Zenned

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

Re: Square WebPay support thread.

If you are using the version from the Plugins area then it is highly unlikely that it will work without issues on the setup you quote. See the link at the top of this Docs page for a paid version that supports higher versions of ZC & PHP.

As far as I'm aware the paid version has been tested for ZC v1.5.8's and PHP 8.2 and that testing for ZC v2.0 is in progress.

Simon

24 May 2024, 3:54 PM
#672
fabulousandfun avatar

fabulousandfun

New Zenner

Join Date:
Sep 2019
Location:
CA
Posts:
21
Plugin Contributions:
0

Re: Square WebPay support thread.

Hello,

After the Zen Cart update to 2 the input fields for Square WebPay disappeared and it now displays like below on hdworkgear.com

Attachment 20625

This is what the error log displays in regard to Square WebPay
[24-May-2024 15:40:41 UTC] Request URI: /index.php?main_page=checkout_payment, IP address: 172.113.144.228, Language id 1
#0 /includes/modules/payment/square_webPay.php(109): zen_debug_error_handler()
#1 /includes/classes/payment.php(102): square_webPay->__construct()
#2 /includes/modules/pages/checkout_payment/header_php.php(111): payment->__construct()
#3 /index.php(35): require('/home/########/...')
--> PHP Deprecated: Creation of dynamic property square_webPay::$token is deprecated in /includes/modules/payment/square_webPay.php on line 109.

[24-May-2024 15:40:41 UTC] Request URI: /index.php?main_page=checkout_payment, IP address: 172.113.144.228, Language id 1
#0 /includes/modules/payment/square_webPay.php(124): zen_debug_error_handler()
#1 /includes/classes/payment.php(102): square_webPay->__construct()
#2 /includes/modules/pages/checkout_payment/header_php.php(111): payment->__construct()
#3 /index.php(35): require('/home/########/...')
--> PHP Deprecated: Creation of dynamic property square_webPay::$client is deprecated in /includes/modules/payment/square_webPay.php on line 124.

[24-May-2024 15:40:41 UTC] Request URI: /index.php?main_page=checkout_payment, IP address: 172.113.144.228, Language id 1
#0 /includes/modules/payment/square_webPay.php(128): zen_debug_error_handler()
#1 /includes/classes/payment.php(102): square_webPay->__construct()
#2 /includes/modules/pages/checkout_payment/header_php.php(111): payment->__construct()
#3 /index.php(35): require('/home/########/...')
--> PHP Deprecated: Creation of dynamic property square_webPay::$oauthClient is deprecated in /includes/modules/payment/square_webPay.php on line 128.

[24-May-2024 15:40:41 UTC] Request URI: /index.php?main_page=checkout_payment, IP address: 172.113.144.228, Language id 1
#0 /includes/modules/payment/square_webPay.php(172): zen_debug_error_handler()
#1 /includes/classes/payment.php(102): square_webPay->__construct()
#2 /includes/modules/pages/checkout_payment/header_php.php(111): payment->__construct()
#3 /index.php(35): require('/home/########/...')
--> PHP Deprecated: Creation of dynamic property square_webPay::$order_status is deprecated in /includes/modules/payment/square_webPay.php on line 172.

[24-May-2024 15:40:41 UTC] Request URI: /index.php?main_page=checkout_payment, IP address: 172.113.144.228, Language id 1
#0 /includes/modules/payment/square_webPay.php(179): zen_debug_error_handler()
#1 /includes/classes/payment.php(102): square_webPay->__construct()
#2 /includes/modules/pages/checkout_payment/header_php.php(111): payment->__construct()
#3 /index.php(35): require('/home/########/...')
--> PHP Deprecated: Creation of dynamic property square_webPay::$_logDir is deprecated in /includes/modules/payment/square_webPay.php on line 179.

[24-May-2024 15:40:41 UTC] Request URI: /index.php?main_page=checkout_payment, IP address: 172.113.144.228, Language id 1
#0 /includes/modules/payment/square_webPay/square/square/src/Models/Location.php(12): zen_debug_error_handler()
#1 /laravel/vendor/composer/ClassLoader.php(576): include('/home/########/...')
#2 /laravel/vendor/composer/ClassLoader.php(427): Composer\Autoload{closure}()
#3 /includes/modules/payment/square_webPay.php(795): Composer\Autoload\ClassLoader->loadClass()
#4 /includes/modules/pages/checkout_payment/jscript_square_webPay.php(36): square_webPay->getLocationDetails()
#5 /includes/templates/bootstrap/common/html_header.php(238): require('/home/########/...')
#6 /index.php(42): require('/home/########/...')
--> 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.

[24-May-2024 15:40:41 UTC] Request URI: /index.php?main_page=checkout_payment, IP address: 172.113.144.228, Language id 1
#0 [internal function]: zen_debug_error_handler()
#1 /includes/modules/pages/checkout_payment/jscript_square_webPay.php(98): addslashes()
#2 /includes/templates/bootstrap/common/html_header.php(238): require('/home/#######/...')
#3 /index.php(42): require('/home/########/...')
--> PHP Deprecated: addslashes(): Passing null to parameter #1 ($string) of type string is deprecated in /includes/modules/pages/checkout_payment/jscript_square_webPay.php on line 98.

13 Jun 2024, 5:13 PM
#673
diptimoy avatar

diptimoy

Zen Follower

Join Date:
Apr 2012
Location:
Bardhaman , Bharat
Posts:
217
Plugin Contributions:
1

Re: Square WebPay support thread.

Do this module work with zencart 2.0.1 and php 8?

13 Jun 2024, 8:17 PM
#674
jeking avatar

jeking

Totally Zenned

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

Re: Square WebPay support thread.

diptimoy:

Do this module work with zencart 2.0.1 and php 8?

From the Description, so half of your answer.

  • Version 1.0.0 use SDK version: 17.2.0.20220216. According to square, this SDK requires php 7.4 - php 8.0.
  • You are welcome to use it as you see fit; I have only tested it for zc156 and zc157.

Jim
Wheaton Website Services

14 Jun 2024, 1:51 AM
#675
bigb avatar

bigb

New Zenner

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

Re: Square WebPay support thread.

I'm also having issues. Not having any luck getting the module to go in Zencart v2.0.1. I can't get the module authorized to my Square account. I have the OAuth Redirect URL correct... I'm putting in the correct Application ID and application Secret... If I try Sandbox mode I get a yello light for the module (not Green)... and if I click to edit the info I lose the module (screen goes blank and I have to delete the module and re-install it... If I use the production mode OAuth I get HTTP 500 error codes... says my domain cannot handle the request...
Any info on why and/or what I may be doing wrong greatly appreciated... I'm totally self taught with all this website and FTP and everything so laymean's terms work best with me... I don't understand some of the geek-speak termonolgy for these things :blink:

14 Jun 2024, 2:06 AM
#676
bigb avatar

bigb

New Zenner

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

Re: Square WebPay support thread.

I'm using Brave Broswer... get the same results whith sheilds (ad blocker) off...cleared the cache/cookis off... have flushed the DNS on my winodws machine... at a loss at what else may couse any issues with the authorization process...

14 Jun 2024, 2:17 AM
#677
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:

I'm using Brave Broswer... get the same results whith sheilds (ad blocker) off...cleared the cache/cookis off... have flushed the DNS on my winodws machine... at a loss at what else may couse any issues with the authorization process...

Try using Chrome or FireFox. I use Brave and occasionally have problems with websites not working correctly.

Jim
Wheaton Website Services

14 Jun 2024, 2:20 AM
#678
bigb avatar

bigb

New Zenner

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

Re: Square WebPay support thread.

OK, 'll try firefox and see what happens...

14 Jun 2024, 2:49 AM
#679
bigb avatar

bigb

New Zenner

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

Re: Square WebPay support thread.

Tried it with FireFox... I get redirected back to my ZC install ######## he screen is entirely blank (white)... still not able to authorize the module :lamo:

15 Jun 2024, 12:05 AM
#680
bigb avatar

bigb

New Zenner

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

Re: Square WebPay support thread.

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...