Upgraded my Square module to the WebPay module last week, was working great, taking charges with no issue.
Today I got a debug file with this at the end:
PHP Notice: missing token result: check if card button is disabled on dev console using: document.getElementById('card-button'); else look for javascript error in console. in /usr/www/users/xx/includes/modules/payment/square_webPay.php on line 261.
Customer abandoned their cart at checkout_payment.
I saw some other messages about this, but must have missed the solution. How can I fix this?
Using 1.56c, php 7.3, standard checkout flow, daily cron task for handler update.
many thanks,
Ed
I do not have any active coupons. I have a couple of downloadable products, but not something that usually sells. I got several detailed error messages about "Pan Failure" from what you did on the site, posted to you privately.
Last edited by edadk; 4 Dec 2022 at 12:30 AM.
a PAN failure is the message that comes back from square. i placed an order with a test credit card, and square properly responded to that test credit card number. it is perfectly fine to post that message here, and no need to PM me that. and frankly i have never understood why users do not want to post their live website URLs on the board. but i suppose i am in the minority.
that message is expected.
your previous message is something different. it means that the information necessary to submit to square was not found. why that is, i can not say. it worked fine for me.
if it happens again, i would try to see what was in the cart and exactly what the customer was doing.
very hard to fix if i can not reproduce.
best.
I have to come back to the error I already posted at #356 in this thread.
I find this error more often now in the log files. It is an error in the source files of Square. I can not recreate this error and don't understand what could cause this error.
--> PHP Fatal error: Uncaught TypeError: Square\ApiHelper::serialize(): Return value must be of type string, bool returned in /includes/modules/payment/square_webPay/square/square/src/ApiHelper.php:113
I did not receive any Square Alert mail about this error.
I use Zen Cart v1.5.7d and php 8.0.25
Has anybody any idea what could cause this error?
Some additional information about this problem.
I have my product names in this style: Japanese Name of Product <br /> English Name of the Product
So it looks like this: プラスティックボトル 1000ml<br />Plastic Bottle 1000ml in the input field of the product manager.
Yesterday I saw a customer who had this problem in the "Whos Online" list of the backend. Since the error happened in the serialize function, I somehow had a feeling it has something to do with the product name or the html tag in the product name.
So I made notes of the items the customer had in the cart and changed the product names of those items to Japanese Name of Product (I removed <br /> English Name of the Product ).
The customer tried a while later to check out again and it worked. Of course I do not know if the customer changed something on his side. Japanese has some different input methods and it might be a certain input method caused the error.
Also it does not explain why most customers can check out without any problem and with the full product name (Japanese Name of Product <br /> English Name of the Product) .
I also asked in the Square developer forum, but they thought it is a problem of the Zen Cart API.