Make sure the module settings have "Purchase" selected under Transaction Type.
Make sure the module settings have "Purchase" selected under Transaction Type.
Are You Vulnerable for an Accessibility Lawsuit?
myZenCartHost.com - Zen Cart Certified, PCI Compatible Hosting by JEANDRET
Free SSL & Domain with semi-annual and longer hosting. Updating 1.5.2 and Up.
Thank you, I wish many things in life to be so simple to fix :-)
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.
i am also coming back to my attempted solution here. have you tried it?
i have done some debugging, and it looks like the serialize function is taking the array of the whole order.
the problem is something in the array is not in utf8 encoding. so the most likely culprit is the japanese product name. it is NOT the <br /> in the product name string.
i would check the encoding of the product name that you think is causing the problem. i am not the character encoding king, nor do i fully understand it. but that's my guess.
we could add some checking to get the last error if you are so inclined. but i am curious about my other questions on this issue.
best.
Thanks for your help!
This is the link: https://developer.squareup.com/forum...rialize/8224/4
I did not try your suggested solution yet, because I do not like to change anything while not knowing the reason. I also checked the product names the people who had problems checking out, had in their cart, but could not find any pattern.
There is also the possibility, that the people use some unexpected encoding for the data they provide. This whole encoding stuff in Japanese is quite annoying and I am not very familiar with it.
On a side note, not connected with the payment problem: very rarely some Kanji are shown with a placeholder in the backend of Zen Cart. On the invoice the same Kanji is displayed correctly, though.
First step for me would be to find out what causes the error. Of course I have a test shop running on a local Apache, but I did not do the Square sandbox setup yet. I have a feeling, it might be some combination of circumstances which lead to the error.
Bookmarks