Forums / Addon Payment Modules / Square WebPay support thread.

Square WebPay support thread.

Results 1 to 20 of 800
06 Apr 2022, 18:02
#1
carlwhat avatar

carlwhat

Totally Zenned

Join Date:
Nov 2005
Posts:
2,932
Plugin Contributions:
5

Square WebPay support thread.

the new square webPay payment module is now available for download!

https://www.zen-cart.com/downloads.php?do=file&id=2345

for all of you worried about the impending deprecation of the square web forms sdk, worry no more. i developed this payment module using the square web pay sdk. it also includes buyer verification.

i developed this module with no development funds whatsoever, to help the community.

any donations are appreciated. (the cake link in my signature works...)

it should be plug and play for zc157 and zc156. the sdk has a minimum version of php 7.4 although i have tested it with php 7.3 and it seems to work.

i can only provide support for the above mentioned minimums.

best.
06 Apr 2022, 18:49
#2
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Posts:
9,707
Plugin Contributions:
6

Re: Square WebPay support thread.

THANX for the hard work!

Buy the man some cake!

I can verify that this works with:

1.5.6c Php 7.3.33
Linux 3.10.0 LiteSpeed
MySQL 5.7.37
OPC 2.3.1
Edit Orders 4.5.0
Changed Files Report
Clone A Template
clone of responsive_classic

I am still in the process of testing with the latest bootstrap and OPC on 1.5.7d

One thing I have run into is that comapanies with more than one Application established in Square MAY not have the correct business name reported to the customer's financial institution. Normally, if it were a sale a Microsoft, the bank statement would show "SQ MICROSOFT" I have not seen a problem with company name when the business has only one business Application for the web.

Not Approved Guidelines but how I went about the upgrade:
  1. Get the Mod
    [LIST]
  2. Download the mod
  3. Extract the files and upload them to your site.


[*]On Your Site:
[/LIST]

[LIST=|INDENT=2]
[*]Go to your admin >> Modules >> Payment and click on the circled-I next to Square.
[*]Using something like Notepad, copy the Application ID and Application Secret (OAuth) from the existing Square Module. You will need them for the WebPay as well.
[/LIST]

  1. On the Square Website:


[LIST=|INDENT=2]
[*]Log in to Square, go to App Integrations, and select manage for your Application
[*]Just above Credentials, Click on Production to get to where you need to work
[*]Scroll Down to Production API Version and make sure it is the latest
[*]Click on OAuth in the left-hand menu.
[*]Change the Production Redirect URL from https://YOUR_SITE/square_handler.php to https://YOUR_SITE/squareWebPay_handler.php
[/LIST]

  1. In Your Site's Admin:


[LIST=|INDENT=2]
[*]Set your site down for Maintenance
[*]Delete the Square Payment Module
[*]Install the Square WebPay Module
[*]Input the copies you made of Application ID and Application Secret (OAuth)
[*]Change any of the other settings like Transaction Type and Sort order of display.
[*]Scroll down and click update.
[*]The module should now show a green area asking for the token to be verified
[*]Click the green link and Square should open up to say you have allowed your Application to be usd.
[*]Verify the green link is gone and Square is showing the proper Order Status with a green icon.
[*]Reset your site's Down for Maintenance to False
[/LIST]

  1. Go get some cake.:P




06 Apr 2022, 19:24
#3
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Posts:
9,707
Plugin Contributions:
6

Re: Square WebPay support thread.

Problem solved on the wrong company showing in the bank statement.

As it says when installing the mod,
Enter the (Store) Location ID from your account settings. You can have multiple locations configured in your account; this setting lets you specify which location your sales should be attributed to. If you want to enable Apple Pay support, this location must already be verified for Apple Pay in your Square account.


What they don't tell you is that you have to create the locations in a different area from the Application itself.

Your extra locations can be created at https://squareup.com/dashboard/locations
07 Apr 2022, 06:44
#4
simon1066 avatar

simon1066

Totally Zenned

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

Re: Square WebPay support thread.

carlwhat:

... any donations are appreciated. (the cake link in my signature works...)


Thank you for your work on this crucial module. Alas, I can't see a way to donate as the Venmo app is not available in the UK
07 Apr 2022, 09:36
#5
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Posts:
1,230
Plugin Contributions:
2

Re: Square WebPay support thread.

carlwhat:

the new square webPay payment module is now available for download!

https://www.zen-cart.com/downloads.php?do=file&id=2345

for all of you worried about the impending deprecation of the square web forms sdk, worry no more. i developed this payment module using the square web pay sdk. it also includes buyer verification.

i developed this module with no development funds whatsoever, to help the community.

any donations are appreciated. (the cake link in my signature works...)

it should be plug and play for zc157 and zc156. the sdk has a minimum version of php 7.4 although i have tested it with php 7.3 and it seems to work.

i can only provide support for the above mentioned minimums.

best.


