-
-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Escape in Product Names for PAYONE #1256
Comments
Opened chromium issue 416377. |
Same probably applies for PayPal and other payment methods. |
Can you check if this fixes your issue? |
I cannot imagine how this additional method call would help in any way. If you use this method call now, any [nbsp] in the database will be replaced for before it goes to the template, which in turn calls the method again. But the real problem in this case is to have the character in the hidden input fields at all. This is actually not an Isotope bug, because Chrome under Linux should encode such characters. My line of code is only a workaround until the upstream issue has been resolved (and the fix works for older Chrome versions as well). So, if Isotope would like to support Chrome in this special situation, it would be necessary that never makes it to the template at all. I did this by replacing it with a regular blank. |
Why would [nbsp] replaced in the template? Basically, we would need to remove all HTML entities, right? Also things like |
Any feedback on this topic? |
Sorry for the delay. The chromium bug is very specific and Red Hat is currently investigating the source. I don't think Isotope needs to do anything here. Escaping characters might be a workaround, but investing time is not appropriate seeing the nature of the chromium bug. |
Bad idea to close this issue. There seem to be other weird constellations in which having entities in the request to PAYONE is not a good idea. Unfortunately, Yanicks line specialchars(
\String::restoreBasicEntities($objItem->getName() . $strOptions),
true
) still leaves all the entities like intact. I don't know about all the contao functions, but could we introduce some function call that actually replaces entities with harmless characters? For now, I have included my |
Did you find any other solution than |
Nope, it helps, so I closed our internal ticket. If you choose to integrate the same line or a similar functionality with a more complicated function call, that would be fine. If you opt to change nothing, we would have to patch Isotope after each update of the file. Either way would work. |
The best possible solution is likely to remove all HTML stuff from forms sent to the payment providers. This does not only affect PayOne but also others like PayPal. |
I have similar problems because of '&' and '(' and ')' in the product name. (Error message 'Hashwert nicht korrekt'). and this works for me, but I guess there are better solutions? |
@qzminski please prepare a PR to fix this. Maybe the cleaning method should go in Haste |
See #1687. Can anyone test it please? |
I also wonder, maybe we could only do:
That would result in properly encoded field value in HTML and the hash generated with decoded entities (just like does Payone probably). |
We basically need to convert every value to plain text, right? |
#1687 works for me, too! |
Closed in favor of #1687 |
Should be finally fixed in 8410fd4 |
Good morning,
a new week, a new PAYONE 'challenge'…
I discovered that there is a problem with the current implementation for PAYONE that leads to incorrect hash calculation. We use product names with [nbsp] to prevent ugly line wraps (e.g. in front of units). These are rendered as the   character in HTML (as value of the hidden input fields). Browsers do not encode this value for some reason (!), whereas
urlencode
does correctly convert it to %C2%A0.To circumvent this, I added a simple
str_replace
for [nbsp] to a regular whitespace.Line 128 of Model/Payment/Payone.php:
This solves it for me and PAYONE now accepts the requests. I guess one could find a cleaner solution, but I already invested two hours to find the cause.
The text was updated successfully, but these errors were encountered: