Html Encoded Values In Payment Description Cause 400 Error In Sandbox Site
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.

Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- "System error. Please try again later" when connecting to paypal sandbox account with my android app in Sandbox Environment
- NOT ENABLED TO VAULT PAYMENT SOURCE in Sandbox Environment
- p is not a function error using the example downloaded from Paypal in SDKs
- Not receiving any confirmation emails for sandbox account in Sandbox Environment
- failed to pay with sandbox account in Sandbox Environment