I'm getting this error 'Your transaction could not be completed due to a misconfiguration in our store. Please report this error to the Store Owner: SQ-MISCONF'

My site is running 1.5.7c and its on PHP 7.4

Dr Byte mentions in the previous Square Up Payment MOdule Support thread

'SQ-NONCE-FAILURE appears when the javascript code in your template has errors and is preventing the javascript for the module from executing properly.
This is often caused by other plugins that are using outdated javascript or old versions of jQuery. It can also happen if you're using a template designed for an older version of Zen Cart and therefore have an old jscript_framework.php file in your template's jscript folder.'

So does this rely on any particular JQUERY version or jscript_framework.php?
07 Apr 2022, 11:52
#6
johnjlarge avatar

johnjlarge

New Zenner

Join Date:
Oct 2007
Posts:
61
Plugin Contributions:
0

Re: Square WebPay support thread.

Can confirm it is all working as expected using the latest production API and having tested it with various cards here in the UK. Running on php 7.3 and ZC 1.5.6c without issues. @carlwhat thanks so much for your work on this, and as someone else based in the UK, it would be amazing to be able to buy you some cake, but Venmo doesn't work here. Any other way?

While I'm here I'm having a senior moment, but probably due to some health issues I'm having at the moment. I'm trying to get the card payment form to appear below the radio box, so it doesn't sit over to the right hand side. See screenshot. The CSS bumps it down just fine on smaller screens & mobile, but on large desktop screens its looking a little wonky.

Attachment 19937
07 Apr 2022, 12:04
#7
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Posts:
1,230
Plugin Contributions:
2

Re: Square WebPay support thread.

johnjlarge:

Can confirm it is all working as expected using the latest production API and having tested it with various cards here in the UK. Running on php 7.3 and ZC 1.5.6c without issues. @carlwhat thanks so much for your work on this, and as someone else based in the UK, it would be amazing to be able to buy you some cake, but Venmo doesn't work here. Any other way?

While I'm here I'm having a senior moment, but probably due to some health issues I'm having at the moment. I'm trying to get the card payment form to appear below the radio box, so it doesn't sit over to the right hand side. See screenshot. The CSS bumps it down just fine on smaller screens & mobile, but on large desktop screens its looking a little wonky.

Attachment 19937


John are you using One Page Checkout?
07 Apr 2022, 12:07
#8
johnjlarge avatar

johnjlarge

New Zenner

Join Date:
Oct 2007
Posts:
61
Plugin Contributions:
0

Re: Square WebPay support thread.

No, just the standard checkout shipping>checkout payment>checkout confirmation workflow.
07 Apr 2022, 12:15
#9
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Posts:
1,230
Plugin Contributions:
2

Re: Square WebPay support thread.

johnjlarge:

No, just the standard checkout shipping>checkout payment>checkout confirmation workflow.


Yeah got it working without OPC, so something going wrong with it with OPC. Not sure what but looks like a Jquery issue or something. I've even tried it with the latest OPC and get the same issue.

I wonder if lat9 (Cindy) can help?
07 Apr 2022, 12:22
#10
johnjlarge avatar

johnjlarge

New Zenner

Join Date:
Oct 2007
Posts:
61
Plugin Contributions:
0

Re: Square WebPay support thread.

So I sorted my alignment issue if anyone is interested or has a similar issue. I added a new rule to stylesheet.css with the following & that seems to fill the available space with the payment input form nicely.
.ccinfo {
	display: grid;
}
07 Apr 2022, 13:09
#11
carlwhat avatar

carlwhat

Totally Zenned

Join Date:
Nov 2005
Posts:
2,932
Plugin Contributions:
5

Re: Square WebPay support thread.

simon1066:

Thank you for your work on this crucial module. Alas, I can't see a way to donate as the Venmo app is not available in the UK


who knew? i'm working on an alternative...

thanks for your support.

best.
07 Apr 2022, 13:12
#12
carlwhat avatar

carlwhat

Totally Zenned

Join Date:
Nov 2005
Posts:
2,932
Plugin Contributions:
5

Re: Square WebPay support thread.

Nick1973:

Yeah got it working without OPC, so something going wrong with it with OPC. Not sure what but looks like a Jquery issue or something. I've even tried it with the latest OPC and get the same issue.

I wonder if lat9 (Cindy) can help?


definitely a jquery issue. what version of jquery are you running?

i have it tested on 3.5.1.

do you know how to use the developer console? you should see an error there.
07 Apr 2022, 13:13
#13
carlwhat avatar

carlwhat

Totally Zenned

Join Date:
Nov 2005
Posts:
2,932
Plugin Contributions:
5

Re: Square WebPay support thread.

johnjlarge:

So I sorted my alignment issue if anyone is interested or has a similar issue. I added a new rule to stylesheet.css with the following & that seems to fill the available space with the payment input form nicely.
.ccinfo {
	display: grid;
}


