Html Encoded Values In Payment Description Cause 400 Error In Sandbox Site

josh_yeager
Contributor
Contributor

On 6/20/2019 we began noticing that some of our payments submitted to our sandbox site were throwing Bad Request (400) errors. After some investigation, we tracked this down to an html-encoded character, specifically '—', being sent in an item description when creating a payment. Has anyone else had this issue start recently in the sandbox site?

 

We currently are not seeing this happen in production, but we'd like to know if this is something that's going to propagate there eventually. I have not seen mention of any update that happened on 6/20/2019, but we definitely did not have this issue before then and nothing changed on our end with payment creation. Any help would be much appreciated.

Login to Me Too
1 REPLY 1

Beeso27
Contributor
Contributor

I am having the same problem when any 'latin' characeters are sent (x80 - xFF). It appears the message sent from Paypal is encoded using windows-1252 rather than UTF-8. When the receiving website attempts to translate the string into JSON it causes an exception since it is expecting a UTF-8 encoded string. From the Profile> Selling Tools page I have selected the 'paypal button language encoding' link and then pressing the 'more options' button updated the encoding option to UTF-8. Unfortunately the meesage sent still appears to be encoded using windows-1252.

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.