tmjam
tmjam

Reputation: 1039

Identify which encoding PayPal IPN uses?

I am having some issues with PayPal IPN. The documentation uses ASCII encoding. I am using UTF-8. It works fine but as a rarest case I get some random characters. As far as I know the Paypal account can be setup for different encoding. Is there any way to identify that?.

Or is there a standard way of handling all the cases.

Upvotes: 8

Views: 2832

Answers (2)

Robert
Robert

Reputation: 19356

You can set the encoding for IPN via Account Settings > Website Payments > PayPal Button Language Encoding > More Options. (direct link)

The IPN message itself contains a 'charset' field as well which you can check against. See also https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_admin_IPNIntro#id091F0M006Y4

Upvotes: 12

tmjam
tmjam

Reputation: 1039

I see this as a part of the solution.

specifying the encoding method used in the form we send to paypal

<INPUT TYPE="hidden" name="charset" value="utf-8">

This link is more helpful

Upvotes: 0

Related Questions