glad you got that figured out.
07 Apr 2022, 14:15
#14
barco57 avatar

barco57

Totally Zenned

Join Date:
Apr 2006
Posts:
2,841
Plugin Contributions:
0

Re: Square WebPay support thread.

So why not have built it on Square PHP SDK 16.0.0.20211117 or 17.0.0.20211215 which are the last ones that list PHP 7.1+?
07 Apr 2022, 14:21
#15
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Posts:
13,980
Plugin Contributions:
46

Re: Square WebPay support thread.

Nick1973:

Yeah got it working without OPC, so something going wrong with it with OPC. Not sure what but looks like a Jquery issue or something. I've even tried it with the latest OPC and get the same issue.

I wonder if lat9 (Cindy) can help?

If there's a jscript_ module that's included in the /includes/modules/pages/checkout_payment page, that needs to be copied to /includes/modules/pages/checkout_one.
07 Apr 2022, 14:37
#16
carlwhat avatar

carlwhat

Totally Zenned

Join Date:
Nov 2005
Posts:
2,932
Plugin Contributions:
5

Re: Square WebPay support thread.

lat9:

If there's a jscript_ module that's included in the /includes/modules/pages/checkout_payment page, that needs to be copied to /includes/modules/pages/checkout_one.


while that may work, i'm not really sure why you would say that.

there is a file in the checkout_one directory, that is available for anyone to see by downloading the zip, it's contents are:

[php]
<?php

/**
* developed, copyrighted and brought to you by @proseLA (github)
* https://mxworks.cc
* copyright 2022 proseLA
*
* some portions of code may be copyrighted and licensed by www.zen-cart.com
*
* Code is licensed under the MIT license.
*
* Javascript for Square WebPay module
* specifically for One Page Checkout
*
* 04/2022 project: square_webPay v1.0.0 file: jscript_square_webPay.php
*/

if (!file_exists($squareWebPay_jscript = DIR_FS_CATALOG . DIR_WS_MODULES . 'pages/checkout_payment/jscript_square_webPay.php')) {
return false;
}

require $squareWebPay_jscript;
[/php]

both files need to be there.

the idea to only have 1 file to maintain was yours, so i'm unclear why you would recommend doing something different on this board.
07 Apr 2022, 14:40
#17
carlwhat avatar

carlwhat

Totally Zenned

Join Date:
Nov 2005
Posts:
2,932
Plugin Contributions:
5

Re: Square WebPay support thread.

barco57:

So why not have built it on Square PHP SDK 16.0.0.20211117 or 17.0.0.20211215 which are the last ones that list PHP 7.1+?


because php 7.1 was end of life in 2019.
07 Apr 2022, 15:07
#18
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Posts:
13,980
Plugin Contributions:
46

Re: Square WebPay support thread.

carlwhat:

while that may work, i'm not really sure why you would say that.

there is a file in the checkout_one directory, that is available for anyone to see by downloading the zip, it's contents are:

[php]
<?php

/**
* developed, copyrighted and brought to you by @proseLA (github)
* https://mxworks.cc
* copyright 2022 proseLA
*
* some portions of code may be copyrighted and licensed by www.zen-cart.com
*
* Code is licensed under the MIT license.
*
* Javascript for Square WebPay module
* specifically for One Page Checkout
*
* 04/2022 project: square_webPay v1.0.0 file: jscript_square_webPay.php
*/

if (!file_exists($squareWebPay_jscript = DIR_FS_CATALOG . DIR_WS_MODULES . 'pages/checkout_payment/jscript_square_webPay.php')) {
return false;
}

require $squareWebPay_jscript;
[/php]

both files need to be there.

the idea to only have 1 file to maintain was yours, so i'm unclear why you would recommend doing something different on this board.

I was giving a 'generic' response, since I didn't download the payment method files. Sorry.
07 Apr 2022, 16:34
#19
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Posts:
10,620
Plugin Contributions:
212

Re: Square WebPay support thread.

> So why not have built it on Square PHP SDK 16.0.0.20211117 or 17.0.0.20211215 which are the last ones that list PHP 7.1+?

carlwhat:

because php 7.1 was end of life in 2019.


... and because the latest SDKs have fixed bugs from older versions.

You would NEVER build on an old SDK just because some people haven't updated their sites - that makes no sense at all.
People who are staying up to date should not be penalized just because others aren't staying up to date.
07 Apr 2022, 16:44
#20
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Posts:
9,707
Plugin Contributions:
6

Re: Square WebPay support thread.

Nick1973:

Yeah got it working without OPC, so something going wrong with it with OPC. Not sure what but looks like a Jquery issue or something. I've even tried it with the latest OPC and get the same issue.

I wonder if lat9 (Cindy) can help?
As stated in my post above, it is working just fine with the items shown in https://www.zen-cart.com/showthread.php?228750-Square-WebPay-support-thread&p=1387592#post1387592