BRDS:
DrByte:
BRDS:
I am unable to make this module work and am confronted with the SQ-NONCE-FAILURE error at every turn.
I am running zencart 1.5.6c on php 7.3
I have check and tried all the previous advise in this thread and the Square set up common problems, but still no luck. All files are in the right place, the module is installed and activated with a valid token and date. I also have no js errors... I have even removed my custom js code and just tried with plain jquery (deferred and not).
One thing I have noticed is that in the console the following error is logged...
0: Unable to get property 'SavePersonalAndPaymentData' of undefined or null reference - Autoformfill_ContentScript.js (1,20660)
I am getting a nonce code, I amended the code to log this in the console to ensure one is generated... and even unhid the input field that this is placed in to see it is actually placed in the input field before the submit confinues.... but it just refuses to work.
What else can I try, I have been at this all day, and going crazy :wacko:
I'm pretty sure your javascript error is interfering with the execution of the rest of the script. Whatever conflicts are introduced by other javascript on your site will need to be addressed before it will work properly for you.
The error that is logged is created by Square, there are no other js errors. I have even removed all js on the site and just left jquery, but still the same issue. I really do not think the js is the issue with this one.
After re-reading your first post and re-interpreting the messages you quoted, I agree: probably not js issue. Granted, the Square error is worth noting and perhaps investigating, perhaps via their Slack channel.
Let's take it a step further then:
- the SQ-NONCE-FAILURE error appears when the nonce is not received by the payment module.
(Since you indicate you understand code, you could try dumping out the value of the nonce field from inside the payment module, to see what/why it's invalid/missing).
- therefore something else on your site is blocking it from passing through as normal POST data like it does on a properly functioning site
Therefore I must ask: in what ways is your store different from a fresh new install of Zen Cart? Therein will be the clues to the cause of your problem.
I don't mean just what plugins/addons. I mean any extra files that have been added (intentionally or unintentionally).
To ascertain those differences, I recommend taking a complete copy of the /includes/ directory from your server, and running a compare locally against a fresh clean copy of Zen Cart. This is to be certain that you don't have unexpected files on the server that you didn't know about, as they could be contributing to the problem too.
A great summary of similar comparison process is described in this article: https://www.zen-cart.com/wiki/index.php/Recovering_From_Hacks
Also, since we're looking for something possibly obscure in your case, checking all configuration_value entries in the configuration table might be worthwhile, to make sure no unexpected contents are found there.