-
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.
-
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:
- Get the Mod
- Download the mod
- Extract the files and upload them to your site.
- On Your Site:
- 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.
- On the Square Website:
- 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
- In Your Site's Admin:
- 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
- Go get some cake.:P
-
Re: Square WebPay support thread.
Problem solved on the wrong company showing in the bank statement.
As it says when installing the mod,
Quote:
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
-
Re: Square WebPay support thread.
Quote:
Originally Posted by
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
-
Re: Square WebPay support thread.
Quote:
Originally Posted by
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?
-
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
-
Re: Square WebPay support thread.
Quote:
Originally Posted by
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?
-
Re: Square WebPay support thread.
No, just the standard checkout shipping>checkout payment>checkout confirmation workflow.
-
Re: Square WebPay support thread.
Quote:
Originally Posted by
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?
-
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.
Code:
.ccinfo {
display: grid;
}
-
Re: Square WebPay support thread.
Quote:
Originally Posted by
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.
-
Re: Square WebPay support thread.
Quote:
Originally Posted by
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.
-
Re: Square WebPay support thread.
Quote:
Originally Posted by
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.
Code:
.ccinfo {
display: grid;
}
glad you got that figured out.
-
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+?
-
Re: Square WebPay support thread.
Quote:
Originally Posted by
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.
-
Re: Square WebPay support thread.
Quote:
Originally Posted by
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 Code:
<?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;
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.
-
Re: Square WebPay support thread.
Quote:
Originally Posted by
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.
-
Re: Square WebPay support thread.
Quote:
Originally Posted by
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 Code:
<?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;
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.
-
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+?
Quote:
Originally Posted by
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.
-
Re: Square WebPay support thread.
Quote:
Originally Posted by
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....92#post1387592
-
Re: Square WebPay support thread.
For those wanting to stay with earlier PHPs or with 1.5.5 and earlier, here's a new item for your store.:P
Attachment 19938
-
Re: Square WebPay support thread.
Quote:
Originally Posted by
dbltoe
the issue that @nick1973 is having is definite jquery related and/or OPC related.
he either does not have the checkout_one file i mentioned above or he is having a problem with this part of the code (from for_upload/includes/modules/pages/checkout_payment/jscript_square_webPay.php):
Code:
if (document.querySelector("#checkoutOneSubmit")) {
formButton = document.querySelector("#checkoutOneSubmit");
} else {
formButton = document.querySelector("#paymentSubmit");
}
i do not know what version of OPC he is running nor jquery; but if the first div with an id of #checkoutOneSubmit is not there, he will have a problem.
i was thinking about adding some console information in the event of problems right here. it has been on my mind of late.
and while i have TOTAL respect for drByte and lat9 for their contributions to this project as well as their troubleshooting abilities, i am perfectly able to provide support on a plugin that i developed and of which i am the most intimately familiar.
best.
-
Re: Square WebPay support thread.
Before I upload the files I wanted to check something. There are a total of 1656 files. Should all of these be uploaded?
I wasn't sure if they are needed or were files used during the development phase? There seems to be a lot of examples and GitHub files.
Apologies if this is a silly question but easier to ask before I upload.
Thank you for all your hard work on this module! Cake will be on its way once I'm done :smile:
-
Re: Square WebPay support thread.
All the files in the "for_upload" directory need to be uploaded to your site. The "How to Install" says that. I don't consider the includes/modules/pages/checkout_one/jscript_square_WebPay,php to be "extra".
I look at it as something that should have been included in the original Square mod rather than instructions saying to add the file IF you used OPC. Having it part of the mod will keep a lot of folks from making the mistake of not including this file when they start using OPC.
Not mentioned is the need to change the redirect URL at Square.
I put a method that i use in the second post. This method will have your site down for the least amount of time and get the steps at Square AND your site taken care of safely.
-
Re: Square WebPay support thread.
Quote:
Originally Posted by
Brent
Before I upload the files I wanted to check something. There are a total of 1656 files. Should all of these be uploaded?
I wasn't sure if they are needed or were files used during the development phase? There seems to be a lot of examples and GitHub files.
Apologies if this is a silly question but easier to ask before I upload.
Thank you for all your hard work on this module! Cake will be on its way once I'm done :smile:
hey brent
i really did not look at exactly what’s used/not used in the SDK. in the original square mod, all of those files are in the standard ZC vendors directory. i don’t think they take up that much space. perhaps at some point i could look at thinning those out.
the docs directory on the zip are not needed and just part of my instruction page.
and i learned that my US venmo does not work in the uk. but i am working on developing a different platform for international. who knows. maybe it will turn into another ZC payment module.
let me know if u run into any other issues.
best.
-
3 Attachment(s)
Re: Square WebPay support thread.
@dbltoe I did read your helpful post and that is what I was following after reading the instructions that came with the download. I wasn't really referring to the OPC. I don't use it so had removed that.
@carlwhat these are examples of the files I'm referring to. In the jsonmapper folder you have an example folder. Assume all the GitHub references can go?
In the square folder you have already said the doc folder can go. Is example-autoload.php used?
I'm not being difficult and this isn't about space :smile:. I can't code so whatever I upload becomes another orphan that needs investigating when I do file comparisons on upgrading. The cleaner I keep my store and the less I change the easier my life is down the road.
Once you have sorted out a payment option for the UK just post here and I will oblige.
-
Re: Square WebPay support thread.
brent,
you are not being difficult. i do not recommend doing it the way you are doing it; but i would not call you being difficult.
on upgrading, i see wholesale replacement of this folder. as it is a plugin, i think the upgrade process is different than when upgrading the base zc scripts.
but it is not really for me to say what process works best for any individual. we all have our own way of doing things.
as i have no plans to support this way of doing things, i will PM you what files i think can be safely deleted.
best.
-
Re: Square WebPay support thread.
It's fine. If they should be there I will upload as is. I just wasn't sure if you'd left development files.
Thanks for the quick responses :smile:
-
Re: Square WebPay support thread.
Quote:
Originally Posted by
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
@simon1066
i have re-established a relationship with paypal. hopefully it will last.
thanks again for your support. hopefully it works in the UK:
https://paypal.me/mXworks
best.
-
Re: Square WebPay support thread.
Quote:
Originally Posted by
carlwhat
@simon1066
i have re-established a relationship with paypal. hopefully it will last.
thanks again for your support. hopefully it works in the UK:
https://paypal.me/mXworks
best.
Yes, it works!
-
Re: Square WebPay support thread.
Quote:
Originally Posted by
simon1066
Yes, it works!
:thumbsup:
thanks again!
-
Re: Square WebPay support thread.
Just a note for those who have set up the cron job to keep the square token alive. Don't forget to change the job to point at squareWebPay_handler.php in the top directory of your store.
-
Re: Square WebPay support thread.
This works well in Apache cPanel
0 0 1,15 * * curl --silent https://YOUR_SITE.com/squareWebPay_handler.php
-
Re: Square WebPay support thread.
Quote:
Originally Posted by
carlwhat
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.
OK I will check in there. Might try and re-install the module actually. I am running 3.5.1 also.
-
4 Attachment(s)
Re: Square WebPay support thread.
Quote:
Originally Posted by
carlwhat
the issue that @nick1973 is having is definite jquery related and/or OPC related.
he either does not have the checkout_one file i mentioned above or he is having a problem with this part of the code (from for_upload/includes/modules/pages/checkout_payment/jscript_square_webPay.php):
Code:
if (document.querySelector("#checkoutOneSubmit")) {
formButton = document.querySelector("#checkoutOneSubmit");
} else {
formButton = document.querySelector("#paymentSubmit");
}
i do not know what version of OPC he is running nor jquery; but if the first div with an id of #checkoutOneSubmit is not there, he will have a problem.
i was thinking about adding some console information in the event of problems right here. it has been on my mind of late.
and while i have TOTAL respect for drByte and lat9 for their contributions to this project as well as their troubleshooting abilities, i am perfectly able to provide support on a plugin that i developed and of which i am the most intimately familiar.
best.
Ok, I have re-installed the module and I am still getting the same error with OPC
I've attached screenshots for a better understanding of what is going on. Hopefully you can view them. I also have a DEBUG file from OPC, but it contains personal details I don't want to publish here. So if that file would be help to you then I'll quite happily PM it to you for DEBUGGING.
Attachment 19964Attachment 19965Attachment 19966Attachment 19967
JQUERY is 3.5.1
PHP is 7.4
OPC is on version 2.3.9
Zen Cart is 1.5.7c
I have quite a few carts that are on similar set ups, using bootstrap and OPC so this is now beginning to cause a big problem for me. It is also causing an issue for my clients that are using Square and OPC. So I'd really like to find a solution to the problem I am having with the NEW Square Module and OPC ASAP if any of you are able to help me as I am losing money and so are my clients as a result of this issue with Square. I realise that you all give your time for these kind of developments at no cost to Zen Cart Users and Front End Developers, but this is a serious issue if it won't work with OPC. Not only that, I am still getting people that don't appear to be able to make payments easily even with OPC switched off. Some seem to be getting errors when paying and are switching to Paypal to make payments because they can't process payments using their card. So my thoughts are, something still isn't quite right with this module update. Although the version I had installed previously, might be different to the one I have installed from here:
https://www.zen-cart.com/downloads.php?do=file&id=2345
If it is different then hopefully they won't get anymore errors when paying using the standard cart rather than OPC.
-
Re: Square WebPay support thread.
Quote:
Originally Posted by
Nick1973
Ok, I have re-installed the module and I am still getting the same error with OPC
I've attached screenshots for a better understanding of what is going on. Hopefully you can view them. I also have a DEBUG file from OPC, but it contains personal details I don't want to publish here. So if that file would be help to you then I'll quite happily PM it to you for DEBUGGING.
Attachment 19964Attachment 19965Attachment 19966Attachment 19967
JQUERY is 3.5.1
PHP is 7.4
OPC is on version 2.3.9
Zen Cart is 1.5.7c
I have quite a few carts that are on similar set ups, using bootstrap and OPC so this is now beginning to cause a big problem for me. It is also causing an issue for my clients that are using Square and OPC. So I'd really like to find a solution to the problem I am having with the NEW Square Module and OPC ASAP if any of you are able to help me as I am losing money and so are my clients as a result of this issue with Square. I realise that you all give your time for these kind of developments at no cost to Zen Cart Users and Front End Developers, but this is a serious issue if it won't work with OPC. Not only that, I am still getting people that don't appear to be able to make payments easily even with OPC switched off. Some seem to be getting errors when paying and are switching to Paypal to make payments because they can't process payments using their card. So my thoughts are, something still isn't quite right with this module update. Although the version I had installed previously, might be different to the one I have installed from here:
https://www.zen-cart.com/downloads.php?do=file&id=2345
If it is different then hopefully they won't get anymore errors when paying using the standard cart rather than OPC.
just done a test transaction and it appears to be working fine with the standard checkout. It hangs a little though when you confirm your order.
-
Re: Square WebPay support thread.
Quote:
Originally Posted by
Nick1973
Ok, I have re-installed the module and I am still getting the same error with OPC
I've attached screenshots for a better understanding of what is going on. Hopefully you can view them. I also have a DEBUG file from OPC, but it contains personal details I don't want to publish here. So if that file would be help to you then I'll quite happily PM it to you for DEBUGGING.
Attachment 19964Attachment 19965Attachment 19966Attachment 19967
JQUERY is 3.5.1
PHP is 7.4
OPC is on version 2.3.9
Zen Cart is 1.5.7c
I have quite a few carts that are on similar set ups, using bootstrap and OPC so this is now beginning to cause a big problem for me. It is also causing an issue for my clients that are using Square and OPC. So I'd really like to find a solution to the problem I am having with the NEW Square Module and OPC ASAP if any of you are able to help me as I am losing money and so are my clients as a result of this issue with Square. I realise that you all give your time for these kind of developments at no cost to Zen Cart Users and Front End Developers, but this is a serious issue if it won't work with OPC. Not only that, I am still getting people that don't appear to be able to make payments easily even with OPC switched off. Some seem to be getting errors when paying and are switching to Paypal to make payments because they can't process payments using their card. So my thoughts are, something still isn't quite right with this module update. Although the version I had installed previously, might be different to the one I have installed from here:
https://www.zen-cart.com/downloads.php?do=file&id=2345
If it is different then hopefully they won't get anymore errors when paying using the standard cart rather than OPC.
I have just seen those images might be a little blurry due to compression. So if you want me Email them to you, please ask.
-
Re: Square WebPay support thread.
Quote:
Originally Posted by
Nick1973
I have quite a few carts that are on similar set ups, using bootstrap and OPC so this is now beginning to cause a big problem for me. It is also causing an issue for my clients that are using Square and OPC. So I'd really like to find a solution to the problem I am having with the NEW Square Module and OPC ASAP if any of you are able to help me as I am losing money and so are my clients as a result of this issue with Square. I realise that you all give your time for these kind of developments at no cost to Zen Cart Users and Front End Developers, but this is a serious issue if it won't work with OPC. Not only that, I am still getting people that don't appear to be able to make payments easily even with OPC switched off. Some seem to be getting errors when paying and are switching to Paypal to make payments because they can't process payments using their card. So my thoughts are, something still isn't quite right with this module update. Although the version I had installed previously, might be different to the one I have installed from here:
nick,
if you want help, i would suggest sticking to the topic. you can save your rants for somewhere else.
there is nothing that i see in your blurry screenshots that help indicate the problem.
i went through the trouble of creating an account on your website, but it seems that you do not ship anything to your own address or some other random address in the UK.
i would need to see the storefront where this problem is happening as i am not able to reproduce it on your own site due to your configuration. i did see problems in your OPC setup. see:
https://www.dropbox.com/s/4jbyt4pan5...19-01.png?dl=0
and
https://www.dropbox.com/s/cw7j5cfb45...20AM.webm?dl=0
i need to be able to get to a page that looks like this from your screenshot to help resolve this problem for you and your clients.
https://www.zen-cart.com/attachment....6&d=1650452517
best.
-
Re: Square WebPay support thread.
Quote:
Originally Posted by
carlwhat
nick,
if you want help, i would suggest sticking to the topic. you can save your rants for somewhere else.
there is nothing that i see in your blurry screenshots that help indicate the problem.
i went through the trouble of creating an account on your website, but it seems that you do not ship anything to your own address or some other random address in the UK.
i would need to see the storefront where this problem is happening as i am not able to reproduce it on your own site due to your configuration. i did see problems in your OPC setup. see:
https://www.dropbox.com/s/4jbyt4pan5...19-01.png?dl=0
and
https://www.dropbox.com/s/cw7j5cfb45...20AM.webm?dl=0
i need to be able to get to a page that looks like this from your screenshot to help resolve this problem for you and your clients.
https://www.zen-cart.com/attachment....6&d=1650452517
best.
Carl, it is not Off Topic, I was just asking for some help!!!! It was not a rant, and to be fair it is not me that is going off topic, although you are going off topic in stating that I am having a rant lol. Anyway, end of that conversation which is going off topic because you took it the wrong way. We all want to get a solution to this issue.
You was on venturedesignandprint.co.uk
The site I am trying to fix at the moment is https://ventureengravings.uk
They are different websites. That is not your fault as I should have put that site address in my post. If you go on there and go through the ordering process OPC is now running so you can set an account up on there.
And if you read further into my posts I'd stated that I was willing to Email those screenshots, so they weren't so blurry, and the DEBUG file.
I just want an answer to the problem, then I can fix it elsewhere.
-
Re: Square WebPay support thread.
Quote:
Originally Posted by
Nick1973
Carl, it is not Off Topic, I was just asking for some help!!!! It was not a rant, and to be fair it is not me that is going off topic, although you are going off topic in stating that I am having a rant lol. Anyway, end of that conversation which is going off topic because you took it the wrong way. We all want to get a solution to this issue.
You was on venturedesignandprint.co.uk
The site I am trying to fix at the moment is
https://ventureengravings.uk
They are different websites. That is not your fault as I should have put that site address in my post. If you go on there and go through the ordering process OPC is now running so you can set an account up on there.
And if you read further into my posts I'd stated that I was willing to Email those screenshots, so they weren't so blurry, and the DEBUG file.
I just want an answer to the problem, then I can fix it elsewhere.
on the site you are trying to fix, i have confirmed that we are getting a response back from square. see:
https://www.dropbox.com/s/ubo8m9jjwb...50-25.png?dl=0
i have determined a potential problem with this file.
includes/modules/pages/checkout_payment/jscript_square_webPay.php
there is a new version of said file here for anyone who wants to test it:
https://github.com/proseLA/square_we...are_webPay.php
this problem seems to be confined to OPC.
best.
-
Re: Square WebPay support thread.
Quote:
Originally Posted by
carlwhat
I have replaced jscript_square_webPay.php with the RAW FILE and still getting a problem with OPC
-
1 Attachment(s)
Re: Square WebPay support thread.
Quote:
Originally Posted by
carlwhat
These are the settings for 'Order Total, JQUERY Selector' in OPC
Order Total, jQuery Selector
Please make any necessary changes
Order Total, jQuery Selector
Identify the CSS/jQuery selector used to locate an order's current total value. The default value, #ottotal > div:first-child applies to the Zen Cart responsive_classic template's format.
#ottotal .ot-textAttachment 19968
These are in the admin to load the bootstrap template order total selector div. I remember having a similar issue to the issues I am having now when I first started using OPC. It was the same error until I applied the selector, as it is in the image, and given to me by Cindy.
So I am wondering if this setting might be part of the issue?
-
Re: Square WebPay support thread.
nick,
please go here:
admin -> configuration -> One-Page Checkout Settings -> Load Minified Script Files
and set to:
FALSE.
-
Re: Square WebPay support thread.
also on that page, what is the value of:
Payment-Block Action on Shipping Change
Key: CHECKOUT_ONE_PAYMENT_BLOCK_ACTION
-
Re: Square WebPay support thread.
Quote:
Originally Posted by
carlwhat
also on that page, what is the value of:
Payment-Block Action on Shipping Change
Key: CHECKOUT_ONE_PAYMENT_BLOCK_ACTION
It's set to 'Update'
-
Re: Square WebPay support thread.
Quote:
Originally Posted by
carlwhat
nick,
please go here:
admin -> configuration -> One-Page Checkout Settings -> Load Minified Script Files
and set to:
FALSE.
Still getting the same issue. Is this something that Cindy LAT9 can help with?
-
Re: Square WebPay support thread.
Quote:
Originally Posted by
carlwhat
also on that page, what is the value of:
Payment-Block Action on Shipping Change
Key: CHECKOUT_ONE_PAYMENT_BLOCK_ACTION
I've turned OPC off for now anyway as I know Square Works with the standard cart and I need to get some orders coming through.
-
Re: Square WebPay support thread.
Quote:
Originally Posted by
Nick1973
Still getting the same issue. Is this something that Cindy LAT9 can help with?
nick,
i only had you turn off minifying to help with my trouble shooting.
rest assured, i am close to figuring out the problem. unfortunately i am not able to reproduce it on my dev box as of yet, but as soon as i am able, i will have a solution.
rest assured, cindy has complete confidence in my trouble shooting. and this problem will get solved.
but paying customers first, and i got a bunch of stuff on my plate.
-
Re: Square WebPay support thread.
Quote:
Originally Posted by
carlwhat
nick,
i only had you turn off minifying to help with my trouble shooting.
rest assured, i am close to figuring out the problem. unfortunately i am not able to reproduce it on my dev box as of yet, but as soon as i am able, i will have a solution.
rest assured, cindy has complete confidence in my trouble shooting. and this problem will get solved.
but paying customers first, and i got a bunch of stuff on my plate.
Ok no problem Carl, and yes paying customers do come first, plus the marketing to actually get them in the first place.
So can you work with OPC off on my end? Or do you need it on?
It's just I would like some actual orders that pay money :-)
-
Re: Square WebPay support thread.
better if it is on... but do as you need to...
-
Re: Square WebPay support thread.
Quote:
Originally Posted by
carlwhat
better if it is on... but do as you need to...
Ok I have put OPC into Conditional Mode on ventureengravings.uk
You are the only customer that will be able to use it. Your Customer ID is 249
-
Re: Square WebPay support thread.
Quote:
Originally Posted by
Nick1973
Ok I have put OPC into Conditional Mode on ventureengravings.uk
You are the only customer that will be able to use it. Your Customer ID is 249
ok, @Nick1973 and whoever else is paying attention, this is what i have found.- we have 2 event listeners competing for the same event.
- when, the square_webpay event listener gets registered first, there is a successful transaction.
- when the OPC event listener gets registered first, the square submittal does not happen, and hence there is no token that gets submitted as part of the form.
- i have no idea why on some sites, the event listener gets registered first in OPC and other times square_webpay.
- i am working on addressing that.
as a test, leave Minify set to FALSE - always... until the problem is resolved.
try commenting out these 2 lines:
https://github.com/lat9/one_page_che...ut_one.js#L545
https://github.com/lat9/one_page_che...ut_one.js#L568
and try placing an order.
-
Re: Square WebPay support thread.
Quote:
Originally Posted by
carlwhat
ok, @Nick1973 and whoever else is paying attention, this is what i have found.
- we have 2 event listeners competing for the same event.
- when, the square_webpay event listener gets registered first, there is a successful transaction.
- when the OPC event listener gets registered first, the square submittal does not happen, and hence there is no token that gets submitted as part of the form.
- i have no idea why on some sites, the event listener gets registered first in OPC and other times square_webpay.
- i am working on addressing that.
as a test, leave Minify set to FALSE - always... until the problem is resolved.
try commenting out these 2 lines:
https://github.com/lat9/one_page_che...ut_one.js#L545
https://github.com/lat9/one_page_che...ut_one.js#L568
and try placing an order.
Ok without those two lines, the order processes and completes. The order emails are also produced.
-
Re: Square WebPay support thread.
I get "your details have changed" BUT, I have the changes to the jscript_square_webPay.php file in place. Should I be testing without those?
-
Re: Square WebPay support thread.
Quote:
Originally Posted by
dbltoe
I get "your details have changed" BUT, I have the changes to the jscript_square_webPay.php file in place. Should I be testing without those?
Are you talking to me or @carlwhat?
-
Re: Square WebPay support thread.
-
Re: Square WebPay support thread.
With just the changes to the OPC file, I get a good sale without the "Your settings have changed"
-
Re: Square WebPay support thread.
the changes to the:
jscript_square_webPay.php
are fine and should be left in.
i am seeing both sites as now working without problem.
changing the minify to TRUE will, at this point, not work.
i will hopefully work on a solution with @lat9 to resolve this compatibility issue with OPC.
-
Re: Square WebPay support thread.
Just a side note:
Well, two
First is that I send all log files I get from the test sites just in case they might make a difference. I think one or two that turn out to be irrelevant is better than not sending the one that is.
And, because of that, I will mentiion that two upgraded sites (one with and one without OPC) will not display the details of the order (below the payment method line) without retaining the old includes/modules/payment/square_support and its files.
OTOH, several other sites work fine without that folder and files.
More info available on request. I have to break sites to get the log file for the support folder. Don't want to do that during business hours.
-
Re: Square WebPay support thread.
Quote:
Originally Posted by
dbltoe
Just a side note:
Well, two
First is that I send all log files I get from the test sites just in case they might make a difference. I think one or two that turn out to be irrelevant is better than not sending the one that is.
And, because of that, I will mentiion that two upgraded sites (one with and one without OPC) will not display the details of the order (below the payment method line) without retaining the old includes/modules/payment/square_support and its files.
OTOH, several other sites work fine without that folder and files.
More info available on request. I have to break sites to get the log file for the support folder. Don't want to do that during business hours.
just so we are clear
- unless i ask for log files, please do not send them.
- i NEVER said to delete or remove includes/modules/payment/square_support
- i am sure other sites work without those files being there due to a config setting. but, IMO those files need to remain there.
- for the next release i will include and package those files in the zip.
- the next release will have a little better error messaging. and the logs will not have what i now deem to be superfluous data. i'm a fan of logs having only the relevant data. as more feedback comes in, logs can be better streamlined as apache or nginx have the more complete and detailed logs.
- i'm really not sure what to make of your last point. you need to break a site in order to get to any log files? i do not want to insult the host :p, but needing to break a site to get to any log files is a problem. i look at log files all the time with the site still being up. i'm going to go with i do not understand what you are saying.
- i am happy we got this problem resolved.
-
Re: Square WebPay support thread.
Hi CarlWhat & DblToe,
I have been unable to remove the old square module. After shutting my store down for maintenance, I attempted to remove the old square module and when I click on remove module, it returns me to the install square.
I have attempted to reinstall the includes folder and the php file in the root. The result remained the same.
I have not been able to see the new module either.
I am running ZC 1.5.7c.
I don't want to put the store back online with just PayPal as a payment option with no Square Available.
Please advise.
-
Re: Square WebPay support thread.
Quote:
Originally Posted by
carlwhat
ok, @Nick1973 and whoever else is paying attention, this is what i have found.
- we have 2 event listeners competing for the same event.
- when, the square_webpay event listener gets registered first, there is a successful transaction.
- when the OPC event listener gets registered first, the square submittal does not happen, and hence there is no token that gets submitted as part of the form.
- i have no idea why on some sites, the event listener gets registered first in OPC and other times square_webpay.
- i am working on addressing that.
as a test, leave Minify set to FALSE - always... until the problem is resolved.
try commenting out these 2 lines:
https://github.com/lat9/one_page_che...ut_one.js#L545
https://github.com/lat9/one_page_che...ut_one.js#L568
and try placing an order.
So is this the fix? Or do I need to wait for you to further investigate?
-
Re: Square WebPay support thread.
On it now.
Quote:
Originally Posted by
nonprofit
Hi CarlWhat & DblToe,
I have been unable to remove the old square module. After shutting my store down for maintenance, I attempted to remove the old square module and when I click on remove module, it returns me to the install square.
I have attempted to reinstall the includes folder and the php file in the root. The result remained the same.
I have not been able to see the new module either.
I am running ZC 1.5.7c.
I don't want to put the store back online with just PayPal as a payment option with no Square Available.
Please advise.
-
Re: Square WebPay support thread.
Quote:
Originally Posted by
dbltoe
On it now.
Issue resolved!
Our host confirmed that the old Square ddidn't have to be removed, just turned off.
I completed the ID and Token refresh from the old values saved from the disabled module and completed the upgrade.
Thank you, DblToe!
-
Re: Square WebPay support thread.
Quote:
Originally Posted by
nonprofit
Issue resolved!
Our host confirmed that the old Square ddidn't have to be removed, just turned off.
I completed the ID and Token refresh from the old values saved from the disabled module and completed the upgrade.
Thank you, DblToe!
Does this mean now that there is a new version of this module that works with OPC?
-
Re: Square WebPay support thread.
Quote:
Originally Posted by
Nick1973
So is this the fix? Or do I need to wait for you to further investigate?
Quote:
Originally Posted by
Nick1973
Does this mean now that there is a new version of this module that works with OPC?
nick, that is the fix. there is no new version forthcoming. when there is, you can see it in the downloads page as well as an announcement here.
i am not sure what more you would want me to investigate. your problem appears solved.
and the idea that this is a problem with square_webPay v OPC could be one that could be debated ad nauseam.
-
Re: Square WebPay support thread.
Quote:
Originally Posted by
carlwhat
nick, that is the fix. there is no new version forthcoming. when there is, you can see it in the downloads page as well as an announcement here.
i am not sure what more you would want me to investigate. your problem appears solved.
and the idea that this is a problem with square_webPay v OPC could be one that could be debated ad nauseam.
I wasn't asking you to digress :D, I was asking you if it was fixed. That is all I am interested in!
Now I can go and get a life haha...well I hope anyway :P
-
1 Attachment(s)
Re: Square WebPay support thread.
Second time I've personally seen this one. Not recorded to logs, the customer proceeds through checkout payment and then ends up on the squareWebPay_handler.php with a blank white page. At this point, customers are stuck there unless they click back and proceed again. Had a few abandoned carts due to this.
Anyone else experienced this? Most payments going through perfectly fine.
Attachment 19974
-
Re: Square WebPay support thread.
Finally got a customer from one of our sites to answer their phone and let us walk through the process with them.
The site has the latest WebPay from github and OPC without any changes other that the comment-outs suggested in WebPay.
The item is also Free Shipping
I have been able to test with VISA successfully every time.
Tried with a MC after this trial and got the error
This site is getting multiple sales daily and only an occasional ms-confg.
This customer got the usual ms-confg using DISCOVER.
She volunteered to use another card and I asked if she had AMEX.
She did and it worked flawlessly, first time.
So perhaps anyone who can test DISCOVER and MC to see if they get the same results.
Also, while it may be only specific to OPC, the item's free shipping throws the following error:
[27-Apr-2022 21:26:10 UTC] PHP Notice: Malformed value for session-based shipping module; customer will need to re-select: {"id":"","title":"FREE SHIPPING! (No Delivery Charge)","cost":0} in /includes/classes/order.php on line 323
-
Re: Square WebPay support thread.
Quote:
Originally Posted by
carlwhat
who knew? i'm working on an alternative...
thanks for your support.
best.
Yes... I too would send some coffee/cake money if there was some way for us British fellows to do so. I haven't plugged in your module yet as I am doing a complete re-vamp of my websites, but knowing your module is available is a massive relief.
-
Re: Square WebPay support thread.
Now there's an avatar from the past! Good to see you.
Check post #29 for CarlWhat's PayPal info.
-
Re: Square WebPay support thread.
Quote:
Originally Posted by
schoolboy
Yes... I too would send some coffee/cake money if there was some way for us British fellows to do so. I haven't plugged in your module yet as I am doing a complete re-vamp of my websites, but knowing your module is available is a massive relief.
there is a payPal link in my signature for you british blokes!
appreciate any and all support.
thanks in advance.
-
Re: Square WebPay support thread.
Quote:
Originally Posted by
dbltoe
Finally got a customer from one of our sites to answer their phone and let us walk through the process with them.
The site has the latest WebPay from github and OPC without any changes other that the comment-outs suggested in WebPay.
The item is also Free Shipping
I have been able to test with VISA successfully every time.
Tried with a MC after this trial and got the error
This site is getting multiple sales daily and only an occasional ms-confg.
This customer got the usual ms-confg using DISCOVER.
She volunteered to use another card and I asked if she had AMEX.
She did and it worked flawlessly, first time.
So perhaps anyone who can test DISCOVER and MC to see if they get the same results.
Also, while it may be only specific to OPC, the item's free shipping throws the following error:
[27-Apr-2022 21:26:10 UTC] PHP Notice: Malformed value for session-based shipping module; customer will need to re-select: {"id":"","title":"FREE SHIPPING! (No Delivery Charge)","cost":0} in /includes/classes/order.php on line 323
if you have done the comment outs as suggested in this post:
https://www.zen-cart.com/showthread....13#post1387913
i am still not sure how you can be getting the `ms-confg` error. it is entirely possible you are getting a different error, but i do not think it is the 'ms-confg`.
if all VISA transactions work, and some other card does not, this suggests to me a configuration issue. and now thinking about it, perhaps the ZC configuration might cause that error; but it still seems a bit suspicious to me.
i would look at the ZC config values for which credit cards are enabled. specifically admin -> configuration -> credit cards. in addition, i would also look at the configuration on the square dashboard to see if there is something up there for which credit cards that app accepts.
the `ms-confg` error means we do not have a communication back from square in our post to your zc server. other errors are possible; but i'm doubtful that if you have commented out the submits in OPC and the form still gets submitted (which it should), then there should be an error message from square different from the misconfig error message.
i could be wrong. but i do not think so...
-
1 Attachment(s)
Re: Square WebPay support thread.
Sure looks like a SQ-MSCONF error to me.
Attachment 19978
-
Re: Square WebPay support thread.
Quote:
Originally Posted by
dbltoe
and what happens when you turn OPC off?
i would suggest reviewing post #52 above.
i have no idea which of your numerous sites is getting that error or the modifications on said site.
if you look at post #52, you will see there are competing listeners attaching themselves to the same event, ie clicking of the confirm order button. if this site has ANOTHER listener attached to that event, then it is entirely possible that listener could be causing the problem.
-
Re: Square WebPay support thread.
Already had those lines commented out. That was the saving point for one of our customers.
Sat down and wrote down scenarios. Only one customer having problems. Amex and Visa fine. Others, got the error.
Suddenly realized this morning that, what i had mentioned before could be the problem. This customer uses freeshipper.
Digging back through everything, I had mentioned this before.
I went back to the problem site and found items that required postage. All items worked with Visa and MC. I do not have access to Amex or Discover.
I have delayed on trying lat9's OPC fix while doing these checks.
Just wanted to pass on what I have learned so far.
-
Re: Square WebPay support thread.
Also, they are getting an error that MODULE_PAYMENT_SQUARE_ENTRY_REFUND_TITLE is already defined in includes/langues/english/modules/payment/square_webPay.php on line 85
Lines 82-86 of the latest file:
Code:
// do not change; for common use on admin.
const MODULE_PAYMENT_SQUARE_ENTRY_REFUND_TITLE = MODULE_PAYMENT_SQ_WEBPAY_ENTRY_REFUND_TITLE;
const MODULE_PAYMENT_SQUARE_ENTRY_TRANSACTION_SUMMARY = MODULE_PAYMENT_SQ_WEBPAY_ENTRY_TRANSACTION_SUMMARY;
const MODULE_PAYMENT_SQUARE_ENTRY_REFUND_TITLE = MODULE_PAYMENT_SQ_WEBPAY_ENTRY_REFUND_TITLE;
const MODULE_PAYMENT_SQUARE_ENTRY_REFUND = MODULE_PAYMENT_SQ_WEBPAY_ENTRY_REFUND;
-
Re: Square WebPay support thread.
Quote:
Originally Posted by
dbltoe
Already had those lines commented out. That was the saving point for one of our customers.
Sat down and wrote down scenarios. Only one customer having problems. Amex and Visa fine. Others, got the error.
Suddenly realized this morning that, what i had mentioned before could be the problem. This customer uses freeshipper.
Digging back through everything, I had mentioned this before.
I went back to the problem site and found items that required postage. All items worked with Visa and MC. I do not have access to Amex or Discover.
I have delayed on trying lat9's OPC fix while doing these checks.
Just wanted to pass on what I have learned so far.
so you have a problem with freeshipper, and now you are somehow posting this here in the square webpay module?
i'm confused about that.
i am here to support code that i developed, that part of the zc team asked for me to take on. which i generously did. and I, based on you and @Nick1973 's postings, found where OPC and square webpay do not play nice together. and now you would like to find out where an error in freeshipper is now wrecking further havoc on your customer's sites?
:yuck: :yuck: :yuck:
a malformed request for sure...
-
Re: Square WebPay support thread.
Quote:
Originally Posted by
dbltoe
Also, they are getting an error that MODULE_PAYMENT_SQUARE_ENTRY_REFUND_TITLE is already defined in includes/langues/english/modules/payment/square_webPay.php on line 85
Lines 82-86 of the latest file:
Code:
// do not change; for common use on admin.
const MODULE_PAYMENT_SQUARE_ENTRY_REFUND_TITLE = MODULE_PAYMENT_SQ_WEBPAY_ENTRY_REFUND_TITLE;
const MODULE_PAYMENT_SQUARE_ENTRY_TRANSACTION_SUMMARY = MODULE_PAYMENT_SQ_WEBPAY_ENTRY_TRANSACTION_SUMMARY;
const MODULE_PAYMENT_SQUARE_ENTRY_REFUND_TITLE = MODULE_PAYMENT_SQ_WEBPAY_ENTRY_REFUND_TITLE;
const MODULE_PAYMENT_SQUARE_ENTRY_REFUND = MODULE_PAYMENT_SQ_WEBPAY_ENTRY_REFUND;
a definite bug.
thank you for posting.
-
Re: Square WebPay support thread.
Customer is having this error.
SQ-MISCONF
This is whats shown in the logs:-
Code:
PHP Notice: missing token result: {"main_page":"checkout_confirmation","securityToken":"17ea4ca2ee9862e75351f151410f6b1c","action":"submit","dc_redeem_code":"","payment":"square_webPay","comments":"Open Monday to Friday 8.30am to 3.30pm. Close on 25th May to 8th June","_ga":"GA1.3.1565247237.1651828904","_gid":"GA1.3.1193966615.1651828904","cart":"eNpLtDK0qs60sjA1NLROBLGLrYytlApLKpWswSxjAwMl69paANi3Cs0=","cartkey":"26cabe76ba7bec9f06e3d9d8099b871a","zenid":"5ebb687a6ad4b7fb2cec87cd7f669bd0","_gat":"1"} in /home/public_html/koolbadges.co.uk/includes/modules/payment/square_webPay.php on line 234.
Any ideas what can cause this?
Thanks in advance
-
Re: Square WebPay support thread.
Quote:
Originally Posted by
johnjlarge
Customer is having this error.
SQ-MISCONF
This is whats shown in the logs:-
Any ideas what can cause this?
Thanks in advance
a customer? interesting....
is the customer using OPC?
given that you are providing support to a customer, i would suggest reading this support thread. the answer is on this thread. specifically here:
https://www.zen-cart.com/showthread....13#post1387913
you can replace the following 2 files:
https://github.com/proseLA/square_we...are_webPay.php
https://github.com/lat9/one_page_che...heckout_one.js
and then there will some additional information in the console on the developer tools.
if the customer is using the OPC minimized, then you can also replace this file:
https://github.com/lat9/one_page_che...out_one.min.js
best.
-
Re: Square WebPay support thread.
Quote:
Originally Posted by
carlwhat
My apologies for the confusion, I meant a customer tried to complete a transaction on our website and received the error, and the log was generated. We don't use OPC, its just the standard zen cart paying flow of shipping > payment > confirmation.
-
Re: Square WebPay support thread.
Quote:
Originally Posted by
johnjlarge
My apologies for the confusion, I meant a customer tried to complete a transaction on our website and received the error, and the log was generated. We don't use OPC, its just the standard zen cart paying flow of shipping > payment > confirmation.
have you had any customers successfully pay with square webPay?
what template are you using? and what is the site address?
the first file is still helpful to have on the site, you can get the raw version from here:
https://raw.githubusercontent.com/pr...are_webPay.php
it will provide some info on the console.
it's entirely possible that your customer is using a very old browser that is not supported.
-
Re: Square WebPay support thread.
Quote:
Originally Posted by
carlwhat
have you had any customers successfully pay with square webPay?
what template are you using? and what is the site address?
the first file is still helpful to have on the site, you can get the raw version from here:
https://raw.githubusercontent.com/pr...are_webPay.php
it will provide some info on the console.
it's entirely possible that your customer is using a very old browser that is not supported.
We've had lots of orders go through without issue via webpay. This is the first to show this error so maybe specific to that user.
Templates is based on Responsive Avonlee Contemporary. sites is at https://www.koolbadges.co.uk
I'll add the suggested file in case this happens again.
-
Re: Square WebPay support thread.
Quote:
Originally Posted by
johnjlarge
We've had lots of orders go through without issue via webpay. This is the first to show this error so maybe specific to that user.
Templates is based on Responsive Avonlee Contemporary. sites is at
https://www.koolbadges.co.uk
I'll add the suggested file in case this happens again.
if you are not using OPC, and you have had plenty of successful transactions, pretty sure the issue is on the customer side. or potentially loading of multiple versions of jquery on the site. which i am not seeing on your site.
i have changed the logging of that message, as there is no need for the rest of the post vars. you can upload this file (in its respective place) as well:
https://raw.githubusercontent.com/pr...are_webPay.php
i should be submitting an updated version soon. but the changes are really for error logging and troubleshooting as the core part of processing cc transactions has not changed.
best.
-
Re: Square WebPay support thread.
ZC 1.56c, PHP 7.4,
If the customer has an apostrophe in their name (like Andre') or address (like River Fall's Place), the CC form will not load. Does not appear that was an issue with the old plugin.
Removing the apostrophe will allow checkout.
-
Re: Square WebPay support thread.
Good afternoon,
I'm getting a "whoops, your session has expired" upon submitting Order Confirmation Step 3 of 3 Confirm the Order.
I tried replacing file: https://github.com/proseLA/square_we...are_webPay.php (and added a blank line after initially receiving a white page on 2nd page)
I also tried replacing my Square "Production Application secret"
- Running
1.5.7d (upgraded from 1.5.7b)
clone a template (cloned Responsive Classic Template)
Sitemap XML v4.0
Square WebPay
PayPal Express Checkout
No debug logs are being generated after adding blank line to fix "unexpected end of file in "/public_html/VDSstore/includes/modules/pages/checkout_payment/jscript_square_webPay.php on line 191"
I appreciate help from anyone.
-
Re: Square WebPay support thread.
Quote:
Originally Posted by
VDecalS
Good afternoon,
I'm getting a "whoops, your session has expired" upon submitting Order Confirmation Step 3 of 3 Confirm the Order.
I tried replacing file:
https://github.com/proseLA/square_we...are_webPay.php (and added a blank line after initially receiving a white page on 2nd page)
I also tried replacing my Square "Production Application secret"
- Running
1.5.7d (upgraded from 1.5.7b)
clone a template (cloned Responsive Classic Template)
Sitemap XML v4.0
Square WebPay
PayPal Express Checkout
No debug logs are being generated after adding blank line to fix "unexpected end of file in "/public_html/VDSstore/includes/modules/pages/checkout_payment/jscript_square_webPay.php on line 191"
I appreciate help from anyone.
why you are getting to a timeout, i can not say. i went to your site, and it looks like you have square in sandbox mode. square_webPay is doing everything as expected. see this screenshot:
https://www.dropbox.com/s/dgj8qduuah...00-27.png?dl=0
the tokenResult is on the form and hidden, and its status is ok. as i entered a test credit card number, i can only assume that you are in test mode else the status would not have been ok.
i would try live credentials and see if that works.
as far as the timeout goes, have you overridden your checkout_process.php file? i would think that is where the timeout is happening, specifically here:
https://github.com/zencart/zencart/b...ss.php#L28-L39
do you have this file:
/YOUR_STORE_ROOT/includes/modules/Gray157b/checkout_process.php
if you do great. if not copy it from here:
/YOUR_STORE_ROOT/includes/modules/checkout_process.php
to the above location. you can then change your slamming_threshold to something like 15, and see if that helps.
as far as square_webpay, i see no problems.
hope that helps!
best.
-
Re: Square WebPay support thread.
Quote:
Originally Posted by
carlwhat
why you are getting to a timeout, i can not say. i went to your site, and it looks like you have square in sandbox mode. square_webPay is doing everything as expected. see this screenshot:
https://www.dropbox.com/s/dgj8qduuah...00-27.png?dl=0
the tokenResult is on the form and hidden, and its status is ok. as i entered a test credit card number, i can only assume that you are in test mode else the status would not have been ok.
i would try live credentials and see if that works.
I checked that the Square WebPay Module "Application ID" and "Application Secret (OAuth)" match the "production" credentials from my Square account and I have the "Transaction Type" set to purchase. Is there something else I need to change in my Square account?
How are you deciphering sandbox mode in the image? (It's all Greek to me)
Quote:
Originally Posted by
carlwhat
as far as the timeout goes, have you overridden your checkout_process.php file? i would think that is where the timeout is happening, specifically here:
https://github.com/zencart/zencart/b...ss.php#L28-L39
do you have this file:
/YOUR_STORE_ROOT/includes/modules/Gray157b/checkout_process.php
if you do great. if not copy it from here:
/YOUR_STORE_ROOT/includes/modules/checkout_process.php
to the above location. you can then change your slamming_threshold to something like 15, and see if that helps.
as far as square_webpay, i see no problems.
hope that helps!
best.
I did not have checkout_process.php in my Gray157b, so I added it and changed the slamming threshold from 3 to 15 with no changed result. I tried checking out with PayPal and it steps me through page 3 of 3 without the "Whoops!" (no time out).
The square-webPay-master zip file is dated 04/05/2022. I did a search via WinSCP for files dated 4/5/2022 all are from the module. So I guess I could delete and start over. Thoughts/advice?
Thank you for the NBL carlwhat.
-
Re: Square WebPay support thread.
Quote:
Originally Posted by
VDecalS
I checked that the Square WebPay Module "Application ID" and "Application Secret (OAuth)" match the "production" credentials from my Square account and I have the "Transaction Type" set to purchase. Is there something else I need to change in my Square account?
How are you deciphering sandbox mode in the image? (It's all Greek to me)
I did not have checkout_process.php in my Gray157b, so I added it and changed the slamming threshold from 3 to 15 with no changed result. I tried checking out with PayPal and it steps me through page 3 of 3 without the "Whoops!" (no time out).
The square-webPay-master zip file is dated 04/05/2022. I did a search via WinSCP for files dated 4/5/2022 all are from the module. So I guess I could delete and start over. Thoughts/advice?
Thank you for the NBL carlwhat.
i am not really sure what is causing your time out. i have looked at the square changes i have done since 4/5; and nothing in there would seem to address this problem.
have you tried any other payment modules to see if they work besides paypal?
-
Re: Square WebPay support thread.
it has also come to my attention, that it may be related to a cookie setting. do you have if you have this value set: COOKIE_SAMESITE? and if so, what is it?
one could look using the developer tools off the admin -> tools menu.
also, what version of php are you running?
and finally please confirm that you are running zc 1.5.7d.
thanks.
-
Re: Square WebPay support thread.
I ran a search in the tool kit for COOKIE_SAMESITE (ran in every option) and found just these two:
/home/vinyld6/public_html/VDSstore/***/includes/init_includes/init_sessions.php
Line #25 : $samesite = (defined('COOKIE_SAMESITE')) ? COOKIE_SAMESITE : 'lax';
and
/home/vinyld6/public_html/VDSstore/includes/init_includes/init_sessions.php
Line # 42 : $samesite = (defined('COOKIE_SAMESITE')) ? COOKIE_SAMESITE : 'lax';
PHP Version: 7.2.34 (Zend: 3.2.0)
Zen Cart 1.5.7d
Database Patch Level: 1.5.7b
v1.5.7b [2021-02-20 16:19:18] (Version Update 1.5.6->1.5.7b)
v1.5.6c [2021-02-20 16:19:17] (Version Update 1.5.5->1.5.6c)
v1.5.5 [2016-03-30 10:00:19] (Version Update 1.5.4->1.5.5)
v1.5.4 [2016-03-30 10:00:18] (Version Update 1.5.3->1.5.4)
v1.5.3 [2016-03-30 10:00:18] (Version Update 1.5.2->1.5.3)
v1.5.2 [2016-03-30 10:00:17] (Version Update 1.5.1->1.5.2)
v1.5.1 [2016-03-30 10:00:16] (Version Update 1.5.0->1.5.1)
v1.5.0 [2016-03-30 10:00:15] (Version Update 1.3.9->1.5.0)
v1.3.9b [2010-05-15 15:00:01] (Version Update 1.3.8->1.3.9b)
v1.3.8 [2009-06-14 16:02:34] (Fresh Installation)
v1.3.8 [2009-06-14 16:02:34] (Fresh Installation)
Thinking I had a corruption during upload, I was just about to delete all the Square WebPay files and start over. I also have FULL backups prior to the install of Square WebPay that I can restore.
Thanks again carlwhat
-
Re: Square WebPay support thread.
... Money Order payment option works. I have no other online modules set up that I can test.
Do you want me to enable Square WebPay for your research?
-
Re: Square WebPay support thread.
I deleted all the Square WebPay files via WinSCP and reinstalled the module. Still no joy. I did get a warning log:
File Contents( /home/vinyld6/logs/myDEBUG-adm-20220515-180033-869325-warning.log)
[15-May-2022 13:00:34 America/Chicago] Request URI: /VDSstore/***/index.php?cmd=modules&set=payment&action=install, IP address: 152.97.210.26
#1 square_webPay->__construct() called at [/***/modules.php:106]
#2 require(/***/modules.php) called at [/***/index.php:11]
--> PHP Warning: Use of undefined constant MODULE_PAYMENT_SQ_WEBPAY_TESTING_MODE - assumed 'MODULE_PAYMENT_SQ_WEBPAY_TESTING_MODE' (this will throw an Error in a future version of PHP) in /includes/modules/payment/square_webPay.php on line 106.
[15-May-2022 13:00:34 America/Chicago] Request URI: /VDSstore/***/index.php?cmd=modules&set=payment&action=install, IP address: 152.97.210.26
#1 square_webPay->__construct() called at [/***/modules.php:106]
#2 require(/***/modules.php) called at [/***/index.php:11]
--> PHP Warning: Use of undefined constant MODULE_PAYMENT_SQ_WEBPAY_ACCESS_TOKEN - assumed 'MODULE_PAYMENT_SQ_WEBPAY_ACCESS_TOKEN' (this will throw an Error in a future version of PHP) in /includes/modules/payment/square_webPay.php on line 111.
Does this log help ID the "Whoops!"?
My next step will be to restore my site.
-
Re: Square WebPay support thread.
Quote:
Originally Posted by
VDecalS
I ran a search in the tool kit for COOKIE_SAMESITE (ran in every option) and found just these two:
/home/vinyld6/public_html/VDSstore/***/includes/init_includes/init_sessions.php
Line #25 : $samesite = (defined('COOKIE_SAMESITE')) ? COOKIE_SAMESITE : 'lax';
and
/home/vinyld6/public_html/VDSstore/includes/init_includes/init_sessions.php
Line # 42 : $samesite = (defined('COOKIE_SAMESITE')) ? COOKIE_SAMESITE : 'lax';
PHP Version: 7.2.34 (Zend: 3.2.0)
Zen Cart 1.5.7d
Database Patch Level: 1.5.7b
v1.5.7b [2021-02-20 16:19:18] (Version Update 1.5.6->1.5.7b)
v1.5.6c [2021-02-20 16:19:17] (Version Update 1.5.5->1.5.6c)
v1.5.5 [2016-03-30 10:00:19] (Version Update 1.5.4->1.5.5)
v1.5.4 [2016-03-30 10:00:18] (Version Update 1.5.3->1.5.4)
v1.5.3 [2016-03-30 10:00:18] (Version Update 1.5.2->1.5.3)
v1.5.2 [2016-03-30 10:00:17] (Version Update 1.5.1->1.5.2)
v1.5.1 [2016-03-30 10:00:16] (Version Update 1.5.0->1.5.1)
v1.5.0 [2016-03-30 10:00:15] (Version Update 1.3.9->1.5.0)
v1.3.9b [2010-05-15 15:00:01] (Version Update 1.3.8->1.3.9b)
v1.3.8 [2009-06-14 16:02:34] (Fresh Installation)
v1.3.8 [2009-06-14 16:02:34] (Fresh Installation)
Thinking I had a corruption during upload, I was just about to delete all the Square WebPay files and start over. I also have FULL backups prior to the install of Square WebPay that I can restore.
Thanks again carlwhat
In addition, check your storefront /includes/configure.php file to make sure that both the HTTP_SERVER and HTTPS_SERVER definitions start with 'https' and that ENABLE_SSL is set to 'true' (including the quotes).
If those are all OK, for the SAMESITE_COOKIE setting (although I've not seen any other time-out issues reported in this support-thread), try creating a file named samesite_cookie.php in the storefront /includes/extra_datafiles directory that contains:
PHP Code:
<?php
// -----
// Identify that the site uses the 'samesite' cookie setting of 'None', since some payments (when returning
// from a 3DS verification) need the cookie set this way.
//
if (ENABLE_SSL == 'true') {
define('COOKIE_SAMESITE', 'none');
}
That 'might' work, but I'm on a guessing path here!
-
Re: Square WebPay support thread.
Checked - storefront /includes/configure.php
define('HTTP_SERVER', 'https://vinyldecalsuperstore.com');
define('HTTPS_SERVER', 'https://vinyldecalsuperstore.com');
define('ENABLE_SSL', 'true');
looks good there.
Created the samesite_cookie.php and copied the code with no trailing blank line, then with a trailing blank line after the }, neither got me past the Whoops.
Thanks for looking Cindy!
-
1 Attachment(s)
Re: Square WebPay support thread.
I do notice that my Location ID is not being displayed after step 2 of module install (ie. green box ..login and Authorize your account)
Attachment 19988
I have to EDIT Square WebPay again, making no changes, just clicking the UPDATE button. Then the Location ID shows as:
VinylDecalSuperstore.com:[**letter/number-code**]:USD
I hope this is the important information, I've neglected to tell before now, that will allow a fix.
-
Re: Square WebPay support thread.
Quote:
1.5.7d (upgraded from 1.5.7b), clone a template (cloned Responsive Classic Template), Sitemap XML v4.0, Square WebPay, PayPal Express Checkout, PHP Version: 7.2.34
Please note that this module needs PHP 7.3.3.
I have not been able to get it going with anything less.
You are at 1.5.7d which should be able to handle 7.4 or 8.0. Some of your existing mods may not play well with 8.0, so start with 7.4 and work up.
-
Re: Square WebPay support thread.
Quote:
Originally Posted by
dbltoe
Please note that this module needs PHP 7.3.3.
I have not been able to get it going with anything less.
You are at 1.5.7d which should be able to handle 7.4 or 8.0. Some of your existing mods may not play well with 8.0, so start with 7.4 and work up.
Humm. Tried both, neither let me complete purchase so I knocked it back to PHP 7.4.29 (Zend: 3.4.0)
Thanks dbltoe
-
Re: Square WebPay support thread.
Since the site is running https-all-the-time, your site's root .htaccess file should 'support' that. Make a backup copy and add the following clauses close to the top of the file to 'force' the access to https://vinyldecalsuperstore.com/{whatever} when the access is made as
vinyldecalsuperstore.com/VDSstore/{whatever}
http://vinyldecalsuperstore.com/{whatever}
http://www.vinyldecalsuperstore.com/{whatever}
https://www.vinyldecalsuperstore.com/{whatever}
Code:
RewriteCond %{SERVER_PORT} 80 [OR]
RewriteCond %{HTTP_HOST} ^www\.vinyldecalsuperstore\.com$ [NC]
RewriteRule (.*) https://vinyldecalsuperstore.com/$1 [R=301,L]